I want to build a mobile robot with android as a controller from long range, I think it's best to connect using wifi, not a bluetooth because it's too short range.

My problem is "how to connect my android phone app (DIY app) to the Raspberry Pi using WiFi only (no internet connection, no web), connect using IP and port only and control all Pi GPIO form android app".

After searching from any web, many people using web based connect or third party app but i want build app by android studio myself, I only a bit understand C and Java programming, not understand Python language.

  • 1
    If you need assistance troubleshooting your Android app, you may want to ask on Android StackExchange ... the Raspberry Pi robotics question is on topic here... However, it's better to start building something and then ask questions when you get stuck. Commented Nov 22, 2017 at 19:13

2 Answers 2


You can configure the wifi on the Pi to be an access point complete with a DHCP server. Then you can have your android device associate to that access point to establish connectivity. From there, it's totally up to your how to implement the app / server protocol. But you should have enough power on the Pi to run a small web service that the app can front-end to let you interact with the GPIO.

  • 1
    You can also do the same thing in reverse with most wifi capable Android devices -- this is what a "hotspot" is. It should not require the Android device be online or have a cellular connection.
    – goldilocks
    Commented Nov 22, 2017 at 20:43
  • i'm still confused, so i control gpio through web ? or maybe I can execute python gpio script via android command ssh ? my target is press 1 button trigger from android app and robot will execute all my sript sorry I am noob
    – PR J V
    Commented Nov 25, 2017 at 19:54

After searching, Jsch is answer to my project

  • 1
    Your answer will leave some wondering, "Why is it the answer?". Those who know Jsch will likely understand, but then they already knew. Therefore, as is, your answer doesn't help many people. I feel it could be improved by adding some detail, but of course that's entirely up to you.
    – Seamus
    Commented Sep 15, 2018 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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