I am using udp at the moment in the first layer of my control and data aq system which I am porting from Nodes hosted on linux embedded or windowsPC. At the moment it seems. UDPserver.address() only provides the host IP adress on connected sockets. Until a connection is made it seems that the host adrress in the tcp/ip layers is not initialised. UDP.connect is also not supported at the moment (dont need it anyway) but a UDP connection will cause the local hostip to become correctly populated and server.address() will work ON my PC. Soon I will be implementing my tcp socket connections so I will come back to this problem then . As I assume tcpserver.connect is impemented and therefore this method will work. As I also have a dedicated (application) server in my system infrastructure it will be no problem in the future to obtain the IP address this way. However, for other applications using DHCP (most serious iot apps I think) it would be nice to know the IP at start up time, particularly if the module is roaming. Instead of implementing the interfaces part of the OS module I would suggest you just provide a private function call to pull this up from the underlying DHCP client. I'll be back.
Best posts made by sunshine-nick
This user hasn't posted anything yet.
Latest posts made by sunshine-nick
RE: get IP address