Remote control of a Linux device using Android

0

1

I like to remotely control (e.g.run a python program) my raspberry pi using my android phone. I found some discussion of using web socket, but that is more for the PI's GPIO control. Now is I like to run/stop/exchange data a python exe in PI from my Android phone. I found one Android App like this. Can somebody explain me what is the implementation idea behind? I roughly know I need to implement a web server on PI to interface the Android app through router. I have done port forwarding successfully, now I just need to know how to interact the exe program from Android app through 3G and router.

batuman

Posted 2014-04-14T15:06:26.180

Reputation: 131

Answers

0

I found my solution. I need to use SSH. I implemented JSch in my Android app and now I can run my program from my phone. Can exchange parameter as well. Thanks a lot for suggestions.

batuman

Posted 2014-04-14T15:06:26.180

Reputation: 131

0

The application you suggested should work 95%. You just have to get your RasPi up and running with OpenELEC(which is a version of the XBMC media center optimized for the Raspberry Pi) and install this app on your Android device and you should be good to go. Otherwise:

  1. Bluetooth can be a good communication protocol. However, VERY short-range.
  2. Hello, we have the Internet of Things now! Simply use Eclipse IoT and get up and running with Internet communication to your Raspberry Pi. That's what the Raspberry Pi is meant for- Internet-connected projects! And with Eclipse IoT, you don't need to understand a thing about communication protocols. ModBus, etc are all handled for you!
  3. As a modification of the previous method, you could use Flask, which is a micro framework for crating a basic server in Python. You can crate a server and access it through practically any device. There, you can provide all the controls you need.

Finally, to all those people who don't try to help from the information given to you, please try to help using the information the guy has given you! I know that feeling, when I need to complete and urgent project, and nobody bothers to answer my question cause they think I need to give the "complete information". Give the guy some help!

SmallDeveloper

Posted 2014-04-14T15:06:26.180

Reputation:

Many thanks. This is the info I am looking for. Let me explore on it. Thanks a lot. – None – 2014-04-14T15:39:46.627

I like your second point in your discussion. – None – 2014-04-14T15:45:58.150

I found out that I should implement ssh in my android app to remote access my pi and run a command like discussed here http://www.example-code.com/android/ssh_remote_command.asp. Found out that Eclipse IoT is an interesting topic and I should explore more. Thanks for the info. Once I can implement successfully, I will post again.

– batuman – 2014-04-16T12:58:54.440

0

If you have tethering available on your Android phone, this may work for you. It worked for me, I had the same question some time ago. Go here and check it out!

https://raspberrypi.stackexchange.com/questions/7810/ssh-from-android-to-rpi-using-usb

Essentially you use tethering and DHCP from the Pi to do some IP over USB type stuff, then you use SSH from your phone to SSH into the Pi over your tethered connection. Handy for some discrete Raspberry Pi work ;)

0xhughes

Posted 2014-04-14T15:06:26.180

Reputation: 135

Thanks, I'll explore all and will discuss soon, many thanks. – batuman – 2014-04-15T02:50:39.900