Caanoo Usbnetwork V-1.0


Aiken

Member
Joined
May 27, 2004
Messages
130
Connect your Caanoo to your network using USB cable.
You will be able to ssh/telnet into the Caanoo, or even surf the Internet using Caanoo Web Browser and the USB cable provided with your Caanoo.

Step by step tutorial included. The tutorial only covers connection with a Linux PC.

It works with firmwares 1.0.6 and 1.5.0.

Feedback welcomed!
Aiken
 
http://www.gp32x.de/board/index.php?/topic/56634-usb-ethernet-with-stock-usb-cable/
 
Last edited by a moderator:
ainu said:
what about windows?
read the topic fishy posted, it contains all the info to get it working on windows... ssh is not needed sice you can use telnet all you need for that are the ini files availible on the archive, since there is a telnet deamon availible on the firmware's filesystem.. so just read the topic which got linked in this thread (ps use putty.exe on windows to connect to your caanoo, works better imo)
 
Last edited by a moderator:
I asked about ssh because as far as we both know it is not available, but the original post mentioned it, so i was wondering if he found out something we don't know :)

SSH would be nice because it would mean i could mount the filesystem locally... but i already do that with samba, i guess that is fine.
 
Aiken said:
Step by step tutorial included. The tutorial only covers connection with a Linux PC.

I am not able to get this to work:

- I am using a Caanoo with firmware 1.5.0 connected to a Linux PC running Ubuntu 10.10

Code:
$ uname -a
Linux myhost 2.6.35-23-generic #40-Ubuntu SMP Wed Nov 17 22:15:35 UTC 2010 i686 GNU/Linux

- The Ubuntu install is fresh, no hacks or other unusual modifications
- I added the suggested configuration to /etc/network/interfaces, installed USBNet on my Caanoo
- I connected the Caanoo to my PC, closed the "Usb Connected" window on the Caanoo, then ran USBNet on the Caanoo
- Nothing happens on the PC
- If I run "sudo ifconfig -a", I see the usb0 network adapter, but it doesn't have an "inet" address and I can't ping 10.0.0.2

Code:
$ ifconfig -a
eth0      <removed> 

lo        <removed>

usb0      Link encap:Ethernet  HWaddr 8e:11:d3:ae:25:c5  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:90 (90.0 B)

- In the network GUI icon (upper-right corner), under the category "Linux 2.6.24/lf1000 udc Caanoo Ethernet" it says "device not managed"
- The usbnet kernel module appears to be loaded:

Code:
$ sudo lsmod | grep usbnet
usbnet                 17312  3 zaurus,cdc_subset,cdc_ether

I searched for related topics/suggestions on-line, and noticed that other projects that use "allow-hotplug usb0" use a different formatting for the configuration in /etc/network/interfaces, as follows:

Code:
$ cat /etc/network/interfaces 
auto lo
iface lo inet loopback

allow-hotplug usb0
mapping hotplug
	script grep
	map usb0
iface usb0 inet static
	address 10.0.0.1
	netmask 255.255.255.0
	up iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.2 -j MASQUERADE
	up echo 1 > /proc/sys/net/ipv4/ip_forward
	down iptables -t nat -D POSTROUTING -o eth0 -s 10.0.0.2 -j MASQUERADE
	down echo 0 > /proc/sys/net/ipv4/ip_forward

I tried this different formatting but, as I expected, it didn't change anything.

Any help/suggestions would be welcome.

Thanks!

Razvan.
 
Last edited by a moderator:
Mine works now, I had to add auto usb0. Note, it still appears as "unmanaged" on the network manager gui in Ubuntu but if you ping 10.0.0.2 you'll see everything is working as expected.

Code:
mapping hotplug
script grep
map usb0

iface usb0 inet static
address 10.0.0.1
netmask 255.255.255.0

auto usb0
 
Reesy said:
Mine works now, I had to add auto usb0. Note, it still appears as "unmanaged" on the network manager gui in Ubuntu but if you ping 10.0.0.2 you'll see everything is working as expected.

Code:
mapping hotplug
script grep
map usb0

iface usb0 inet static
address 10.0.0.1
netmask 255.255.255.0

auto usb0

Sorry, i'm not really an expert about this things. Could you please explain me what you did to make it work? I'm new with linux.

I have to copy that into /etc/network/interfaces ?

TIA
 
Last edited by a moderator:
Yes sorry I should have made that more clear. On your ubuntu machine you have to append the following to your /etc/network/interfaces file. Once the changes to the file have been saved, Ubuntu will pick up the change straight away. So the next time you plug your usb cable in it should all start to work.

Code:
allow-hotplug usb0
mapping hotplug
script grep
map usb0
iface usb0 inet static
address 10.0.0.1
netmask 255.255.255.0
auto usb0
up iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.2 -j MASQUERADE
up echo 1 > /proc/sys/net/ipv4/ip_forward
down iptables -t nat -D POSTROUTING -o eth0 -s 10.0.0.2 -j MASQUERADE
down echo 0 > /proc/sys/net/ipv4/ip_forward

NOTE: I've updated the text to include all of the other stuff Aiken originally stated. The only additional change is the "auto usb0" line which will automatically bring the network up when you connect the usb cable.
 
Reesy said:
Yes sorry I should have made that more clear. On your ubuntu machine you have to append the following to your /etc/network/interfaces file. Once the changes to the file have been saved, Ubuntu will pick up the change straight away. So the next time you plug your usb cable in it should all start to work.

Code:
allow-hotplug usb0
mapping hotplug
script grep
map usb0
iface usb0 inet static
address 10.0.0.1
netmask 255.255.255.0
auto usb0
up iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.2 -j MASQUERADE
up echo 1 > /proc/sys/net/ipv4/ip_forward
down iptables -t nat -D POSTROUTING -o eth0 -s 10.0.0.2 -j MASQUERADE
down echo 0 > /proc/sys/net/ipv4/ip_forward

NOTE: I've updated the text to include all of the other stuff Aiken originally stated. The only additional change is the "auto usb0" line which will automatically bring the network up when you connect the usb cable.

Thanks for your help Ressy, but it's still not working for me :(

I noticed one thing, but I don't kwon if it is relevant. I have a wifi connection through a router and if I don't let Ubuntu to connect when it start up and I try to ping the canoo I get this:
Code:
~$ sudo ping 10.0.0.2
connect: Network is unreachable

But I connect to my wireless network and try again I get this:
Code:
~$ sudo ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
And it get stuck there until cancel it pressing <Ctrl>+C.

I read the ping man pages a little bit and I thought maybe i have to specify the interface to ping, so I tried whit "ping -I usb0 ..." and I get this:
Code:
~$ ping -I usb0 10.0.0.2
PING 10.0.0.2 (10.0.0.2) from 192.168.0.12 usb0: 56(84) bytes of data.
From 192.168.0.12 icmp_seq=1 Destination Host Unreachable
From 192.168.0.12 icmp_seq=2 Destination Host Unreachable
From 192.168.0.12 icmp_seq=3 Destination Host Unreachable
From 192.168.0.12 icmp_seq=4 Destination Host Unreachable
...
And so on so I have to stop it with <Ctrl>+C again.

My caanoo's firmware is 1.5.0 but it's a kind of "downgrade". I had upgraded my 1.0.7 original firmware to 1.6.0 the first time I try to use usbnetwork, but I make a downgrade after I read this thread.

Both the Caanoo and PC show a usb0 interface, but in my PC it doesn't show the specified address (10.0.0.1), is that ok?

Thanks for your help and patience :)

And sorry for my poor english
 
Last edited by a moderator:
Back
Top