Digistump Forums
The DigiX => DigiX Support => Topic started by: pegasus44 on July 18, 2014, 06:59:24 am
-
I'm trying to write an app to communicate with my digix "server". Everything is working great but I want to make it a little more user friendly... Due to DHCP the digix does not always have the same address so I want my app to find it on the network on its own everytime I start it up (the app).
Anyone have any tips on the subject?
P.S. I know I can set a static ip for the digix :P I Still want to do it this way so it would be even easier to set up anywhere
-
How about if you have the DigiX listen on some specific, unlikely-to-be-in-use port? Your app could scan through the IP space of the network, attempting to connect to that port and listening for a specific response to identify your device.
Alternately, you could maybe use a dynamic dns service to give your device known hostname. I think namecheap.com offers that service, among others. I have no idea how hard this would be to implement, though.
-
That is one of the reasons, I work with openwrt on slightly bigger devices, like the TP-Link 703N or others. There I can use zeroconf aka bonjour, which is designed for exactly this issue.
With the current WiFi module, the network set of features is set by the manufacturer, and the hardware is too small, for boosting it.
This is the biggest advantage of the yun, which uses an openwrt like system on its Wifi module.
-
I kind of solved the isue... The app that is searching for the digix broadcasts (sends a http request to every availible ip on the network) and waits for pre-defined unique response programmed into the arduino. The solution sounds dumb and it probably is but it works and it works pretty fast too... It usualy takes only 3-5 seconds before it gets the needed ip...
Brute force once again saves the day :P