Skip to main content

Zipit Z2 USB Host Mode

Posted in

With the release of U-Boot, USB Host mode (v1.1) is now an option on the Z2.

Previously it had been assumed that you needed to do a hardware mod inside the Zipit to get USB host mode working. I have since undone the hardware mod and have host mode working successfully. This means all you need is a U-Booted Zipit with a proper kernel and a USB to Zipit Dock Adapter.

The Zipit can only supply 3.3V when running on battery but the charger supplies 5V when plugged in. This means that if you want to use USB while the Zipit is not plugged in, you need a powered hub that has it's own battery or power supply. I managed to hack together a Zipit dock connector to a USB hub that has a power jack. It's not pretty, but it works. Foxx from #zipit and #zipit-dev created a nice mini USB adapter that fits inside the hirose dock connector.

GPSFan kindly did all the USB research and found the correct USB pinouts for the dock connector. The pinouts can also be found at the Zipit Wireless site (you must be a member to view the pinouts there). In the images below (courtesy GPSFan) I have labeled the USB pins and also outlined black tabs on the connector so you can orient it for the proper side.
Wiring 1Wiring 1
Wiring 2Wiring 2
Part numbers for the dock connector can be found here and here and here. USB and U-Boot "Shutdown" kernel patch available here.

Lastly, if you want to see it in action, check out my old video of USB Host mode and z2buntu here

power for USB subsystem

My reading of the pxa270 CPU developer's manual is that VCC_USB (pin 25 of the expansion port connector, between USB_Data- and GND) must be connected to 3.3V power for the on-chip USB system to work: "Positive Supply for USB Transceivers (both host and client)—Must be connected to an external power supply for the USB interface."

In the photo, I don't see that pin connected, so wondering how it works. I'm basing this on the pinout and also

power for USB subsystem

FYI: The pinout at bealecorner is completely wrong. Don't use it.

updated pinout

ok, is this pinout numbering any better? (There is a tiny tick mark on the silkscreen suggesting this orientation of pin 1.) I have confirmed myself so far only that +3.3V and +1.8V is correct.

Dock Pinout

This is the pinout that GPSFan came up with. I haven't compared it to the pinout at but I assume it's close or correct. I used this as my guide for USB host.

pin numbering on 36-pin connector

Interesting, had not considered numbering in A and B groups of 18.
The reason I like the pinout shown below is that, if you look very closely, you can see these are also the numbers embossed on the Hirose mating connector, number 1-36 starting from right.

USB errors.

Does anybody notice this in their dmesg after boot?

root@zipit-ubuntu:~# dmesg | grep usb
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PM: Adding info for usb:usb1
PM: Adding info for usb:1-0:1.0
PM: Adding info for No Bus:usbdev1.1
usb 1-2: new full speed USB device using pxa27x-ohci and address 2
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new full speed USB device using pxa27x-ohci and address 3
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new full speed USB device using pxa27x-ohci and address 4
usb 1-2: device not accepting address 4, error -62
usb 1-2: new full speed USB device using pxa27x-ohci and address 5
usb 1-2: device not accepting address 5, error -62

USB Errors

This is normal if you do not have anything plugged into the USB port.

Actually it's not wrong, it's

Actually it's not wrong, it's just labeled backwards from the pinout at

USB hot plugging?

Is is possible to plug in a USB device after booting with this setup? Currently I can only get USB devices recognized if they are connected during boot. I am probably missing a simple command. I am trying to connect an FT232 USB-to-serial device.


modprobe -r ohci_hcd
modprobe ohci_hcd

will reset the USB subsys and discover devices. Is there a better way?

Hot plugging should work as

Hot plugging should work as long as udev is running. See if it's running with: ps aux | grep udev

Hot plugging

udev is running, yes. I notice when a hub is placed between the Zipit and the device hot plugging works, but not when the device is plugged directly in to the Zipit. Maybe a hardware issue. I'll faff with it some more. Thanks

Interesting. I just made a

Interesting. I just made a dongle without a hub and hotplugging works. I'm also using a newer kernel and z2sid. You can try my new z2sid release or here's just the new kernel:

Something interesting about

Something interesting about the hot plugging problem. I noticed that you had the USB hub hard wired into the Zipit plug. In my case I have a mini-B on the other end. It is when I plug this end into a device, with the Zipit end already connected, that hot plugging does not work. Strangely when I plug in the mini-b first and THEN plug in the Zipit end, it works every time. It must have something to do with the sequence of connections made as the mini-b plug is inserted.

external wifi+drivers

Excuse me for my silly comment but I was just wondering.. if we can connect an external wifi antenna to the usb host and if there are the drivers to support this..

USB wifi

It's a perfectly valid question, not a silly one. :) You can connect a USB wifi card as long as you compile the proper driver for it. It shouldn't be too difficult at all.


So we could have promisc and monitor mode? Are the 300mhz enough to run aircrack suite or ettercap for educational purposes always? Ultimate hacktop anyone?

Mic on connector

Would it be possible to attach a microphone between pins 1 & 2 on the connector?



I have not tried to measure

I have not tried to measure the intensity of current between the boost converter and the Zipit yet, but I think it would be a good next step to see what is actually shooting. Certainly not trying to power a hard disk or even a center outside the DC-DC converter, but a small memory device or even a mouse should work. The device as shown in the photo does not seem to work in terms of power is concerned. I think my problem with devices not recognized is derived from a scraps problem or something else in that regard. The expansion port was originally designed with a snap of the camera peripheral in mind although I am sure that the design worked at 3.3v.

Mic on Dock

I don't see why not, but I have not tested it. If you do hook one up, please post back with your results.

using usb


Have got your z2buntu running and have made the usb adapter.
When booting with a usb memory stick plugged in, the following message appears

"sd 0:0:0:0: Attached scsi generic sg0 type 0"

So then "sudo mount /dev/sdg0 extusb1"
gives the error message
"mount: special device /dev/sdg0 does not exist" .

Any tips on how to access the memory stick?

Kindest regards


USB Disks


In my experience, USB drives are detected as /dev/sdXY (X being a letter, and Y being a number for the partition). You need to mount the disk to an existing folder on your zipit such as /mnt. So if your USB disk is detected as sdb and only has one fat partition, you can do this:

sudo mount -t vfat /dev/sdb1 /mnt

or, if your disk has 2 partitions, #1 being fat, #2 being ext3 and you want to mount the second:

sudo mount -t ext3 /dev/sdb2 /mnt

Ubuntu desktops would normally mount disks automatically into the /media folder but the automount stuff is not installed in z2buntu and I'm not sure what packages are required for it. You could create your own permanent folder in /media and mount it to there every time (sudo mkdir /media/SOMETHING), or find out how to install the automount packages.



first you wrote sg0, then /dev/sdg0. i would use /dev/sg0. maybe just a typo in your post, but thats the only reason for me.

Thanks for the replies. It

Thanks for the replies.

It wasn't a typo, it was a mistake on my part, well spotted.

I had already created the mount point (extusb1), and the memory stick has one fat partition.

So now:
"sudo mount -t vfat /dev/sg0 extusb1"

gives the error message:
"mount: /dev/sg0 is not a block device"

At least it seems to be acknowledging there's a device there, but still can't seem to access it.



USB Device

I still believe you're trying to mount the wrong device. What does ls /dev/sd* return? I would assume that /dev/sda would show and be your SD card, then anything after it would be the USB drive (/dev/sdb and up).

USB contd.

Hi mozzwald,

"ls /dev/s*"

gives "/dev/sda /dev/sda1 /dev/sg0"

However my sd card mounts at "/dev/mmcblk0p1"

So, it turns out the usb stick appears as "/dev/sda1"

I tried "sudo mount /dev/sda1 extusb1"

and can access the usb stick at "/home/user/extusb1"
although it is currently read only.

Thanks for your help.

(ps: still have no idea what "/dev/sg0" is.)



USB Disks

Ahh.. silly me. I forgot that the SD card shows as /dev/mmcblock0. The sgX devices have something to do with SCSI (from what I read when googling it). The USB mass storage drivers are SCSI drivers so maybe it has something to do with that.

Phidgets on the Zipit

I was wondering if anyone attempted to compile and use the phidgets on this device.

Phidgets have usb i/o boards, sensors and cool stuff. They also provide linux drivers for their products

The zipit could be used as the brain of a relatively cheap analog/digital i/o system....

5V out from dock

You mention that the z2 cannot generate 5v on battery. Would piping the voltage out to the USB through something like this solve the problem?:

Is the voltage consistently 3.3v even when on AC or does it go up to 5v when plugged in?


I have not actually tested the USB power output on the Zipit so I can't be sure, but I imagine it outputs 5V when plugged in and 3.3V when running on battery. I was just going on gpsfan's research. That board from sparkfun looks promising. Geordy from and #zipit-dev irc channel was trying to work on a step-up circuit. You might wanna check and see if he has made any progress.

Dock connector


This might seem like a stupid question at this stage, but how can I get this dock connector. I am not able to find it mentioned anywhere.

Is it a proprietary connector or I can find it from anywhere else?

I'd really appreciate your help on that.


Please ignore that :) I got

you made it to the hack-a-day

you made it to the hack-a-day front page :)