hideakitai / ArduinoOSC

OSC subscriber / publisher for Arduino
MIT License
207 stars 20 forks source link

Is it possible to have a non-fixed IP ? #25

Closed stephanschulz closed 3 years ago

stephanschulz commented 3 years ago

Thanks fro making this library. It works great.

Is there an option to get an IP assigned via DHCP? Or do I always need to hard code one?

Thanks for any advice.

hideakitai commented 3 years ago

@stephanschulz Hi, sorry for the late reply.

You should specify IP or hostname. It is because Arduino's Client class only supports them. So please try to set the hostname or get the assigned IP from your device.

stephanschulz commented 3 years ago

I believe i have solved this by

WiFi.begin(ssid, pwd);
WiFi.config(0U, 0U, 0U);

which i found in this thread: https://stackoverflow.com/questions/40069654/how-to-clear-static-ip-configuration-and-start-dhcp

hideakitai commented 3 years ago

Ah, is your device a receiver? IP is not required to subscribe OSC. But sender should know the host name or IP of your device.

Closing this issue but please feel free to reopen if you still have any problem.