Caanoo / WIZ Howto: Wiz Usb-Ethernet With Stock Usb Cable


Excellent, Mies. The busybox 'telnetd' built-in to the Wiz wants to be run out of inetd; it takes control of stdin and stdout rather than listening on a network socket. Probably telnetd and ftpd are all that are really necessary over a private USB connection...

glossywhite said:
Sooo... for a n00b... wtf is "tz" format?. Run this by me again please - how does one go about installing and running this on the Wiz, please?.

[EDIT] never mind - unpacked it :)

Because you said you are writing a review, I want to make it clear that in its present state the USBSerial and USBNetwork packages are intended for homebrew/developers, and not for the "average user." As I said in my original post, some horizontal integration would be necessary (the host/laptop/desktop would have to be configured to bridge the networks, something it would not normally do), so probably the average user will not be using their Wiz in an on-the-Internet capacity until the USB host bridge inside the Wiz is exposed via a different kind of cable or attachment (there have been some photos from GPH recently of such a thing), something that into it you would plug a regular Wifi or physical Ethernet dongle.

Hopefully you are only using this facility either to sate your previously disclosed curiosity in regards to the Wiz' USB transfer performance, or to search /proc for hardware or configuration details to include in your article.
 
Last edited by a moderator:
hcf said:
Excellent, Mies. The busybox 'telnetd' built-in to the Wiz wants to be run out of inetd; it takes control of stdin and stdout rather than listening on a network socket. Probably telnetd and ftpd are all that are really necessary over a private USB connection...

glossywhite said:
Sooo... for a n00b... wtf is "tz" format?. Run this by me again please - how does one go about installing and running this on the Wiz, please?.

[EDIT] never mind - unpacked it :)

Because you said you are writing a review, I want to make it clear that in its present state the USBSerial and USBNetwork packages are intended for homebrew/developers, and not for the "average user." As I said in my original post, some horizontal integration would be necessary (the host/laptop/desktop would have to be configured to bridge the networks, something it would not normally do), so probably the average user will not be using their Wiz in an on-the-Internet capacity until the USB host bridge inside the Wiz is exposed via a different kind of cable or attachment (there have been some photos from GPH recently of such a thing), something that into it you would plug a regular Wifi or physical Ethernet dongle.

Hopefully you are only using this facility either to sate your previously disclosed curiosity in regards to the Wiz' USB transfer performance, or to search /proc for hardware or configuration details to include in your article.

I am a hacker and developer - I am doing this for my *own* interest, nothing to do with the review. I am more than aware of the capabilities of the "average user". I wish to telnet into the device, which is my reason for doing this, not that it is of any concern to you, really.
 
Last edited by a moderator:
Should be trivial, initially I was wondering if the "Network" package should be distinct from the "telnet" "ssh" or etc packages. Now that I've thought about it, probably they shouldn't be distinct...this module is really only usable by developers, regular users aren't going to want to setup a virtual ethernet bridge in their host computers to put the Wiz online for multiplayer games. We'll need the Wiz's host bridge for real ethernet dongles.

When I get some time I'll put Mies busybox/telnetd in.
 
That would be great .. I imagine just hitting a single GPE and then ssh'ing/telnet'ing into the Wiz for hacking, then hitting the GPE again to turn it off when necessary .. do'able to make the same GPE toggle, no?
 
KungPhoo said:
Windows Vista.
Where do I get the "OpenWiz Ethernet" driver from?

I was not able to find working drivers (windows 7 64 bit) - already opened another thread to discuss ~2 weeks ago. i was searching more than a few days, tried different drivers from different producers, but i had no luck. the only thing i was able to find was a working demo driver for the serial connection. the major problem with the ethernet module is, that the wiz's usb device controller does not have enough 'endpoints' to fully support RNDIS (which is a microsoft protocol).

the threads where i started discussing about ether/serial modules...
ethernet discussion - http://www.gp32x.de/board/index.php?/topic/50557-g-ether-rndis-windoze/
serial discussion - http://www.gp32x.de/board/index.php?/topic/50579-usb-serial-windows/
 
Last edited by a moderator:
Hi there,

I am new here and no coder or developer, so sorry for meddling.

I just find it great how easy it is to configure the ethernet bridge with Linux.
(Once you found out how, anyway.)
Thanks hfc and Mies for making it possible.

The ethernet bridge can be set up with bridge-utils / brctl.
You have to be aware of the static IP address. DHCP doesn't work here.

Setting up the bridge on the host both USB0 and eth* must to have the same IP range.
With any other config I threw myself off the network repeatedly.
If you are using a different range than 10.0.0.* you have to change the IP address in hfc's script.
That is what I did - only far too late.
You apply the same IP address to the bridge br0 that you nomally apply to eth*.

Then you add the route to your gateway via telnet at the WIZ's end and that's it.
I just sent a ping to Yahoo to see it working.

If there is anybody developing a game or any other program with network function I would be there to test it.

Kasi
 
Thanks to hcf, Mies, Kasi and all :)
for these great tips!

kasi:
I tried and it worked well.
But it is simpler to just use the GUI front-end for editing routing/ip tables called 'firestarter'.
Wiz can communicate with Internet by enabling 'internet sharing' within firestarter.
 
gasbank said:
But it is simpler to just use the GUI front-end for editing routing/ip tables called 'firestarter'.
Wiz can communicate with Internet by enabling 'internet sharing' within firestarter.

I bet there are simpler ways than the one I found, especially considering all the detours I followed.
However, I am (yet) usind openSUSE 10.3 and they have just stopped updating it and shut down the repositories.
So I had to get back to my retail-DVD even to install the command line tool.

Thanks for the hint. I will see to this during my christmas holidays after upgrading to 11.2.
 
Last edited by a moderator:
Although if you are behind NAT it is probably not a big issue, be warned if you are using telnetd on the Wiz on the open Internet that anyone out there can also telnet to your Wiz...

I think busybox' dhcp client is on the Wiz already if you want to give that a try (invoke it from the NetworkUp script instead of manually ifconfig'ing the interface).

Now I'm re-double-guessing if we want the NetworkUp to be different from ApplicationUp, since you wouldn't want telnetd running/using memory to run a network multiplayer game...
 
Is this actually working for anyone?

For me, I never see a thing in dmesg on the linux host side (I'm using Fedora 12 i386)

I can use USBSerial just fine, but would like TCP/IP to the wiz.

Here's what I'm doing:

I launch the NetworkUp.gpe on the wiz and it pauses for a couple of seconds, then redisplays the menu. I then plug in the stock USB cable to my laptop, and it prompts me for which disk to mount, I hit "X - Cancel". Then, looking at dmesg on the laptop, there is no activity at all.

Thanks for any help!
 
jbruno said:
Is this actually working for anyone?

For me, I never see a thing in dmesg on the linux host side (I'm using Fedora 12 i386)

I can use USBSerial just fine, but would like TCP/IP to the wiz.

Here's what I'm doing:

I launch the NetworkUp.gpe on the wiz and it pauses for a couple of seconds, then redisplays the menu. I then plug in the stock USB cable to my laptop, and it prompts me for which disk to mount, I hit "X - Cancel". Then, looking at dmesg on the laptop, there is no activity at all.

Thanks for any help!

Same problem here. The module postet by "hcf" does not work in my case. I've done the following things:

Firmware 1.1.0
uname -a: Linux wiz 2.6.24#663

Using qtopia terminal:

insmod lf1000_udc.ko
Load is ok. lsmod brings up:

lf1000_udc
usbhid
hid
ohci_hcd
usbcore
rtc_pollux_m41t80
rtc_core

dmesg shows no errors

Now I try:
insmod ./g_ether.ko

I get: Using ./g_ether.ko
Segmentation fault :(

dmesg shows much garbage - pc:[...], sp:[...]
looks like a blue screen, dumping the CPU-status...

but - lsmod shows me, that g_ether has been loaded. :unsure: but it does not work.

The MD5-Checksum of this module ends with 3906ea003 - hcf should check if his module has the same md5checksum - maybe he posted the wrong module?

FYI: USBSerial works fine.

TNX for all your help!
 
Last edited by a moderator:
@jbruno,

Just to confirm, it works quite fine for me.
(Only sometimes the WIZ and my host want talk to each other. But I think that's just because I was playing around with the routing tables on the host.)

Maybe you could check the test.log file? If you, too, have the entry "Segmentation fault" than at least you know that you seem to have the same problem as mb1967.
If not, you could use a teminal to check dmesg and ifconfig. I am using termula on the WIZ.
http://dl.openhandhelds.org/cgi-bin/wiz.cgi?0,0,0,0,8,163

If ifconfig shows the following lines:
Code:
root@wiz:/mnt/sd/apps/telnetd# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B) 

usb0      Link encap:Ethernet  HWaddr C6:7D:31:3B:0D:1D
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:80 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6840 (6.6 KiB)  TX bytes:6549 (6.3 KiB)
The problem may be on the hosts side.

@mb1967 Sorry, I still can't really help you ;-)

@ hfc
Here's my dmesg after telneting into the WIZ, in case you can make anything our of it:

Code:
root@wiz:/mnt/sd/apps/telnetd# dmesg
On node 0 totalpages: 10752
  DMA zone: 84 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 10668 pages, LIFO batch:1
  Normal zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
Calibrating delay loop... 263.78 BogoMIPS (lpj=1318912)
[Device Version]>> 1
[JB]>> 2048 : mtd->writesizetype
[JB]>> 64 : mtd->oobsize
[JB]>> 262144 : mtd->erasesize
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   262144 bytes (256 KiB)
UBI: logical eraseblock size:    258048 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "d1"
UBI: MTD device size:            128 MiB
UBI: number of good PEBs:        512
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 512
UBI: number of PEBs reserved for bad PEB handling: 5
UBI: max/mean erase counter: 4/1
UBI: background thread "ubi_bgt0d" started, PID 214
VFS: Mounted root (ubifs filesystem).
Freeing init memory: 152K
UBIFS: background thread "ubifs_bgt0_0" started, PID 240
mmcblk0: mmc0:b368 SDC   7830016KiB
 mmcblk0: p1
UBI: attaching mtd2 to ubi1
UBI: physical eraseblock size:   262144 bytes (256 KiB)
UBI: logical eraseblock size:    258048 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
1 vol->vol_id = 0, vol->ubi->ubi_num = 1
UBI: attached mtd2 to ubi1
UBI: MTD device name:            "d2"
UBI: MTD device size:            892 MiB
UBI: number of good PEBs:        3568
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 3568
UBI: number of PEBs reserved for bad PEB handling: 35
UBI: max/mean erase counter: 2/0
UBI: background thread "ubi_bgt1d" started, PID 680
UBIFS: background thread "ubifs_bgt1_0" started, PID 683
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
MES_MLC_SetLayerPriority.829: MES_ASSERT error
usb insert....
IOCTL_SET_SOFT_DISCONNECT:
usb insert....
lf1000_udc: version 03 Jul 2007
lf1000_udc_probe: base addr = f0018000
g_file_storage gadget: File-backed Storage Gadget, version: 7 August 2007
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, file: /dev/mmcblk0p1
g_file_storage gadget: high speed config #1
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
IOCTL_SET_SOFT_DISCONNECT:
MES_MLC_SetLayerPriority.829: MES_ASSERT error
lf1000_udc: version 03 Jul 2007
lf1000_udc_probe: base addr = f0018000
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: OpenWiz Ethernet, version: HCF 0
usb0: using lf1000_udc, OUT ep2-bulk IN ep1-bulk
usb0: MAC c6:7d:31:3b:0d:1d
MES_MLC_SetLayerPriority.829: MES_ASSERT error
MES_MLC_SetLayerPriority.829: MES_ASSERT error
MES_MLC_SetLayerPriority.829: MES_ASSERT error
usb insert....
usb0: high speed config #1: 100 mA, OpenWiz Ethernet, using CDC Ethernet Subset
ether gadget: set_interface ignored!

I hope I could help a little at least.

rds

Kasi
 
@mb1967,

One more thing. My lsmod shows far less modules than yours:

Code:
root@wiz:/mnt/sd/apps/USBNetwork# lsmod
Module                  Size  Used by    Not tainted
g_ether 16500 0 - Live 0xbf00d000
lf1000_udc 16328 1 g_ether, Live 0xbf008000
rtc_pollux_m41t80 7408 0 - Live 0xbf005000
rtc_core 14840 1 rtc_pollux_m41t80, Live 0xbf000000

Maybe you get a conflict with one of these:
usbhid
hid
ohci_hcd
usbcore

Kasi
 
kasi said:
@mb1967,

One more thing. My lsmod shows far less modules than yours:

Code:
root@wiz:/mnt/sd/apps/USBNetwork# lsmod
Module                  Size  Used by    Not tainted
g_ether 16500 0 - Live 0xbf00d000
lf1000_udc 16328 1 g_ether, Live 0xbf008000
rtc_pollux_m41t80 7408 0 - Live 0xbf005000
rtc_core 14840 1 rtc_pollux_m41t80, Live 0xbf000000

Maybe you get a conflict with one of these:
usbhid
hid
ohci_hcd
usbcore

Kasi

It's really a pain! I've removed the modules and the situation has not changed :(

Can you give me your md5sum of the g_ether - module? I want to check if my g_ether is corrupted.

TNX in advance!
 
Last edited by a moderator:
Code:
kasi@mars:~> md5sum g_ether.ko
9d1be2c4f3ff1aebc1b964b3906ea003  g_ether.ko
 
kasi said:
Code:
kasi@mars:~> md5sum g_ether.ko
9d1be2c4f3ff1aebc1b964b3906ea003  g_ether.ko

TNX!!!

Now, I give up ... my md5sum is the same ...

If you take a look into the USB-Cable-Wiz-Site-Connector - what do you see then? If you see an integrated circuit, than it's the "old" WIZ-version. My USB-Connector has only cables - no external hardware components. Maybe not only the hardware differs. GPH, I love you :angry:
 
Last edited by a moderator:
Hi mb1967,

Sorry, that's (far) beyond my skills.
If you suspect the cable to be different, maybe andymanone could help.
But that's no help to the segmentation fault....

What about flashing the firmware to 1.1.0 and re-formating the SD just to make sure?

Have no other clue.

Kasi
 
Can you capture the corrupt/garbage dmesg output in a file on your SD card and quote it here?

My only guess is that we're looking at some kernel incompatibility (g_ether was compiled for Wiz firmware 1.1.0, but if we're looking at a kernel version difference then I would also expect the insmod to complain about a mismatch). But I'm curious to see the output in question anyway.
 
Back
Top