Удаленное управление устройством Linux с помощью Android

953
batuman

Мне нравится удаленно управлять (например, запускать программу на python) моим Raspberry Pi, используя мой телефон Android. Я нашел некоторое обсуждение использования веб-сокета, но это больше касается управления GPIO в PI. Теперь мне нравится запускать / останавливать / обмениваться данными на Python exe в PI с моего телефона Android. Я нашел одно приложение для Android, как это . Может кто-нибудь объяснить мне, что за идея реализации? Я примерно знаю, что мне нужно реализовать веб-сервер на PI для взаимодействия приложения Android через маршрутизатор. Я успешно провел переадресацию портов, теперь мне просто нужно знать, как взаимодействовать с программой exe из приложения Android через 3G и маршрутизатор.

0

3 ответа на вопрос

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!

Большое спасибо. Это информация, которую я ищу. Позвольте мне исследовать это. Большое спасибо. 10 лет назад 0
Мне нравится ваш второй пункт в вашей дискуссии. 10 лет назад 0
Я обнаружил, что я должен внедрить ssh в моем приложении для Android для удаленного доступа к своему пи и запустить команду, как описано здесь http://www.example-code.com/android/ssh_remote_command.asp. Выяснилось, что Eclipse IoT - интересная тема, и я должен изучить больше. Спасибо за информацию. Как только я смогу выполнить успешно, я опубликую снова. batuman 10 лет назад 0
0
0xhughes

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 ;)

Спасибо, я все разберу и скоро обсудим, большое спасибо. batuman 10 лет назад 0
0
batuman

Я нашел свое решение. Мне нужно использовать SSH. Я реализовал JSch в своем приложении для Android, и теперь я могу запускать свою программу со своего телефона. Можно также обменять параметр. Большое спасибо за предложения.

Похожие вопросы