B4R Code Snippet Set IP address static/fixed for ESP8266

I used the following code placed in "Sub AppStart" allows you to configure ip etc..
tested in ESPConfigureWiFi...
Best regards

  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:


Licensed User
Longtime User
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