I'd like the yun to discover a local servers IP
(because a script on the yun is sending sensordata to that server and there shall be no need to configure static IPs or anything... "the yuns/sensors and the server shall automatically find eachother, when they are in the same network").
How could I achieve that?
My first idea was to store the MAC of the server in the sketch and run some script on the linino-side that could find the server in the local network...then somehow that script should pass the iP to the sketch.
Sea2605: I'd like the yun to discover a local servers IP
(because a script on the yun is sending sensordata to that server and there shall be no need to configure static IPs or anything... "the yuns/sensors and the server shall automatically find eachother, when they are in the same network").
How could I achieve that?
::::SNIP::::
Sea2605,
if you don't already know, the Yun uses a service called Bonjour
Read about it in this thread Seeing Yun in IDE Port menu. (See #7)
You might consider running this service on your local server.
jessemonroy650:
Sea2605,
if you don't already know, the Yun uses a service called Bonjour
Read about it in this thread Seeing Yun in IDE Port menu. (See #7)
You might consider running this service on your local server.
Jesse
few persons in this board include myself tried the same thing, try to install Bonjour client (nss-mdns ) at Yun. However it does not work. The reason is very odd.
The nss-mdns is either failed to compile or failed at run time due openwrt base on uClibc.
sonnyyu:
FYI:
OpenWRT is embedded linux.
Debian, Ubuntu, Redhat is desktop linux.
OpenWRT' s default C standard library is uClibc.
Debian' s default C standard library is glibc.
uClibc and glibc are only source but not binary compatible, that means you can not compile at Debian and run at OpenWRT directly.
In general uClibc and glibc is source compatible, but here is the exception.
sonnyyu:
few persons in this board include myself tried the same thing, try to install Bonjour client (nss-mdns ) at Yun. However it does not work. The reason is very odd.
The nss-mdns is either failed to compile or failed at run time due openwrt base on uClibc.
In general uClibc and glibc is source compatible, but here is the exception.
sonnyyu,
You may not be aware of this, but you do not need to install Bonjour, the service is already installed on the Yun.
On the Linux side of the Yun, you can find it running as boot Scripts, /etc/rc.d/S60dnsmasq & /etc/rc.d/S61avahi-daemon. The Bonjour service is also known as ZeroConf. Again, it is already running on the Yun.
To read about these two services you can read these links: