raalst
Posts: 7
Joined: Fri Oct 26, 2012 8:12 pm

raspi-usb-tablet terminal emulator

Fri Oct 26, 2012 8:25 pm

Hi all,

I saw several terminal solutions mentioned here, but mostly via TCP/IP.
my el-cheapo tablet has an usb and wifi, but my raspi has only usb (need to buy wifi dongle
as extra, right ?).

I would love to be able to just plug in my raspi usb host into my tablet usb device and utilize the
screen of the tablet.

first idea was to write an android app and some code in the raspi, but it seems rather complicated.
otoh, xservers/clients seem available for android now. ( I do need a server on the android to use the
android screen, right ?), so that leaves to bridge tcp/ip over USB.

big Q : does anybody know how to go about sending tcp/ip over an USB connection ?
Or is this the wrong approach for some reason.

Thanks for any education/enlightenment you could provide !
Regards,
Ronald van Aalst

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: raspi-usb-tablet terminal emulator

Fri Oct 26, 2012 11:01 pm

tcpip over serial is an age old problem

you need a ppp or slip solution
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

raalst
Posts: 7
Joined: Fri Oct 26, 2012 8:12 pm

Re: raspi-usb-tablet terminal emulator

Sat Oct 27, 2012 10:03 am

I made a bit of progress, though only google-wise...

there is something called "reverse tethering" voor smart phones, thus android.
also, there is a linux module "usbnet" that does tcpip over usb.

no need for serial.

now to root my android tablet...

Geoffrey Williams
Posts: 4
Joined: Sat Oct 06, 2012 7:56 pm

Re: raspi-usb-tablet terminal emulator

Sat Oct 27, 2012 12:55 pm

Please let us know how you get on. I would like to be able to use my android tablet as a screen for my raspi. I am currently using a small 4.5" monitor intended for use with a camera for an in-car reversing/rear-view system. I am using composite video into a PAL video monitor and the readability is ok but less than desirable! :-)

raalst
Posts: 7
Joined: Fri Oct 26, 2012 8:12 pm

Re: raspi-usb-tablet terminal emulator

Sun Oct 28, 2012 1:55 pm

I have rooted my tablet, but the obvious reverse tethering apps from the google play market
either complain about missing bits in the kernel of the android, or require the raspi to run software (so, no true TCP/IP, I guess).
My android is an old and cheap gingerbread device, so no usb host mode, just a device.

I'm now studying the android adb, as it claims to be able to do port forwarding. still, if this is enough to do generic tcp/ip over it, I'm not sure.

another puzzling fact is that while the droid imitates a remote disk, what do I have to do to suggest it offers a serial or network connection over that USB ? all the more puzziling because adb does both.
is the code of the adb open to inspection ? and the code of the deamon running in the android ?
is the adb protocol published ?

this is quite a learning experience, just to get myself a decent portable screen (without having to bolt wifi on top of the raspi).

any opinions on this welcome !

brs
Posts: 70
Joined: Fri Aug 17, 2012 9:27 pm
Location: Zurich

Re: raspi-usb-tablet terminal emulator

Sun Oct 28, 2012 3:00 pm

It was surprisingly easy to enable USB networking to my stock Android phone, as it supports USB tethering. It's running Android 4.1 - no idea when this option was introduced, but I think tethering has been there for at least a year or so. And I don't know if this is available on Android tablets.

After selecting USB tethering (Settings -> Wireless & networks -> Tethering & portable hotspot -> USB tethering). After enabling this option, an interface usb0 appears on the Pi. Android tethering runs a dhcp server, so "sudo dhclient usb0" most easily configures the proper address and routing (or more permanently add the line "iface usb0 inet dhcp" to "/etc/network/interfaces.)

Michael Meissner
Posts: 48
Joined: Tue Jan 17, 2012 1:42 pm
Contact: Website

Re: raspi-usb-tablet terminal emulator

Sun Oct 28, 2012 3:47 pm

brs wrote:It was surprisingly easy to enable USB networking to my stock Android phone, as it supports USB tethering. It's running Android 4.1 - no idea when this option was introduced, but I think tethering has been there for at least a year or so. And I don't know if this is available on Android tablets.
Note, with more recent phones, it can depend on your service provide whether you get tethering for free. On my old LG Optimus T (via t-mobile), I got tethering for free (the Optimus T ran 2.2/Froyo). When I upgraded to the Samsung Galaxy S II, I needed to pay $5/month to enable it. I think there is an initial grace period, where it might work for 1/2 hour or so, and then the phone will shut down tethering until you pay for it. Obviously for rooted devices, you might be able to by-pass this restriction.

According to wikipedia, Froyo was the first release to add tethering: http://en.wikipedia.org/wiki/Android_Fr ... .2.x_Froyo
:geek:

raalst
Posts: 7
Joined: Fri Oct 26, 2012 8:12 pm

Re: raspi-usb-tablet terminal emulator

Sun Oct 28, 2012 10:06 pm

nice ! my android version is 2.3.2 (i think) so gingerbread. pity, as the modern versions are
far more complete, as you show here.

I used my home wifi/wired network to get the raspi and the tablet talking plain tcpip.
( circumventing the fact that raspi does wired and tablet only wifi, and not using the usb)

then, I installed an Xserver and ssh client on the android tablet.
Now, from the tablet I can reach the raspi, then on the raspi "export DISPLAY=<ip of tablet>:0.0"
then "lxde"
and voila, the large berry appears on the tablet. But that is about it.

Since RandR is missing in the tablet, the raspi cannot know the size of the screen.
I hope to get it working a bit more through manually configuring X11 settings on the raspi.

Metatronin
Posts: 55
Joined: Sat Aug 04, 2012 5:19 am

Re: raspi-usb-tablet terminal emulator

Sun Oct 28, 2012 11:08 pm

Tightvnc can export specific desktop sizes to exactly match your tablet screen. The tablet then makes contact with the rpi through an android vnc client app.

raalst
Posts: 7
Joined: Fri Oct 26, 2012 8:12 pm

Re: raspi-usb-tablet terminal emulator

Mon Oct 29, 2012 5:42 am

Thanks ! I'll try that one before diving into X11 config hell :roll:

brs
Posts: 70
Joined: Fri Aug 17, 2012 9:27 pm
Location: Zurich

Re: raspi-usb-tablet terminal emulator

Mon Oct 29, 2012 7:14 am

raalst wrote: then, I installed an Xserver and ssh client on the android tablet.
Now, from the tablet I can reach the raspi, then on the raspi "export DISPLAY=<ip of tablet>:0.0"
then "lxde"
and voila, the large berry appears on the tablet. But that is about it.
Would you mind sharing which Xserver and ssh apps you are using on Android?

raalst
Posts: 7
Joined: Fri Oct 26, 2012 8:12 pm

Re: raspi-usb-tablet terminal emulator

Mon Oct 29, 2012 7:16 pm

I use Connectbot for ssh, and an X server
called "X server" (I ain't kidding you, its by Darkside Technologies Pty)
but I now will try with VNC instead of X11

my tablet is a "TomTec game 7", sold in a toy store.

brs
Posts: 70
Joined: Fri Aug 17, 2012 9:27 pm
Location: Zurich

Re: raspi-usb-tablet terminal emulator

Tue Oct 30, 2012 7:33 am

raalst wrote:I use Connectbot for ssh, and an X server
called "X server" (I ain't kidding you, its by Darkside Technologies Pty)
but I now will try with VNC instead of X11

my tablet is a "TomTec game 7", sold in a toy store.
Thanks for the pointers - last time I checked there was no X server app for Android available yet.

raalst
Posts: 7
Joined: Fri Oct 26, 2012 8:12 pm

Re: raspi-usb-tablet terminal emulator

Tue Oct 30, 2012 11:54 am

I got tightVNC to work with a Wise VNC client for my Tablet.
The androidVNC kept saying "connection refused" but that is probably some error of mine in specifying the second x server on the raspi.
( <ip>:1.0 instead of the default <ip>:0.0, I understand this is encoded into the portnumber by adding one ? so I tried <ip>:5901 ipv <ip>:5900 )

Return to “Other projects”