Closed Bretthansenpc closed 1 year ago
Hello, look at the serial output in ESPHome. If you press a button that is not in the keymap a warning message should appear, that contains the data bytes of that key. Then you can add it to the keymap.
Unfortunately for anything I connect as soon as I hit a button it panics and reboots I'll see if that contains the key :-)
If you could upload the logs, then maybe I can have a better understanding what is going on. Unfortunately I have no possibility to test things at the moment because I am away from home for a longer period of time. If you use Home Assistant maybe look at the new Bluetooth Proxy feature that allows to connect Bluetooth devices directly to HomeAssistant via an ESP32.
sorry for the late responce haha this is what i get when i press the down button it registers the button and identifys it but panics
[07:57:58][I][ble_hid_client.cpp:644]: Start scanning for HID-BLE-Devices for 3600 seconds [07:57:58][W][ota:095]: Last Boot was an unhandled reset, will proceed to safe mode in 8 restarts [07:58:33][I][ble_hid_client.cpp:463]: Found HID device: [07:58:33][I][ble_hid_client.cpp:466]: address: f8:fc:e1:b4:f9:b9 [07:58:33][I][ble_hid_client.cpp:468]: name: AR [07:58:33][I][ble_hid_client.cpp:471]: connect to the remote device. [07:58:34]lld_pdu_get_tx_flush_nb HCI packet count mismatch (0, 1) [07:58:34][I][esp-idf:000]: W (98104) BT_HCI: DiscCmpl evt: hdl=0, rsn=0x3e [07:58:34] [07:58:36][I][ble_hid_client.cpp:443]: Pairing success [07:58:36][I][ble_hid_client.cpp:447]: auth mode = ESP_LE_AUTH_BOND [07:58:44][I][ble_hid_client.cpp:307]: Pressed key DOWN [07:58:44]Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. [07:58:44] [07:58:44]Core 0 register dump: [07:58:44]PC : 0x400d33eb PS : 0x00060130 A0 : 0x800d2c10 A1 : 0x3ffdbbf0 WARNING Decoded 0x400d33eb: esphome::BleHidClientComponent::getKeycodeSensor() at C:\Users\Brett\Downloads\esphome-ble-remote-master\esphome-ble-remote-master\.esphome\build\ble-remote-connector/src/ble_hid_client.cpp:650 (inlined by) gattc_profile_event_handler at C:\Users\Brett\Downloads\esphome-ble-remote-master\esphome-ble-remote-master\.esphome\build\ble-remote-connector/src/ble_hid_client.cpp:308 [07:58:44]A2 : 0x00000000 A3 : 0x00000051 A4 : 0x00000051 A5 : 0x3ffb7dfc [07:58:44]A6 : 0x3ffc60e0 A7 : 0x3ffdbbf0 A8 : 0x800d33e8 A9 : 0x3ffdbb90 [07:58:44]A10 : 0x00000003 A11 : 0x3f40015d A12 : 0x00000133 A13 : 0x3f40061b [07:58:44]A14 : 0x3ffdbc18 A15 : 0x00000006 SAR : 0x00000004 EXCCAUSE: 0x0000001c [07:58:44]EXCVADDR: 0x00000014 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff [07:58:44] [07:58:44]Backtrace:0x400d33e8:0x3ffdbbf0 0x400d2c0d:0x3ffdbc60 0x400e1cd2:0x3ffdbc80 0x400e21fd:0x3ffdbca0 0x400fd601:0x3ffdbce0 0x400ff54f:0x3ffdbd00 WARNING Found stack trace! Trying to decode it WARNING Decoded 0x400d33e8: esphome::BleHidClientComponent::getKeycodeSensor() at C:\Users\Brett\Downloads\esphome-ble-remote-master\esphome-ble-remote-master\.esphome\build\ble-remote-connector/src/ble_hid_client.cpp:650 (inlined by) gattc_profile_event_handler at C:\Users\Brett\Downloads\esphome-ble-remote-master\esphome-ble-remote-master\.esphome\build\ble-remote-connector/src/ble_hid_client.cpp:308 WARNING Decoded 0x400d2c0d: esphome::esp_gattc_cb(esp_gattc_cb_event_t, unsigned char, esp_ble_gattc_cb_param_t*) at C:\Users\Brett\Downloads\esphome-ble-remote-master\esphome-ble-remote-master\.esphome\build\ble-remote-connector/src/ble_hid_client.cpp:534 WARNING Decoded 0x400e1cd2: btc_gattc_cb_to_app at C:/Users/Brett/.platformio/packages/framework-espidf/components/bt/host/bluedroid/btc/profile/std/gatt/btc_gattc.c:24 WARNING Decoded 0x400e21fd: btc_gattc_cb_handler at C:/Users/Brett/.platformio/packages/framework-espidf/components/bt/host/bluedroid/btc/profile/std/gatt/btc_gattc.c:1002 WARNING Decoded 0x400fd601: btc_thread_handler at C:/Users/Brett/.platformio/packages/framework-espidf/components/bt/common/btc/core/btc_task.c:184 WARNING Decoded 0x400ff54f: osi_thread_run at C:/Users/Brett/.platformio/packages/framework-espidf/components/bt/common/osi/thread.c:68 [07:58:44] [07:58:44] [07:58:44]ELF file SHA256: 2490735533409416 [07:58:44] [07:58:44]Rebooting... [07:58:44]ets Jun 8 2016 00:22:57 [07:58:44] [07:58:44]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) [07:58:44]configsip: 0, SPIWP:0xee [07:58:44]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 [07:58:44]mode:DIO, clock div:2 [07:58:44]load:0x3fff0030,len:7580 [07:58:44]ho 0 tail 12 room 4 [07:58:44]load:0x40078000,len:14912 [07:58:44]load:0x40080400,len:3688 [07:58:44]entry 0x4008067c
i will look into the proxy as well thank you!
Also with 9.0 I'll see if Bluetooth will work natively since I am close to the server
Still can't get it to work what esp do you use? Maybe I need one with more ram?
I have an ESP32-WROOM-32. Have you changed anything in the .yaml file other than what is needed to be changed according to the comments?
Nothing changed other than what I needed to change :-)
Any thoughts on what I'm doing wrong?
If there's anything I can do to help, I'm happy to provide what I can haha I see a few new commits and reverts I appreciate the work your putting in so much!!!
Just ran into the same issue, let me know if you need more input, I tried going back 2 commits, but ran into compile issues... did not try to dig further yet though...
So I finally got around to look at the issue and was able to fix it with pull request #11. Please let me know if it is working for you now, so I cn close this issue. Thank You.
Now once it compiles and flashes it scans and hangs showing
[10:16:29][I][ble_hid_client.cpp:646]: Start scanning for HID-BLE-Devices for 3600 seconds
I've tried different remotes all in pairing mode and never goes from that line
I have just added a bit of code that hopefully fixes it for you, if not it would be great if you could set the logger to DEBUG mode and upload the log. The new version is in this branch.
and just like that you are amazing!!!! thank you so much!!!!!! it works great!!! I will be testing a Pokeball plus to see if it works as well THANK YOU!!!!
One thing though devices that used to connect in the reboot version no longer try to connect. I'll get a log but it just scans and continues without connecting.
Here is my Log file from a restart trying to use an 8bitdo Zero 2 Controller
Thought I would reopen it just in case other remotes are possible. If not please close this thanks again!
Here is the log from a ring i have it finds it no problem but seems to never attempt to connect even though its in pairing mode
I have the newest fire tv voice remote 3rd gen and I have no idea how to decode the buttons to put them into the keymap. Is there any way I can do this?