11

Idea: create a remote control for your android phone.

Why: I like listening music on my phone in a dock station with speakers connected. Now sometimes I want to turn the volume up/down, change the song, etc. So I need to unlock the phone, locate app that is playing music (Music player, internet radio app, etc.). Sometimes I manage to undock the phone or just mess something up and generally this s*cks.

So I would like to control my phone (on a data connection, not wifi) from the laptop (on wifi).

I had investigated couple of approaches and would like to get some recommendations on them:

  1. Use XMPP. This is nice as there a lots of free XMPP services I can use. Two libraries (both based on smack) that I tried work just fine (Flow aSmack port and Beem smack port). I could automatically create new user on device and present some id/password combination that I (user) would enter on a desktop side to link both devices.

  2. Use JXTA. Should be the next real deal but could be an overkill. I would imagine running a rendezvous&relay server somewhere (need to get hosting to work around firewall/NAT) and creating a peer group protected with password. Use device unique id and password (withing group) to link to the desktop application. (A great eBook explaining p2p and JXTA can be downloaded from here).

  3. Use C2DM. Could be the answer, but notification delivery sometimes can take more then couple of seconds to deliver and there would be no feedback mechanism.

So far first solutions looks like a lot easier choice. Create custom extension or just create chat between both endpoints and use that for relaying commands/messages. But I wonder if I would be abusing XMPP system?

JXTA sounds great, but from all the reading I done it is apparent that it is designed for group communication and service sharing and not a solution for connecting two endpoints.

What do you guys think? I welcome all suggestions too.

UPDATE I do not want to remote to a phone and interactively control it. I want to establish a connection (socket connection) between laptop and phone even if both of them are on different networks secured behind firewalls, routers. With this I could define a protocol to issue commands to the phone (lower volume, mute, start app, etc.).

UPDATE 2 I'm giving JXTA a shot. It is a nice solution but lack of documentation is a bit of a downer. Got VPS FreeBSD server to test RDV/relay side of things. I keep updating this question further as it may be helpful for others.

UPDATE 3 Some more reading:

UPDATE 4 So far I did not have enough time to further continue my project. I did find an interesting project. At the moment project owners are re-writing their library, you can track their progress here.

Community
  • 1
  • 1
Audrius
  • 2,836
  • 1
  • 26
  • 35
  • is it possible to utilize your laptop's bluetooth? haven't thought about or tried it before, until i read your question. – josephus Oct 28 '11 at 16:37
  • It would work, but I do not want to use bluetooth. My idea is that if I could use network to achieve this kind of remote, then later on it would be possible to augment developed solution to all kinds of cool usages. – Audrius Oct 28 '11 at 16:54
  • Use C2DM with a custom controlling app? Wouldn't be too difficult or set up SMS if you want near-realtime – Joe Simpson Nov 04 '11 at 15:52
  • @Joe I have never dealt with SMS gateways. Wouldn't it cost a fortune? – Audrius Nov 08 '11 at 14:01
  • It depends. If it's for a personal pet project you can keep an eye on SMS costs really easily. C2DM still costs but has a free quota but less reliable – Joe Simpson Nov 08 '11 at 20:44
  • There are already a number of competing apps doing this sort of thing, have you checked if any of them are open source? – Vala Aug 16 '12 at 15:56
  • @Thor84no The ones I checked use WiFi for direct connect and a "proxy" server to relay all data on mobile data connection. In my case I want to be able to make a direct connection from phone to PC. I do not mind using server for initial discovery. Do you have some particular project/app in mind? – Audrius Aug 17 '12 at 16:58
  • @Audrius I can't remember which apps I used, but there were 2 I used around a year ago that basically just start a web server on your phone and you connect to it however you want (wifi, or USB with localhost forwarding usually, but also potentially 3g). I might see if I can dig up the names. – Vala Aug 19 '12 at 14:34

2 Answers2

1

why do not you try installing VNC server on machine and then use VNC client on laptop to access mobile

Saurabh
  • 7,894
  • 2
  • 23
  • 31
  • Can you issue commands through VNC that then can be intercepted by client o perform some operations? – Audrius Oct 30 '11 at 23:36
  • Thing is I do not want to have an interactive remote connection. And this doesn't solve firewall/router traverse issue. – Audrius Oct 31 '11 at 13:09
0

Mobile Shell (Mosh) maybe just the tool you are looking for. I have been looking for a good project to use Mosh, your idea seems pretty interesting :)

bell0
  • 110
  • 1
  • 6
  • It's a shell, I would still need to solve NAT traversal issue. Thanks for an interesting link though. – Audrius Aug 17 '12 at 17:10