jackhumbert / pinebook-pro-keyboard-updater

A keyboard/touchpad firmware and updater for the Pinebook Pro
78 stars 11 forks source link

Failed to open in boot mode #34

Open Fresnelium opened 3 years ago

Fresnelium commented 3 years ago

After step 1, rebooting, and running step 2, I get the message: Failed to open in boot mode. Keyboard mapping appears to be very wrong and track pad will not work. I have tried repeating step 1, but i get the same error message. Any suggestions how to resvert the firmware?

Fresnelium commented 3 years ago

I have tried the following: running "sudo ./updater step-1 ansi" about 200 times shutdown instead of reboot run updater script from live usb version of a different distro running in virtual terminal (alt+ctrl+f2) running updater with no external keyboard plugged in via script. cloning the git repo from both here and the version by ayufan.

In all cases, I get: Trying to open uid: dev 0603 pid:1020 Device not found Failed to open in boot mode.

keyboard shows up in lsusb, but with id: 258a:001f

Any other suggestions? In case there is no software solution, is the keyboard mcu in the keyboard module or on the pinebook main board?

Fresnelium commented 3 years ago

lsusb running in the background is able to find the device (Bus 003 Device 007: ID 0603:1020 Novatek Microelectronics Corp. ) about 1 second after the updater script starts. Is it possible that the mcu is exiting bootmode before the first rc = open_boot_mode()? I do not see any sleep statements between switch_to_boot_mode() and open_boot_mode. Is there any other reason libusb_open_device_with_vid_pid() would be returning NULL? libusb documentation has not been very helpful. (YES, I am running with sudo).

script output with a bit of debugging added:

Mon 21 Dec 2020 01:43:40 AM PST Running STEP-1... [*] Flashing keyboard updater firmware...

Fix hex file

Mon Dec 21 01:43:40 2020

[*] Opening in user mode...

Trying to open VID:258a PID:001e... libusb_open_device_with_vid_pid >>> Device not found Trying to open VID:258a PID:001f... Kernel Driver Active [] Sending command to switch to boot mode... [] Command send release interface

Mon Dec 21 01:43:40 2020

[*] Opening in boot mode

Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 0, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 1, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 2, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 3, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 4, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 5, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 6, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 7, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 8, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 9, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 10, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 11, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 12, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 13, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 14, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 15, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 16, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 17, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 18, rc: -1 Trying to open VID:0603 PID:1020... libusb_open_device_with_vid_pid >>> Device not found Try: 19, rc: -1

Mon Dec 21 01:43:44 2020

Failed to open in boot mode

lsusb running concurrently: Mon 21 Dec 2020 01:43:40 AM PST 1 Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 2 Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 3 Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 4 Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 5 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 6 Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub 7 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 8 Bus 003 Device 122: ID 258a:001f HAILUCK CO.,LTD USB KEYBOARD 9 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 10 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 11 Mon 21 Dec 2020 01:43:40 AM PST 12 Bus 003 Device 123: ID 0603:1020 Novatek Microelectronics Corp. 13 Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 14 Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 15 Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 16 Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 17 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 18 Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub 19 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 20 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 21 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 22 Mon 21 Dec 2020 01:43:43 AM PST 23 Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 24 Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 25 Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 26 Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 27 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 28 Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub 29 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 30 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 31 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub