0

I want to send Java IOStreams between my Mobile(Android App) and the Raspberry Pi to control some lights etc. with my Android App later. I thought about using the Raspberry Pi somehow as an Access-point where I can connect to so that I can communicate between App and Raspberry Pi.

I tried hostapd but I wasn't even able to see the network in my network list, when it even started without errors. I used the EDIMAX EW-7811Un Wifi Dongle. I just found some documents for setting up a router, but all I want is to be able to send information between my later App and a Java Program on my Raspberry Pi. Is there a recommended way to realize my App to control the RPi?

0

I think you are confusing things here.

Creating an access point is a networking setup, it's not about publishing services on your local network. Hostapd will create an access point which is like a router but generally just extends WIFI for an existing network. If you do want an access point, you will need two connections for your pi. One for the network you are hosting, which is controlled by hostapd, and another for your connection to the internet. hostapd "bridges" the two connections, passing packets from one device to the other. You can find a very basic overview of the difference between routers, hubs, switches and access points here.

I believe what you want is simply to set up your pi as a server to accept commands from your android device, not an access point. In this setup, you would connect your pi to your internal network normally. Then you would publish services (e.g. a web server like apache). Take a look at OpenHab for some good examples. OpenHab also has an android app that is already working, and there are plug-ins for lots of common smart devices. There is also a guide for setting it up on a pi.

You are going to want to get familiar with some networking topics. In order for you to access your pi from outside your home network you will probably have to configure your router to forward the ports that OpenHab is listening on, and you will want to set up some kind of dynamic DNS. I use no-ip as it's free, but there are many great services available on the web.

Hope that helps!

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.