Jump to content


Photo

Caanoo Usbnetwork V-1.0


  • Please log in to reply
12 replies to this topic

#1 Aiken

Aiken

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 130 posts

Posted 30 October 2010 - 01:00 AM

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

Attached Files


Edited by Aiken, 30 October 2010 - 01:50 AM.


#2 fishybawb

fishybawb

    Hired Geek

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1115 posts
  • Location:York, UK

Posted 30 October 2010 - 01:34 PM

http://www.gp32x.com/board/index.php?/topic/56634-usb-ethernet-with-stock-usb-cable/

#3 u9i

u9i

    Call me Uni

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 726 posts
  • Gender:Male
  • Location:Faroe Islands

Posted 31 October 2010 - 08:40 AM

There is no ssh, is there?

#4 ainu

ainu

    GP32 User

  • Members
  • PipPipPip
  • 31 posts

Posted 31 October 2010 - 12:10 PM

what about windows?

#5 joyrider

joyrider

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 586 posts

Posted 31 October 2010 - 12:26 PM

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)

#6 u9i

u9i

    Call me Uni

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 726 posts
  • Gender:Male
  • Location:Faroe Islands

Posted 01 November 2010 - 03:01 PM

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.

#7 monstercameron

monstercameron

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 176 posts
  • Gender:Male

Posted 22 November 2010 - 10:55 PM

on ifconfig -a, it shows usbnet0 with a ipv6 address, how do i ping this? or how do i set it up because the step by step instructions in the install.txt arent helping me!

#8 surdules

surdules

    Member

  • Members
  • PipPip
  • 3 posts

Posted 27 November 2010 - 04:41 PM

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

$ 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

$ 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 <img src='http://www.gp32x.com/board/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' />  TX bytes:90 (90.0 <img src='http://www.gp32x.com/board/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='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:

$ 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:

$ 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.

#9 gbytz

gbytz

    Member

  • Members
  • PipPip
  • 6 posts

Posted 07 April 2011 - 02:15 AM

I have the same problem (but Ubuntu 10.04). Any help?

#10 Reesy

Reesy

    GP32 Hardcore

  • GP Guru
  • 289 posts
  • Gender:Male
  • Location:Hampshire, UK
  • Interests:Xbox360, DIngoo, Caanoo.

Posted 09 April 2011 - 03:49 PM

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.

mapping hotplug
script grep
map usb0

iface usb0 inet static
address 10.0.0.1
netmask 255.255.255.0

auto usb0



#11 gbytz

gbytz

    Member

  • Members
  • PipPip
  • 6 posts

Posted 09 April 2011 - 09:44 PM

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.

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

#12 Reesy

Reesy

    GP32 Hardcore

  • GP Guru
  • 289 posts
  • Gender:Male
  • Location:Hampshire, UK
  • Interests:Xbox360, DIngoo, Caanoo.

Posted 10 April 2011 - 01:16 PM

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.

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.

#13 gbytz

gbytz

    Member

  • Members
  • PipPip
  • 6 posts

Posted 11 April 2011 - 12:18 AM

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.

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:
~$ sudo ping 10.0.0.2
connect: Network is unreachable

But I connect to my wireless network and try again I get this:
~$ 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:
~$ 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