Feb 2, 2017 Replies: 6 I used the following code placed in "Sub AppStart" allows you to configure ip etc.. tested in ESPConfigureWiFi... Best regards Code: Copy RunNative( "SetIP" , Null ) #if C void SetIP(B4R::Object* o) { IPAddress ip(192, 168, 1, xxx); // (Replace xxx with desired IP) IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 255, 0); WiFi.config(ip, gateway, subnet); } #end if Last edited by a moderator: Mar 6, 2017 Click to expand...
I used the following code placed in "Sub AppStart" allows you to configure ip etc.. tested in ESPConfigureWiFi... Best regards Code: Copy RunNative( "SetIP" , Null ) #if C void SetIP(B4R::Object* o) { IPAddress ip(192, 168, 1, xxx); // (Replace xxx with desired IP) IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 255, 0); WiFi.config(ip, gateway, subnet); } #end if
I inakigarm Well-Known Member Licensed User Longtime User Mar 6, 2017 #2 @ilpesce, can you modify the code snippet to delete the hidden characters? (see https://www.b4x.com/android/forum/threads/fixed-ip-on-nodemcu-1-0.76935/#content) Thanks !
@ilpesce, can you modify the code snippet to delete the hidden characters? (see https://www.b4x.com/android/forum/threads/fixed-ip-on-nodemcu-1-0.76935/#content) Thanks !
Erel B4X founder Staff member Licensed User Longtime User Mar 6, 2017 #3 Is it still there? I've added code tags.
I inakigarm Well-Known Member Licensed User Longtime User Mar 6, 2017 #4 Erel said: Is it still there? I've added code tags. Click to expand... No, copying and pasting the snippet is fine now
Erel said: Is it still there? I've added code tags. Click to expand... No, copying and pasting the snippet is fine now
Chris160179 Member Licensed User Longtime User Dec 10, 2017 #5 Hello everybody, i would like to pass an IP address direct to the Inline C "Void Sub" Is there a way? I passed an array of bytes und used (o->toULong) to convert the object but i don´t get the right IP Thank You
Hello everybody, i would like to pass an IP address direct to the Inline C "Void Sub" Is there a way? I passed an array of bytes und used (o->toULong) to convert the object but i don´t get the right IP Thank You
Erel B4X founder Staff member Licensed User Longtime User Dec 10, 2017 #6 Please start a new thread for this question.
Chris160179 Member Licensed User Longtime User Dec 10, 2017 #7 OK, thank you. here is the new thread: https://www.b4x.com/android/forum/t...as-static-ip-with-inline-c-for-esp8266.87083/
OK, thank you. here is the new thread: https://www.b4x.com/android/forum/t...as-static-ip-with-inline-c-for-esp8266.87083/