Flashing the firmware with an PIC programmer?

USB infrared remote control receiver/transmitter. Get one for $20, including worldwide shipping.

Flashing the firmware with an PIC programmer?

Postby TomE » Sat Mar 25, 2017 4:53 am

Hi,

I have my IR Toy in firmware upgrade mode but it looks like the macOS Sierra grabs the USB HID device exclusively:
My self-compiled and and log statement enriched version of fw_update says it fails to open the USB port.
trying fw_update with a Windows7 or Windows 10 VM on that Sierra machine also fails.

It looks like the only way for me is to use an PIC programmer to flash the IR Toy.
I tried to flash the firmware with an PIC KIT 2 programmer. However, I can not get a working device with my firmware flash attempts.
I tried:

- Flash the v22 firmware .hex => Seems missing the boot loader
- Flash the Bootloader afterwards -> Seems to overwrite the firmware
- Flash a firmware created by merging boot loader + firmware.v22 merged with the python intelhex package.

All three options just 'brick' my IRToy. Restoring an firmware dump extracted poor to flaming brings it back in the "HID firmware upgrade mode".

Any hints how to:
- get it out of firmware upgrade mode with ah PIC programmer
- create a firmware I can upload with the PIC KIT programmer?
- which regions to program? the PicKit programmer has the options

memory regions:
P = Program memory
E = EEPROM
I = ID memory
C = Configuration memory
TomE
Newbie
Newbie
 
Posts: 2
Joined: Sat Mar 25, 2017 4:34 am

Re: Flashing the firmware with an PIC programmer?

Postby TomE » Tue Mar 28, 2017 2:50 am

Answering myself:

For another project with the Diolan boot loader someone created an codeless KEXT that prevents the system HID driver to seize the USB IR toy: viewtopic.php?f=23&t=1654&p=41736#p41736. Not sure if this still works in sierra as KEXTs now need to be code signed, though.

I sidestepped the issue by using an Raspberry PI to update the firmware via Doolan.

Regarding flashing with PicKit2: It turned out the merged destination file.hex was written to a wrong location so I always flashed an version without boot loader. However, the correctly merged version has a few differences to the firmware image resulting from the HID based upgrade - mainly the first bytes of the memory at 0x800 (jump vectors??) and EEProm contents. I did not try if the combined firmware also works.
TomE
Newbie
Newbie
 
Posts: 2
Joined: Sat Mar 25, 2017 4:34 am


Return to USB Infrared Toy