Closed Hamberthm closed 4 months ago
I'm not sure how to read up on this but how do I setup your fork with Arduino? I thought this required ESP-IDF to build. I'm sorry I don't understand how they work together.
I'm not sure how to read up on this but how do I setup your fork with Arduino? I thought this required ESP-IDF to build. I'm sorry I don't understand how they work together.
You should be able to copy the code and use it under Arduino IDE and compile/upload for the ESP-32 board. If you don't know how to compile for ESP under Arduino, look for a guide, there's plenty of info.
Basically esp_bt_controller_init(&bt_cfg)
was not working with the Arduino core for ESP32, so I chnget it for btStart()
. You can look at the commit and the code comments.
Hi! Sorry if I'm doing this wrong or if it's just a mess. I'm a noob on Git and in coding in general. I just want to bring awareness on the many improves I made to the code:
-added
isConnected
flag,hidh_callback()
will update it in case of connections/disconnections. -nowdevices_scan(
) returns true if a device of interest has been found and connection open requested for it (doesn't guarantee connection, refer toisConnected
for that) -added BLE security params and enabled bonding/permanent key exchange. -nowhandle_ble_device_result()
anddevices_scan()
will retrieve the bonded devices list from flash and connect to the latest bonded device if in range, avoiding the need to enter pairing mode, otherwise discovery and pairing goes on as normal. -addedquick_reconnect()
function that can be recursively called ifisConnected
flag goes false. This will try to reconnect to the latest device without losing time on scanning. This is critical for battery keyboards that go to sleep or reset.