Author Topic: Install a new Windows HID in less than five seconds?  (Read 4684 times)

bpaddock

  • Frequent Contributor
  • ****
  • Posts: 66
Install a new Windows HID in less than five seconds?
« on: June 16, 2017, 04:07:00 pm »
Working on a new bootloader for a NXP Kinetis part with a custom VID/PID.
The default ROM bootloader uses 0x15A2/0x0073, I'll say mine uses 0xDEAD 0xBEEF here.

I loaded the new firmware image via 0x15A/0x0073 with the NXP program BLHOST.
Once the unit was reset windows saw the devices as a new 0xDEAD/0xBEEF unit as expected.

Sadly I did not account for how slow Windoze is when installing a new driver. 

The bootloader only waits for five seconds for any bootloader commands to come in,
which can't happen because Windows has not yet installed the 0xDEAD/0xBEEF HID driver.
After five seconds Windows says "Device Unplugged" while the driver was being installed.

Now I have a device that I can not communicate with because Windoze did not complete the 0xDEAD/0xBEEF install.

Any suggestions, beyond opening the case and using JTAG (case is a pain due to being water resistant), on how to fix this chicken & egg problem?


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Install a new Windows HID in less than five seconds?
« Reply #1 on: June 20, 2017, 12:14:07 pm »
It sounds like the bootloader should wait until completing a Set Configuration request, indicating that enumeration is complete, before waiting for commands. Not sure if that is of any help to you though...

bpaddock

  • Frequent Contributor
  • ****
  • Posts: 66
Re: Install a new Windows HID in less than five seconds?
« Reply #2 on: June 20, 2017, 04:16:44 pm »
Sadly no, as the bootloader is in ROM in the KL27.

Any way to add a HID device via the registry?


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Install a new Windows HID in less than five seconds?
« Reply #3 on: June 21, 2017, 11:37:36 am »
I don't know of any way to bypass enumeration.

bpaddock

  • Frequent Contributor
  • ****
  • Posts: 66
Re: Install a new Windows HID in less than five seconds?
« Reply #4 on: June 22, 2017, 08:20:47 am »
It is actually the install process that needs bypassed. 
Once the device would be installed it would work fine.

I've looked through the registry at nearly identical devices.
Seems there should be a way to copy one of those, only changing the VID/PID/Port?
However I see the VID/PIDs in more than one place.


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Install a new Windows HID in less than five seconds?
« Reply #5 on: June 22, 2017, 10:37:33 am »
Worth a try I guess if for your own use only and at your own risk. Find something similar and emulate it in the registry.