0

I am doing a project where a Raspberry pi zero collects some data from a sensor and displays it through a self hosted web server.

Now,the usual way you access a webpage in a raspberry is to just type its IP in a web browser, right? But the process of discovering the IP assigned to a raspberry from an android phone with its wifi hotspot enabled or usb modem is not an easy task for most users and usually requires downloading third party not so trustworthy apps. And in most cases the raspberry will be used in the field with no access to a monitor to just check the IP displayed on the terminal at boot.

Is there any way I, as the developer, can make it easier to find and connect to the raspberry from a phone that is sharing its internet with it?

EDIT: Also, before considering setting an static IP. In my exprerience so far different phones create a different networks when sharing their connections, one will be 192.168.133.X for example, while other will be 10.42.0.Y or 192.168.120.Z. Dealing with those changes in the network aspect of the IP make it so I don't know whether a static IP is even possible.

1
  • The Raspberry Pi with Raspberry OS has DNS resolving and mDNS enabled to to address it by network name. So your question is mainly a question how can android use this. Maybe android.stackexchange.com is a better place to ask? – Ingo Oct 9 '20 at 17:30
0

In many public places, when you connect to their 'free' wifi network, you often get routed to a sign up/conditions page... use the same tech...

Make the pi an access point...

Anyone wanting to read the data just needs to join the Pi's network and have the data blasted at them.

I don't know precise details of the protocol to do this (it will be out there somewhere...) I guess the access point/server just routes all traffic (regardless of IP address) to itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.