How to connect two tablets over USB

sicvolo

Member
May 28, 2011
18
2
First, why:
I own two 7024's that I am using as a part-time car headrest entertainment system. Heck, they are so cheap, buying a dedicated car video just does not make sense. Cobys work great for that purpose, great resolution (for a car), have games and music. There is only one piece I found missing - simultaneous video playback on both tablets.

Getting this working presents two challenges:
* A fast, stable, always ON connection between the tablets.
* A master/slave video playback software, either streaming or syncing

Glad to report, I've solved the first issue, that I'll describe here. Be warned this is not for the faint of heart and right now is fully manual. If you find it helpful I might work on automating the link.

Now, how:
The idea is simple - use the android debugging bridge to forward TCP ports between two systems over USB. A USB networking in a sense.

1. Pick a tablet to be the slave. It must be rooted. Get the adb client compiled for android from here, unzip, upload it to the slave /system/xbin ("adb push ...") and make executable (adb shell chmod 755...). Get ConnectBot from the market to access the console.
2. Put the slave into the USB Host mode, disable USB debugging on it. On the master, use USB device mode and enable USB debugging.
3. Connect the master and the slave using a miniUSB-USBfemale and USBmale-miniUSB that came with the tablet.
4. Now the tough part, typing shell commands on the tablet. You can make it a bit easier by using a USB hub and connecting a keyboard and a mouse together with the other tablet.
On the slave start ConnectBot for the localhost. Type the following and look for your master's BUS# and DEV#.
Code:
less /proc/bus/usb/devices
Record both. Note, these numbers change when you re-plug USB.
Now, on the slave:
Code:
su
mkdir -p /dev/bus/usb/001/
ln -sf /proc/bus/usb/[BUS#]/[Dev#] /dev/bus/usb/001/001
5. Test. On the slave run 'adb devices'. It should show your master in the list.
6. Forward slave ports to the master. run 'adb forward tcp:123 tcp:234'. Now you can use localhost:123 on the slave to reach out to the master port 234 over USB.
Now, if your kernel is RNDIS enabled you could route all network connections over the usb0 interface, essentially creating a cross-over network. Stock Kyros unfortunately does not support RNDIS so I've not tested it.

The ADB USB speed is not bad, averaging 2.5MB/sec after protocol overhead.

I did some research on the second issue, went several routes (mplayer, VLC and UPNP) and, sadly, found nothing that currently works. If you know of any working video streamer/sink pair or a sync peer for android, let me know.
 
Last edited:

th0mb0y

Member
May 2, 2011
19
5
Wow, intense. I bought my tablet for the same reason. It is my daughter's entertainment system for long car rides. Where did you get the VLC .apk?
 

beastman

Member
May 8, 2011
351
7
I just searched in the market. Littleplayer looks the best imho. I did not try want of them. I just searched for vlc.

Sent from my GTablet using Android Tablet Forum
 

sicvolo

Member
May 28, 2011
18
2
Where did you get the VLC .apk?
Some folks at xda developers forum compiled it from the source, but there are two problems with it. First it does not show any video, but even worse it does not seem to have a stream server option. It seems to be a really cut-down version of the VLC, so I do not keep high hopes for it when the official port comes out.
 

sicvolo

Member
May 28, 2011
18
2
Littleplayer looks the best imho. I did not try want of them. I just searched for vlc.
Can you stream from one Littleplayer on android to another on android? From my experience most of the streaming players can only interact with a PC version, either streaming to or streaming from. For example "VLC direct" boasts the streaming feature but lacks a web host, making it impossible to stream from android to android.
 
Top