Sunday, March 29, 2009

Wammu and Finding USB Ports

Wammu Bluetooth setup is here, you may now carry on reading :)

Wammu is a nice tool I found to keep my mobile data in sync. It provides a nice wizard to start synching and backup mobile phone data, however I had issues trying to find this, USB port address.

I must admit, no regular new user would of figured it out, yet I am sure there is documentation online some where. Yet I didn't have the internet on me at the time, so here is how I did it. Think it is pretty standard for most usb mobile connections, but here is how this piece of information out.

You will Need "hwinfo"
FORGET THE "lsusb" command :P That just brings up interesting numbers that I have already tried in my past attempts lol.

Make sure you can run "hwinfo" command, if you have not got that command, get one!

hwinfo is a "Hardware identification system", pretty cool nifty dump. Comes standard with Ubuntu, not sure about the rest.... ANYWAY!....

How to find the USB Port Address for a Mobile Phone
1) Connect the phone to the USB and let it go in file transfer mode. So the phone is mounted to Linux.

2) Bring up a console or terminal and type
hwinfo > myhardwareinfo.txt
This will save all your hardware information.

3) Search the file for the make of your phone, it should show something like

usb.vendor_id = 7531 (0x1d6b)
usb.is_self_powered = true
usb.product_id = 1 (0x1)
usb.can_wake_up = true
usb.vendor = 'Linux Foundation'
usb.bus_number = 1 (0x1)
usb.product = 'USB Communications Interface'
usb.interface.number = 7 (0x7)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:3.7'
info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_10_0'
usb.interface.class = 2 (0x2)
usb.interface.subclass = 9 (0x9)
usb.interface.protocol = 1 (0x1)
usb.interface.description = 'Sony Ericsson Device 039 USB WMC Device Management'

6: udi = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_10_0_if1_serial_unknown_0'
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:3.1/tty/ttyACM0'
info.subsystem = 'tty'
info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_10_0_if1'
info.category = 'serial'

4) This is the tricky bit, look for the line beginning with "Linux.sysfs_path". Mine is
/sys/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:3.1/tty/ttyACM0

To find the port for the USB, turns out it was just a small bit at the end and not that long address I've learnt something here...

It is not "/tty/ttyACM0" , is it in fact

Change "tty" to "/dev/" and dump the rest....

BEHOLD THE CORRECT USB PORT ADDRESS TO TYPE INTO WAMMU
/dev/ttyACM0

It may be different if you using more than one USB port on your machine.

Final Thoughts
I tried to figure this one on more than one occassion and it is my 3rd time that I figured it out. Funnily enough I must have entered all kinds of addresses.

Apparently tty is a standard input thingy. I'm a little older and wiser and happy I can sync my phone. we're trying to communicate to the device. I am sure there is some logic I am mis understanding as to why it is /dev/.

THEY should improve the "lsusb" to show this? Or can't that be possible?

Wammu Usage Notes

Just some things to realize as you use this software.
  • Don't have the phone in File Transfer Mode
  • Keep it in regular phone mode
  • You may get a error with synching empty things like, you have not used the "TODO" on your phone.
  • Everytime you run Wammu, it starts off with a clean slate, unless you open up your backups.
  • It will come up with errors when you try to backup things that don't exist yet.
  • Be aware of duplicate data (Some are on Sim and some are on memory).
Backup
  1. Connect to phone (click Phone->Connect)
  2. Retrieve everything you use. Click "Retrieve"-> everyone of these items (excluding the ones you don't use ie "todo")
  3. Click Backups->"Save" and "save messages"
Restore
Been a while since I restored... Either you connect last or connect first before doing this 1 step.

1) Something tells me you have to connect to phone first then click
Backups->Import
Backups->Import Messages

1 comment:

ezstartup said...

Hi,
Try hwinfo --short ;)