Dangerous Prototypes

Dangerous Prototypes => USB Infrared Toy => Topic started by: Doug on January 09, 2012, 04:48:31 am

Title: Troubles upgrading firmware to v22
Post by: Doug on January 09, 2012, 04:48:31 am
Hi,
I tried updating my v2 IR Toy to firmware v22 but have a problem. I was previously able to see the device as a com port, but after shorting PGC and PGD together, I can't do anything else. I'm not able to flash it as the device is not recognized (no com port) and it appears to be stuck in the bootloader (LED is always on).  I can't figure out how to reset it. (flashing my v1 IR Toy was easy!)

Any suggestions on what I can do?

Thanks,
Doug
Title: Re: Troubles upgrading firmware to v22
Post by: ian on January 09, 2012, 07:48:43 am
Hi Doug,

When in bootloader mode the USB IR Toy is a USB HID device, so no com port is added to the system. What happens when you run the update application? Is there an error you can post here for us to take a look at?

Updating v2 is exactly the same in every way as v1 (same chip, same bootloader, same utilities, same firmware, etc), so it shouldn't be a version difference/bug.
Title: Re: Troubles upgrading firmware to v22
Post by: Doug on January 09, 2012, 08:21:10 am
Hi, Ian.
My v2 isn't showing up as an HID compliant device either.  I can't connect via the updater.  Here's the output of running a firmware update. (I am typing 5 as my com port number, but it is fictitious as there isn't a com port.) 
Enter Com Port Number 5
Could not open com port.
Once the device has entered boot loader mode
Press any key to continue . . .
U2IO flash erasing: FAILED.
Device is not found.
Operation aborted.
Press any key to continue . . .

FYI, I can short the pins on my v1 and it shows as an HID device. And flashing that went as expected.
Title: Re: Troubles upgrading firmware to v22
Post by: ian on January 09, 2012, 08:29:15 am
Thanks for the update. I'm sorry about the problem.

The simplest first step is to reflash the bootloader, but you would need a PIC programmer for that. As far as I know, the bootloader in an IR Toy has never been accidentally corrupted.

It sounds like possibly broken hardware to me - if the LED is on then the bootloader should be active and show up. Do you notice anything obvious like loose USB pins, or excess solder around the USB jack? Please contact Seeed Studio for a replacement and send them the link to this thread.
Title: Re: Troubles upgrading firmware to v22
Post by: DkSoul on January 09, 2012, 04:28:08 pm
[quote author="Doug"]Hi, Ian.
My v2 isn't showing up as an HID compliant device either.  I can't connect via the updater.  Here's the output of running a firmware update. (I am typing 5 as my com port number, but it is fictitious as there isn't a com port.) 
Enter Com Port Number 5
Could not open com port.
Once the device has entered boot loader mode
Press any key to continue . . .
U2IO flash erasing: FAILED.
Device is not found.
Operation aborted.
Press any key to continue . . .

FYI, I can short the pins on my v1 and it shows as an HID device. And flashing that went as expected.[/quote]
I have had the exact same problem. The HID device was showing an yellow exclamation mark on the device manager, and the upgrade program didn't find the USB IR Toy.
I managed to solve this by disconnecting and reconnecting the USB IR Toy with the pins PGC and PGD shorted, until the HID device was correctly detected (no yellow exclamation mark on the device manager), and then run the upgrade program.
Title: Re: Troubles upgrading firmware to v22
Post by: ian on January 09, 2012, 04:32:21 pm
Thanks for the report. This is something I need to examine further. If anyone else reads this thread and has a Bus Pirate in this state, please let me know before reflashing it. We might be able to extract some debug info if you have a PIC programmer.
Title: Re: Troubles upgrading firmware to v22
Post by: Doug on January 09, 2012, 04:41:49 pm
Hi, Ian.

The solder, board, pins, etc. all look solid.  I'll contact Seeed.

Thanks,
Doug
Title: Re: Troubles upgrading firmware to v22
Post by: abcypd on March 12, 2012, 10:52:12 pm
I have the same problem.
Periodical connection los, and after upgrade to v22 same problems.
After some time (5 minutes or so) ir toy 2 LED was OFF and had a device error in linux.
No luck with reflash in Windows, because i cannot see virtual COM device.
After connect PGC and PGD LED is always on and there is a USB-HID device in Windows.

How can i reflash ir toy 2, while it is in USB-HID mode?

Here is linux dmesg log:

[  958.000085] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0004
[  958.000105] uhci_hcd 0000:00:1d.1: port 2 portsc 008a,00
[  958.000126] hub 3-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
[  958.000136] usb 3-2: USB disconnect, device number 2
[  958.000144] usb 3-2: unregistering device
[  958.000152] usb 3-2: unregistering interface 3-2:1.0
[  958.000395] usb 3-2: usb_disable_device nuking all URBs
[  958.104060] hub 3-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100
[  959.250058] usb usb3: suspend_rh (auto-stop)
[  959.544420] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0010
[  959.544449] ehci_hcd 0000:00:1d.7: GetStatus port:4 status 001803 0  ACK POWER sig=j CSC CONNECT
[  959.544470] hub 1-0:1.0: port 4, status 0501, change 0001, 480 Mb/s
[  959.648063] hub 1-0:1.0: debounce: port 4: total 100ms stable 100ms status 0x501
[  959.699406] ehci_hcd 0000:00:1d.7: port 4 full speed --> companion
[  959.699425] ehci_hcd 0000:00:1d.7: GetStatus port:4 status 003801 0  ACK POWER OWNER sig=j CONNECT
[  959.699439] hub 1-0:1.0: port 4 not reset yet, waiting 50ms
[  959.750049] usb usb3: wakeup_rh (auto-start)
[  959.750106] ehci_hcd 0000:00:1d.7: GetStatus port:4 status 003002 0  ACK POWER OWNER sig=se0 CSC
[  959.750145] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0010
[  959.750159] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0004
[  959.750173] uhci_hcd 0000:00:1d.1: port 2 portsc 0093,00
[  959.750187] hub 3-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
[  959.854063] hub 3-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101
[  959.956056] usb 3-2: new full-speed USB device number 3 using uhci_hcd
[  960.095051] usb 3-2: skipped 1 descriptor after interface
[  960.098047] usb 3-2: default language 0x0409
[  960.108045] usb 3-2: udev 3, busnum 3, minor = 258
[  960.108055] usb 3-2: New USB device found, idVendor=04d8, idProduct=fd0b
[  960.108066] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  960.108075] usb 3-2: Product: Diolan
[  960.108082] usb 3-2: Manufacturer: Diolan
[  960.108257] usb 3-2: usb_probe_device
[  960.108267] usb 3-2: configuration #1 chosen from 1 choice
[  960.110059] usb 3-2: adding 3-2:1.0 (config #1, interface 0)
[  960.110184] usbhid 3-2:1.0: usb_probe_interface
[  960.110193] usbhid 3-2:1.0: usb_probe_interface - got id
[  960.114205] generic-usb 0003:04D8:FD0B.0002: hidraw0: USB HID v1.01 Device [Diolan Diolan] on usb-0000:00:1d.1-2/input0
[  960.116955] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0004
Title: Re: Troubles upgrading firmware to v22
Post by: ian on March 13, 2012, 08:10:05 am
Hi abcypd,

Sorry about the problem.

The good news is you can only update in HID mode, please see the instructions here:
http://dangerousprototypes.com/docs/USB ... are_update (http://dangerousprototypes.com/docs/USB_IR_Toy_firmware_update)
Title: Re: Troubles upgrading firmware to v22
Post by: novelity on April 24, 2012, 04:10:07 am
Hello, my name is InJae Song.

I'm an HW engineer for devloping the WiMAX System in Korea.
I am interested in the USB Port Change Message.
Because I met an similar message about the Usb Port Chage as you described.

[ 958.000085] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0004
[ 958.000105] uhci_hcd 0000:00:1d.1: port 2 portsc 008a,00
[ 958.000126] hub 3-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
[ 958.000136] usb 3-2: USB disconnect, device number 2
[ 958.000144] usb 3-2: unregistering device

I have met a similar situation as below.

Apr 22 04:37:59 ralink user debug kernel: hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002   
Apr 22 04:37:59 ralink user debug kernel: hub 1-0:1.0: port 1, status 0101, change 0003, 12 Mb/s
Apr 22 04:37:59 ralink user info kernel: usb 1-1: USB disconnect, address 2

But I can't know why this situation happend and what 'port 1, status 0101, change 0003, 12 Mb/s' message means.

Could you tell me your thought about this problem?
Title: Re: Troubles upgrading firmware to v22
Post by: ian on April 24, 2012, 07:36:59 am
Hi InJae Song,

Is this related to the IR Toy, or is it a general USB question?

My guess:
port 1 - the USB socket used
status 0101 - a binary code of some sort (?)
change 0003 - USB state (?) or USB device type
12 Mb/s - speed of connection (12Mbps)
Title: Re: Troubles upgrading firmware to v22
Post by: novelity on April 24, 2012, 09:44:20 am
Hi Ian,

Thank you for your quick response.

This is not related to the IR Toy.
Just my problem...

When I searched the reason about USB Port Change message I can't understand,
I found your answer about USB Port Change that I'd like to know.
 
WiFi Module operates normally.
Suddenly Hub disconnection happened after the kernel of WiFi Modem(Ralink) sent us this message as below.

Apr 22 04:37:59 ralink user debug kernel: hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
Apr 22 04:37:59 ralink user debug kernel: hub 1-0:1.0: port 1, status 0101, change 0003, 12 Mb/s
Apr 22 04:37:59 ralink user info kernel: usb 1-1: USB disconnect, address 2

I'd like to know why the modem change the USB port suddenly during operating.
I want to remove the reason of USB Disconnection.

Could you advise about this problem(USB Disconnection) for me?
Title: Re: Troubles upgrading firmware to v22
Post by: ian on April 24, 2012, 09:52:17 am
I'm sorry, I don't know the cause.
Title: Re: Troubles upgrading firmware to v22
Post by: novelity on April 24, 2012, 10:28:27 am
Thank you for your kind answer.
See you.
Title: Re: Troubles upgrading firmware to v22
Post by: znelson32 on September 19, 2015, 11:03:27 pm
So this problem has existed for over three years and there's no damn solution? How nice. I blow $$$ on Ir Toys that SHIP WITH OLD FIRMWARES and then I run into this stupid bootloader hell and can't connect to the hardware to update it. Wonderful ripoff.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01082090344session_write_close ( )...(null):0
20.01112221920ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01112222696Database_MySQL->query( ).../DatabaseHandler.php:119
40.05302361416Database_MySQL->error( ).../Db-mysql.class.php:273