OpenAnnePro / AnnePro2-Shine

Custom LED Matrix Firmware for Open Anne Pro 2 QMK Port
GNU General Public License v2.0
100 stars 51 forks source link

"unable to open device: OpenHidDeviceError" when flashing #8

Closed Nanoseb closed 4 years ago

Nanoseb commented 4 years ago

Hi,

First, thank you guys for all the work on the qmk port and reverse engineering, what you've done is pretty amazing.

So, I managed to put QMK on my board, and it works well (that's already awesome!). However I have troubles putting the shine firmware. The compilation of this repo works fine, it finished without errors and produces a .bin file. However when trying to use annepro2_tools I get the following error (with export RUST_BACKTRACE=full):

$ ../../AnnePro2-Tools/target/release/annepro2_tools -t led annepro2-shine.bin 
args: ArgOpts {
    vid: 0x4d9,
    pid: 0x8008,
    base: 0x4000,
    loosy: false,
    target: "led",
    file: "annepro2-shine.bin",
}
HID Dev: 05ac:0290 if: 0
HID Dev: 05ac:0290 if: 1
HID Dev: 05ac:0290 if: 2
HID Dev: 04d9:8008 if: 0
HID Dev: 04d9:8008 if: 1
thread 'main' panicked at 'unable to open device: OpenHidDeviceError', src/annepro2.rs:61:26
stack backtrace:
   0:     0x5566b3b20b44 - backtrace::backtrace::libunwind::trace::h812748238d609e46
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1:     0x5566b3b20b44 - backtrace::backtrace::trace_unsynchronized::h7c97e818aebf09c8
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2:     0x5566b3b20b44 - std::sys_common::backtrace::_print_fmt::h60d914263b0ccd71
                               at src/libstd/sys_common/backtrace.rs:78
   3:     0x5566b3b20b44 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf78227137afc7565
                               at src/libstd/sys_common/backtrace.rs:59
   4:     0x5566b3b4088c - core::fmt::write::h543cdf60775f89bf
                               at src/libcore/fmt/mod.rs:1069
   5:     0x5566b3b1eaa3 - std::io::Write::write_fmt::h0c7f3ce24c679426
                               at src/libstd/io/mod.rs:1504
   6:     0x5566b3b23135 - std::sys_common::backtrace::_print::h80e55e24be231368
                               at src/libstd/sys_common/backtrace.rs:62
   7:     0x5566b3b23135 - std::sys_common::backtrace::print::h3b197b9c1261c865
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x5566b3b23135 - std::panicking::default_hook::{{closure}}::ha6c807149ce20f8f
                               at src/libstd/panicking.rs:198
   9:     0x5566b3b22e72 - std::panicking::default_hook::he49a9c12e358cc45
                               at src/libstd/panicking.rs:218
  10:     0x5566b3b23792 - std::panicking::rust_panic_with_hook::h93f74f5ef2f71f31
                               at src/libstd/panicking.rs:511
  11:     0x5566b3b2337b - rust_begin_unwind
                               at src/libstd/panicking.rs:419
  12:     0x5566b3b3fc71 - core::panicking::panic_fmt::h1ce7d3a6bb2a90c1
                               at src/libcore/panicking.rs:111
  13:     0x5566b3b3fa93 - core::option::expect_none_failed::hb01994a49b20448c
                               at src/libcore/option.rs:1268
  14:     0x5566b3ab76f7 - annepro2_tools::annepro2::flash_firmware::h5acc418df38cc638
  15:     0x5566b3abd751 - annepro2_tools::main::h129157a0c26a3181
  16:     0x5566b3ab7da3 - std::rt::lang_start::{{closure}}::h53a88184365e9eb1
  17:     0x5566b3b23bd8 - std::rt::lang_start_internal::{{closure}}::h44dc84346eeba462
                               at src/libstd/rt.rs:52
  18:     0x5566b3b23bd8 - std::panicking::try::do_call::h3559ee6be71549e2
                               at src/libstd/panicking.rs:331
  19:     0x5566b3b23bd8 - std::panicking::try::h78f4c77016541848
                               at src/libstd/panicking.rs:274
  20:     0x5566b3b23bd8 - std::panic::catch_unwind::hfe46f382761b3d41
                               at src/libstd/panic.rs:394
  21:     0x5566b3b23bd8 - std::rt::lang_start_internal::he05790f0cb2000df
                               at src/libstd/rt.rs:51
  22:     0x5566b3abdef2 - main
  23:     0x7f6d040ca002 - __libc_start_main
  24:     0x5566b3ab64fe - _start
  25:                0x0 - <unknown>

Note that I manage to go to IAP mode, as when I am not in it I get an other error (thread 'main' panicked at 'No device found.).

Not sure it is useful to know, but I have a C15 device and lsusb shows: Bus 001 Device 073: ID 04d9:a290 Holtek Semiconductor, Inc. Anne Pro 2 QMK

Do any of you have leads on what am I doing wrong? or is there any more info I can provide to trouble shoot this?

Cheers, and thanks again for all your work!

Codetector1374 commented 4 years ago

Try again (unplug / replug into IAP) LOL this happens sometimes don’t really know why. Let me know if the issue still exists. Also try sudo might help. If you can flash QMK you can flash shine there’s nothing really different except the data is prefixed with different target. On Jul 12, 2020, 3:32 PM -0400, Nanoseb notifications@github.com, wrote:

Hi, First, thank you guys for all the work on the qmk port and reverse engineering, what you've done is pretty amazing. So, I managed to put QMK on my board, and it works well (that's already awesome!). However I have troubles putting the shine firmware. The compilation of this repo works fine, it finished without errors and produces a .bin file. However when trying to use annepro2_tools I get the following error (with export RUST_BACKTRACE=full): $ ../../AnnePro2-Tools/target/release/annepro2_tools -t led annepro2-shine.bin args: ArgOpts { vid: 0x4d9, pid: 0x8008, base: 0x4000, loosy: false, target: "led", file: "annepro2-shine.bin", } HID Dev: 05ac:0290 if: 0 HID Dev: 05ac:0290 if: 1 HID Dev: 05ac:0290 if: 2 HID Dev: 04d9:8008 if: 0 HID Dev: 04d9:8008 if: 1 thread 'main' panicked at 'unable to open device: OpenHidDeviceError', src/annepro2.rs:61:26 stack backtrace: 0: 0x5566b3b20b44 - backtrace::backtrace::libunwind::trace::h812748238d609e46 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86 1: 0x5566b3b20b44 - backtrace::backtrace::trace_unsynchronized::h7c97e818aebf09c8 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66 2: 0x5566b3b20b44 - std::sys_common::backtrace::_print_fmt::h60d914263b0ccd71 at src/libstd/sys_common/backtrace.rs:78 3: 0x5566b3b20b44 - ::fmt::hf78227137afc7565 at src/libstd/sys_common/backtrace.rs:59 4: 0x5566b3b4088c - core::fmt::write::h543cdf60775f89bf at src/libcore/fmt/mod.rs:1069 5: 0x5566b3b1eaa3 - std::io::Write::write_fmt::h0c7f3ce24c679426 at src/libstd/io/mod.rs:1504 6: 0x5566b3b23135 - std::sys_common::backtrace::_print::h80e55e24be231368 at src/libstd/sys_common/backtrace.rs:62 7: 0x5566b3b23135 - std::sys_common::backtrace::print::h3b197b9c1261c865 at src/libstd/sys_common/backtrace.rs:49 8: 0x5566b3b23135 - std::panicking::default_hook::{{closure}}::ha6c807149ce20f8f at src/libstd/panicking.rs:198 9: 0x5566b3b22e72 - std::panicking::default_hook::he49a9c12e358cc45 at src/libstd/panicking.rs:218 10: 0x5566b3b23792 - std::panicking::rust_panic_with_hook::h93f74f5ef2f71f31 at src/libstd/panicking.rs:511 11: 0x5566b3b2337b - rust_begin_unwind at src/libstd/panicking.rs:419 12: 0x5566b3b3fc71 - core::panicking::panic_fmt::h1ce7d3a6bb2a90c1 at src/libcore/panicking.rs:111 13: 0x5566b3b3fa93 - core::option::expect_none_failed::hb01994a49b20448c at src/libcore/option.rs:1268 14: 0x5566b3ab76f7 - annepro2_tools::annepro2::flash_firmware::h5acc418df38cc638 15: 0x5566b3abd751 - annepro2_tools::main::h129157a0c26a3181 16: 0x5566b3ab7da3 - std::rt::lang_start::{{closure}}::h53a88184365e9eb1 17: 0x5566b3b23bd8 - std::rt::lang_start_internal::{{closure}}::h44dc84346eeba462 at src/libstd/rt.rs:52 18: 0x5566b3b23bd8 - std::panicking::try::do_call::h3559ee6be71549e2 at src/libstd/panicking.rs:331 19: 0x5566b3b23bd8 - std::panicking::try::h78f4c77016541848 at src/libstd/panicking.rs:274 20: 0x5566b3b23bd8 - std::panic::catch_unwind::hfe46f382761b3d41 at src/libstd/panic.rs:394 21: 0x5566b3b23bd8 - std::rt::lang_start_internal::he05790f0cb2000df at src/libstd/rt.rs:51 22: 0x5566b3abdef2 - main 23: 0x7f6d040ca002 - __libc_start_main 24: 0x5566b3ab64fe - _start 25: 0x0 -

Note that I manage to go to IAP mode, as when I am not in it I get an other error (thread 'main' panicked at 'No device found.). Not sure it is useful to know, but I have a C15 device and lsusb shows: Bus 001 Device 073: ID 04d9:a290 Holtek Semiconductor, Inc. Anne Pro 2 QMK Do any of you have leads on what am I doing wrong? or is there any more info I can provide to trouble shoot this? Cheers, and thanks again for all your work! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Nanoseb commented 4 years ago

Thanks! flashing it in root worked (I tried a couple more times without root, and it was still not working), weird that I didn't have to do that for qmk. Anyway, thanks again.