Dear all,
I'm struggling to get started with a 1.1p board. When I connect it via USB (with no simcard inserted and no connection to a phone), the red led is on. Sometimes, both leds remain off after connecting the board when I have a simcard inserted and a phone connected.
On one box (debian lenny), the board is never recognized by lsusb or kernel messages. Do I need anything special (other than basic usb support) compiled into the kernel for libusb to do its work in user space?
I tried dfu-util -l, the board wasn't listed.
On a second box (debian squeeze) there's log messages when the usb is connected
Feb 15 22:34:44 greta kernel: [186232.651806] usb 1-1.1: new full speed USB device using ehci_hcd and address 13 Feb 15 22:34:44 greta kernel: [186232.745566] usb 1-1.1: New USB device found, idVendor=16c0, idProduct=0762 Feb 15 22:34:44 greta kernel: [186232.745573] usb 1-1.1: New USB device strings: Mfr=4, Product=5, SerialNumber=0 Feb 15 22:34:44 greta kernel: [186232.745577] usb 1-1.1: Product: SimTrace SIM Sniffer - Runtime Mode Feb 15 22:34:44 greta kernel: [186232.745581] usb 1-1.1: Manufacturer: sysmocom - systems for mobile communications GmbH Feb 15 22:34:44 greta kernel: [186232.745694] usb 1-1.1: configuration #1 chosen from 1 choice
lsusb doesn't show anything either
the red led is on after connecting, simtrace (linked against libusb-1.0) says "can't open USB device"
After some more tries, dfu-util recognizes the board
root@greta:~# dfu-util -l dfu-util - (C) 2007-2008 by OpenMoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY
dfu-util does currently only support DFU version 1.0
Found DFU: [0x16c0:0x0762] devnum=17, cfg=0, intf=0, alt=0, name="SimTrace DFU Interface - Application Partition" Found DFU: [0x16c0:0x0762] devnum=17, cfg=0, intf=0, alt=1, name="SimTrace DFU Interface - Bootloader Partition" Found DFU: [0x16c0:0x0762] devnum=17, cfg=0, intf=0, alt=2, name="SimTrace DFU Interface - RAM"
However, I'm not able to write a firmware. I tried the main_simtrace.bin that Harald posted to this list some days ago.
root@greta:~# dfu-util -d 16c0:0762 -a0 -D /home/martin/tmp/main_simtrace.bin -R dfu-util - (C) 2007-2008 by OpenMoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY
dfu-util does currently only support DFU version 1.0
Opening USB Device 0x16c0:0x0762... Found Runtime: [0x16c0:0x0762] devnum=17, cfg=0, intf=0, alt=0, name="SimTrace DFU Interface - Application Partition" Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuERROR, status = 8 dfuERROR, clearing status Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing Transfer Size = 0x0100 bytes_per_hash=417 Starting download: [#################################################dfu_download: usb_control_msg returned -32: error sending control message: Broken pipe Error during download
Retrying multiple times, I always get the same error. I tried resetting the board with the bootloader button pressed, this didn't change anything. While trying to flash the firmware, there was no sim inserted and no phone connected.
Does anyone have an idea what else I can try to track down the problems and get the board up and running?
Thanks in advance,
Martin
Martin Kaiser wrote:
On one box (debian lenny), the board is never recognized by lsusb or kernel messages.
If the kernel doesn't recognize the device and does not even output a message similar to:
usb 5-2: new full speed USB device number 2 using uhci_hcd
Then there is something fairly low level wrong with either device, cable, or host.
Do I need anything special (other than basic usb support) compiled into the kernel for libusb to do its work in user space?
CONFIG_USB=y CONFIG_USB_SUPPORT=y
Those along with a modern udev is enough. If lsusb outputs anything at all when you run it (also without simtrace connected) you are good.
//Peter
Hi Martin,
On Wed, Feb 15, 2012 at 11:43:23PM +0100, Martin Kaiser wrote:
I tried dfu-util -l, the board wasn't listed.
On a second box (debian squeeze) there's log messages when the usb is connected
Feb 15 22:34:44 greta kernel: [186232.651806] usb 1-1.1: new full speed USB device using ehci_hcd and address 13 Feb 15 22:34:44 greta kernel: [186232.745566] usb 1-1.1: New USB device found, idVendor=16c0, idProduct=0762 Feb 15 22:34:44 greta kernel: [186232.745573] usb 1-1.1: New USB device strings: Mfr=4, Product=5, SerialNumber=0 Feb 15 22:34:44 greta kernel: [186232.745577] usb 1-1.1: Product: SimTrace SIM Sniffer - Runtime Mode Feb 15 22:34:44 greta kernel: [186232.745581] usb 1-1.1: Manufacturer: sysmocom - systems for mobile communications GmbH Feb 15 22:34:44 greta kernel: [186232.745694] usb 1-1.1: configuration #1 chosen from 1 choice
lsusb doesn't show anything either
that's really weird, if the kernel has recognized it and read the device and string descriptors, it should also show up in lsusb. The information lsusb uses is gathered by exactly those kernel log messages above.
the red led is on after connecting, simtrace (linked against libusb-1.0) says "can't open USB device"
ths was running as root? can you post a 'strace -f -s1024 ./simtrace' to see what's happening on a system call level?
root@greta:~# dfu-util -l dfu-util - (C) 2007-2008 by OpenMoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY
dfu-util does currently only support DFU version 1.0
Found DFU: [0x16c0:0x0762] devnum=17, cfg=0, intf=0, alt=0, name="SimTrace DFU Interface - Application Partition" Found DFU: [0x16c0:0x0762] devnum=17, cfg=0, intf=0, alt=1, name="SimTrace DFU Interface - Bootloader Partition" Found DFU: [0x16c0:0x0762] devnum=17, cfg=0, intf=0, alt=2, name="SimTrace DFU Interface - RAM"
However, I'm not able to write a firmware. I tried the main_simtrace.bin that Harald posted to this list some days ago.
root@greta:~# dfu-util -d 16c0:0762 -a0 -D /home/martin/tmp/main_simtrace.bin -R dfu-util - (C) 2007-2008 by OpenMoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY
dfu-util does currently only support DFU version 1.0
Opening USB Device 0x16c0:0x0762... Found Runtime: [0x16c0:0x0762] devnum=17, cfg=0, intf=0, alt=0, name="SimTrace DFU Interface - Application Partition" Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuERROR, status = 8 dfuERROR, clearing status Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing Transfer Size = 0x0100 bytes_per_hash=417 Starting download: [#################################################dfu_download: usb_control_msg returned -32: error sending control message: Broken pipe Error during download
that's almost at the end of the dlwonload, quite strange.
You don't happen to have a compatible serial cable (T191, OsmocomBB, ...) that could be used to look at the serial console output of the device?
Also, if you have a self-powered USB hub around (i.e. with its own power supply), it would be interesting to see if that makes any difference.
Does anyone have an idea what else I can try to track down the problems and get the board up and running?
Assuming this board was bought from sysmocom, I think after a few more experiments (see above) we will replace it with another one.
Regards, Harald
Hi Harald,
thanks for your help.
Thus wrote Harald Welte (laforge@gnumonks.org):
Feb 15 22:34:44 greta kernel: [186232.651806] usb 1-1.1: new full speed USB device using ehci_hcd and address 13 Feb 15 22:34:44 greta kernel: [186232.745566] usb 1-1.1: New USB device found, idVendor=16c0, idProduct=0762 Feb 15 22:34:44 greta kernel: [186232.745573] usb 1-1.1: New USB device strings: Mfr=4, Product=5, SerialNumber=0 Feb 15 22:34:44 greta kernel: [186232.745577] usb 1-1.1: Product: SimTrace SIM Sniffer - Runtime Mode Feb 15 22:34:44 greta kernel: [186232.745581] usb 1-1.1: Manufacturer: sysmocom - systems for mobile communications GmbH Feb 15 22:34:44 greta kernel: [186232.745694] usb 1-1.1: configuration #1 chosen from 1 choice
lsusb doesn't show anything either
that's really weird, if the kernel has recognized it and read the device and string descriptors, it should also show up in lsusb. The information lsusb uses is gathered by exactly those kernel log messages above.
ok, makes sense. I just noticed the line "SimTrace SIM Sniffer - Runtime Mode".
After trying the dfu things, the behaviour is different: When I connect phone+sim card, the board is not recognized. I see no kernel messages and no lsusb output. When I plug in the usb with no phone/sim, then press reset while holding the bootloader button, the board is recognized by the kernel, identifies as SimTrace SIM Sniffer - DFU Mode and shows up in lusb as Bus 001 Device 015: ID 16c0:0762 VOTI
the red led is on after connecting, simtrace (linked against libusb-1.0) says "can't open USB device"
ths was running as root? can you post a 'strace -f -s1024 ./simtrace' to see what's happening on a system call level?
yes, I tried runninng as root
I assume this makes no sense if the board is not in Runtime Mode? After trying the firmware update, the board will only start in DFU Mode. Looks like the failed dfu update erased/corrupted the firmware.
When I run simtrace while the board is in dfu mode, there's a different error message. The board is found, but no data can be read. That's probably what's expected when the board is in dfu mode.
root@skogar:/home/martin/src/simtrace/host# ./simtrace simtrace - GSM SIM and smartcard tracing (C) 2010 by Harald Welte laforge@gnumonks.org
Entering main loop BULK IN transfer error; rc=-1
strace output is ... open("/sys/bus/usb/devices/usb1/descriptors", O_RDONLY) = 8 read(8, "\22\1\0\2\t\0\0@k\35\2\0\6\2\3\2\1\1", 18) = 18 close(8) = 0 open("/sys/bus/usb/devices/usb2/descriptors", O_RDONLY) = 8 read(8, "\22\1\20\1\t\0\0@k\35\1\0\6\2\3\2\1\1", 18) = 18 close(8) = 0 open("/sys/bus/usb/devices/usb3/descriptors", O_RDONLY) = 8 read(8, "\22\1\20\1\t\0\0@k\35\1\0\6\2\3\2\1\1", 18) = 18 close(8) = 0 open("/sys/bus/usb/devices/usb4/descriptors", O_RDONLY) = 8 read(8, "\22\1\20\1\t\0\0@k\35\1\0\6\2\3\2\1\1", 18) = 18 close(8) = 0 open("/sys/bus/usb/devices/1-3/descriptors", O_RDONLY) = 8 read(8, "\22\1\0\2\357\2\1@\2\4uv\4\0\3\1\0\1", 18) = 18 close(8) = 0 open("/sys/bus/usb/devices/1-2/descriptors", O_RDONLY) = 8 read(8, "\22\1\0\2\t\0\1@\t\4Z\0\0\1\0\0\0\1", 18) = 18 close(8) = 0 open("/sys/bus/usb/devices/1-2.4/descriptors", O_RDONLY) = 8 read(8, "\22\1\0\2\t\0\1@\t\4Z\0\0\1\0\0\0\1", 18) = 18 close(8) = 0 open("/sys/bus/usb/devices/1-2.4.3/descriptors", O_RDONLY) = 8 read(8, "\22\1\0\1\0\0\0\10\300\26b\7\0\0\1\2\0\1", 18) = 18 close(8) = 0 open("/dev/bus/usb/001/018", O_RDWR) = 8 write(4, "\1", 1) = 1 read(3, "\1", 1) = 1 ioctl(8, USBDEVFS_CLAIMINTERFACE, 0x7fff79fa933c) = 0 write(1, "Entering main loop\n", 19Entering main loop ) = 19 ioctl(8, USBDEVFS_SUBMITURB or USBDEVFS_SUBMITURB32, 0x16a7a00) = -1 ENOENT (No such file or directory) write(2, "BULK IN transfer error; rc=-1\n", 30BULK IN transfer error; rc=-1 ) = 30 ioctl(8, USBDEVFS_RELEASEINTERFACE, 0x7fff79fa933c) = 0 write(4, "\1", 1) = 1 read(3, "\1", 1) = 1 close(8) = 0 close(3) = 0 close(4) = 0 close(5) = 0 exit_group(0) = ?
Setting Alternate Setting #0 ... Determining device status: state = dfuERROR, status = 8 dfuERROR, clearing status Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing Transfer Size = 0x0100 bytes_per_hash=417 Starting download: [#################################################dfu_download: usb_control_msg returned -32: error sending control message: Broken pipe Error during download
that's almost at the end of the dlwonload, quite strange.
You don't happen to have a compatible serial cable (T191, OsmocomBB, ...) that could be used to look at the serial console output of the device?
I don't have such a cable, should have ordered one along with the board.
Also, if you have a self-powered USB hub around (i.e. with its own power supply), it would be interesting to see if that makes any difference.
I've just checked this, it makes no difference. The error message is exactly the same.
Would this sam-ba mode help here? From reading the website, I understand this is used when the bootloader is corrupted. It seems the bootloader is ok here as the board comes up in dfu mode.
Assuming this board was bought from sysmocom, I think after a few more experiments (see above) we will replace it with another one.
I'd appreciate this as a last resort.
Best regards,
Martin
Hi,
here's an update about my struggle to get the board working.
On one of my boxes, using Debian lenny, the board is not recognized at all, regardless of the mode.
On a debian squeeze box, it looks like there's 3 scenarios
- the board is recognized by USB in "runtime mode", this only works when there's no phone and no sim connected. The red led is on in the case. - when I connect a phone and sim, the board is not recognized at all. The red led remains off.
- the board is recognized by USB in dfu mode
I tried updating the firmware, this time I used a main_simtrace.bin that I compiled myself
root@skogar:~# dfu-util -d 16c0:0762 -a0 -D ./main_simtrace.bin -R dfu-util - (C) 2007-2008 by OpenMoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY
dfu-util does currently only support DFU version 1.0
Opening USB Device 0x16c0:0x0762... Found Runtime: [0x16c0:0x0762] devnum=2, cfg=0, intf=0, alt=0, name="SimTrace DFU Interface - Application Partition" Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing Transfer Size = 0x0100 bytes_per_hash=416 Starting download: [##################################################] finished! state(7) = dfuMANIFEST, status(0) = No error condition is present state(2) = dfuIDLE, status(0) = No error condition is present Done! can't detach: error sending control message: Broken pipe Resetting USB to switch back to runtime mode
I'm not sure if that is a successful update, though. The board comes up in runtime mode but stops working when phone/sim are connected.
- I tried activating the sam-ba mode by following the steps in http://bb.osmocom.org/trac/wiki/SIMtrace/Firmware
This does not work at all, the board remains in (non-working) runtime mode, it does not come up in sam-ba mode.
Any more ideas?
Thanks, best regards,
Martin
Hi Martin,
On Sun, Feb 19, 2012 at 07:31:46PM +0100, Martin Kaiser wrote:
here's an update about my struggle to get the board working.
I really think you should return the board to sysmocom, we will have a look at it and either send back a new one (likely) or try to repair it, depending on the problem.
Regards, Harald