maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   HOW-TO: USB Sharing a PC Internet connection to the tablet (https://talk.maemo.org/showthread.php?t=25091)

anidel 2008-11-20 16:23

HOW-TO: USB Sharing a PC Internet connection to the tablet
 
Hi,

I am trying to share my work PC's internet connection to the N810 via the provided USB cable, with no external accessory.
From what I understood googling around the world, Maemo and here these should be the steps to do (as root on the tablet and on Linux/Unix machines, as Power user on Windows and Mac):

ON THE TABLET (Running Diablo 4.2008-35)

1) update the libicd-network-dummy package from the current v11 to v12 present in the repository (as for bug #3306)

2) check /etc/network/interfaces, it should have:

Quote:

auto usb0
iface usb0 inet static
address 192,168.2.15
netmask 255.255.255.0
gateway 192.168.2.14
(someone uses "up route add default gw 192.168.2.14" as last line, the result should be the same)

3) Load the USB ether module:

Quote:

insmod /mnt/initfs/lib/modules/2.6.21-omap1/g_ether.ko
(do it twice, the first time it conflicts with g_file_storage)

4) load up the USB interface:

Quote:

ifup usb0
These steps should be enough to have a Dummy internet connection directed over the USB cable.
We should configure the PC to actually share the Internet connection.

ON AN APPLE MAC HOST

1) it should suffice to go to Sharing->Internet and share the active connection to the ethernet device corresponding to the tablet

NOTE: I DIDN'T TRY THIS ONE YET, it just came up to my mind and wrote it here. It should work, I'll test it later at home and change this entry.
NOTE1: I just remembered I have my Mac with me today at work :-D
Tried, it recognized the tablet as ethernet device, but of course the tablet needs to be configured to look for a dynamic IP or the Mac has to be setup with a static IP (if this is even possible).
Gotta try later...I'll keep the post update.

ON A WINDOWS HOST

1) This old wiki http://maemo.org/community/oldwiki/usbnetworkingwinxp/ should help. I'll try to recap those steps here.

ON A LINUX MACHINE

It's a bit more complicated as it depends how you're firewall (if any) is configured and depends a lot from the distribution you're using.
More or less, on my Ubuntu 8.04:

1) Check/edit the /etc/network/interfaces

Quote:

auto usb0
iface usb0 inet static
address 192.168.2.14
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
up echo 1 > /proc/sys/net/ipv4/ip_forward
up iptables -P FORWARD ACCEPT
up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24
down echo 0 > /proc/sys/net/ipv4/ip_forward
down iptables -t nat -F POSTROUTING
ONLY attach the tablet to the PC when everything is set up. Not before.

The main issue here is.. it doesn't work to me.
Probably because I miss a few packages (most notablet the updated libicd-network-dummy package).

As, of course, I do not have an Internet connection on the tablet at the moment, I am going to update and try to share my connection from the Mac tonight.

I will update this HOW-TO.

In the meanwhile I hope someone could help pointing up what I am doing wrong with my current configuration (N810 plain 4.2008-35 and plain Ubuntu 8.04).

Thanks!

PS: there are more sophisticated solutions (like using DHCP to have the tablet on the same network as the PC, so to be able to SMB share data), but I prefer to stick to the simple solution for now.
If this HOW-TO proves useful, we can update it.

The info on the web is sparse, rare and looks like it's outdated.
Mainly it refers on how to let developers access the tablet via USB so to have SSH on it and share development files.
Some other refers only to Maemo-PAN issues, but I couldn't fine anything on how to browse the Web from the Tablet connected to a PC via USB.

Anidel

gonzo1082 2008-11-20 17:06

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
AWesome!! i've been looking for this... is there any way to package this so it's activated from the status bar?

anidel 2008-11-21 09:26

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
I am still testing this stuff.. it doesn't work yet, but these look like they are the steps to be taken in order to share it.

Yesterday evening I forgot to update my tablet, I'll do tonight.

Any help/hint is welcome!

gonzo1082 2008-11-21 16:50

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
awesome stuff... Is the connection supposed to say USB in connections manager? i have a dummy and USB. Also, if i'm using a windows machine would the device be recognized as an rndis device? I haven't done any trials yet. i'm just trying to see what i should be looking for.

anidel 2008-11-24 10:54

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
I also noticed USB and Dummy, they should both work.
But I couldn't make it work yet. The Linux machine pings to the tablet, but not the other way around.
No Internet has been shared yet... not an Mac either.

I think Windows should see it as an rndis device, yes.

If tonight my GF give me 30mins to test this stuff I could test it on the Mac and on Windows (inside Parallels).

gonzo1082 2008-11-28 19:15

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
Any developments? I don't know a lick about linux and programming. i wish i could help, i just read the how-tos and cross my fingers.

anidel 2008-11-28 23:13

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
Yeah I am ... can't look at it the time I'd want to, but every now and then I give it a try.

No progress tho.. something I'm missing...

rps 2008-12-02 12:14

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
Worked for me on Linux, but recently had some problems with the dummy AP (not sure of the current status) - the connection itself works. For Windows, there is an open bug (search for RNDIS in maemo bugzilla).

Regis 2008-12-02 13:23

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
Very interesting post anidel, thanks.

In my case I don't need the pc to actualy share it's internet connection. All I need is the possibility for one of my application on the PC to communicate in TCP/IP to another of my application on the N800 thru the USB cable. Do you think it would work ?

gonzo1082 2008-12-04 00:09

Re: HOW-TO: USB Sharing a PC Internet connection to the tablet
 
any luck with windows Anidel?


All times are GMT. The time now is 13:28.

vBulletin® Version 3.8.8