-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List of supported / unsupported Apple devices (iPhones, iPads, Macs etc.) #51
Comments
A good rule of thumb would be that any device that doesn't support Bluetooth 4.0 or higher would not be compatible. Bluetooth 4.0 is where Bluetooth Low Energy, (aka Bluetooth LE, aka BLE, aka Bluetooth Smart) was introduced into the standard. For Apple products, Bluetooth 4.0 or 4.2 was introduced with the: 3rd generation iPad in 2012, iPhone 4s, MacBook Air 2011, MacBook Pro 2012, MacMini 2011, iMac 2012. I think that having a list (maybe in the top README) of tested devices (Apple and not) is valuable in any case. |
Thanks, good point, I will add that to the list. Do the older Mac devices not support Bluetooth LE at all or is there a chance that it may work with an external Bluetooth LE adapter? |
Library version 0.22 iPad Air 10.3.3 and iPhone 7+ 12.x.x can't find device |
Thanks for reporting. Can you explain what you mean by "very limited by app"? |
you can't scroll image on Photo app by send LEFT ARROW, RIGHT ARROW key, but i test on iPad gen 6 or 7 it work OK |
I think the issue is with the app in that case. Maybe the app simply doesn't support scrolling using the arrow key. You could try using ESP32-BLE-Mouse for that instead. |
thank you i will try :D my ipad too old :( |
Tested with v0.2.2, works with Windows 10 and Android 7.0, but NONE of my Apple devices can see the advertisement from ESP32: |
Imteresting can you try release 0.2.2 again but delete this line? ESP32-BLE-Keyboard/BleKeyboard.cpp Line 152 in 928c093
When you say "can find the ESP32", do you just mean find or can you actually connct and send keystrokes successfully? |
|
@frank7fan Same for me, thanks for the hint how to fix it! Tested it also on my devices. It works with
but it doesn't with
So either it's a timing or a character length issue. |
Maybe this is an issue with the Apple device remembering the device and getting confused because the Bluetooth MAC address didn't change, but the device name did. I honestly don't know what to do if you say that compatibility for some devices breaks when using Maybe someone can test what I mentioned here again: #51 (comment) But this time completely disconnect, unpair and forget the ESP32 on each Apple device first. |
No, not really. I can change the name to "FooBar" and it still works. But not "FooBarFooBarFooBar". |
Confirmed when device name greater than 15 chars, iDevices will not see the advertising. |
I don't know the BLE spec, but a short Google around tells me 31bytes for device name. UTF8 uses 2 byte per char, or? So it could handle 15 chars and 16 will break the spec. Would make sense. But I'm not sure, because I'm no expert in this. |
I don't think there is a limit to the device name's length directly. I think the advertising packet has a total size limit and the max device name length is dependent on what else is in the packet. But I'm no expert on this topic either... So now that we figured out that having a long device name causes issues, it would be nice to see some clean tests (disconnect, unpair, forget, clear cache by turning off Bluetooth before every test) comparing the unmodified library vs the one without |
I can confirm this code works with
This takes pictures on all 3 phones. I can not work on my 3D printer timelapse!!
|
I just test the default example with Apple MacBook Pro 2020 with M1 chip, and I am not able to find the device, then also I tested it with MacBook Pro Mid 2012 and also there I can't find it, but when I upload BleMouse example on my esp32 and pair it with those MacBooks, when the device paired I'm able to upload BleKeyboard example on the esp32 and everything works fine, but if I unpair the esp32 again I can't find it! |
On a macOS Catalina Version 10.15.7 - MacBook Pro (15-inch, 2017), I can't see any unbound ESP32-BLE devices from the OSX BlueTooth Bar or App, I need to use an application called LightBlue LE to see all BLE devices and force a connection to my ESP32-BLE device and then connection happens each time the device is on. I have not tested with shorter device names. Not sure if that helps. |
Using
I commented out BleKeyboard.cpp LN:152 In all cases I was using default I only tested with a very limited set of key combinations. The Hello example and I found some circa 2004 information that indicates the Apple does not show BLE devices in the Bluetooth list. Now sure if this is helpful but I put this on my MacOS Bluetooth sniffer and here is the difference seen: When showing up in Bluetooth listWhen not showing up in Bluetooth listCapture from a made for iPad keyboard
|
Couldn't see the device in iPad Pro (2nd generation, BT 4.2) when initialized with: BleKeyboard bleKeyboard; Works great with suggested line: BleKeyboard bleKeyboard("ESP32-Keyboard2", "Me", 100); |
Just replicated @frank7fan's suggestion above. Thanks! |
@T-vK First of all, thank you very much for creating such a useful library! I just confirmed that the following devices worked with limiting the device name within 15 characters as @frank7fan suggested Mac mini (M1, 2020) | macOS Big Sur 11.3 |
An advertising packet can be up to 31 bytes of data. Each field (i.e. appearance, name, service UUID or similar) have a header of 2 bytes (length and type), meaning that the maximum user payload is 29 bytes. When you reach this limit, the ble_advdata_set() method of the SDK will start returning an error, NRF_ERROR_DATA_SIZE (0x0C). Remember that if you need to transfer additional data before establishing a connection, you can add a scan response, which can contain an additional 31 bytes. A scan response packet can be set by passing a pointer to an addtional ble_advdata_t as the second parameter of ble_advdata_set(). (Origin: https://devzone.nordicsemi.com/f/nordic-q-a/14/what-s-the-maximum-size-for-an-advertisement-package) Leave aside the fact that it talks about the NRF SDK. The size limitation is according to the BLE spec. See also this: https://jimmywongiot.com/2019/08/13/advertising-payload-format-on-ble/ |
#111 Should fix most of the iOS and Mac OS issues once you disconnect and unpair/forget the ESP on your device and then reconnect. The default name has been changed to |
@T-vK how can we test that release ? I am using platformio |
I guess the easiest way would be to download that branch as a zip file and install that just like you would do with a normal release. |
The easiest way to test this using PlatformIO is to edit the platformio.ini: lib_deps =
https://github.com/sivar2311/ESP32-BLE-Keyboard or for NimBLE-Mode: build_flags=
-D USE_NIMBLE
lib_deps =
NimBLE-Arduino
https://github.com/sivar2311/ESP32-BLE-Keyboard |
Worked with iPad Pro 9.7 (2016) and IOS 14.7.1 when using BleKeyboard bleKeyboard("ESP32Kbd") with library version 0.2.3 iOS issues this warning: "Using ESP32kbd may affect Wi-Fi and Bluetooth connectivity" My board is an Adafruit HUZZAH32 (ESP-WROOM-32) (WiFi + BLE) Longer keyboard names or names with spaces or special characters do not appear on iOS´s Bluetooth devices list (i.e. ESP32-BLE-Keyboard or ESP32 BLE Keyb) |
Okay @T-vK @sivar2311 this seems to fix the issue. |
Okay great, so it works on Mac OS. :) Is anyone with an iOS device willing to test that version? https://github.com/sivar2311/ESP32-BLE-Keyboard/archive/refs/heads/master.zip |
@T-vK I just confirmed with my iPhone XS (iOS 14.7.1) with both default and a long name. Both worked fine, and the long name was truncated at 15 characters as expected.
|
Thank you, I've created an official release including all these fixes now. v0.3.0 |
Hello! Trying to use v3.0.1-beta and have used the example code and modified "BleKeyboard bleKeyboard("ESP key", "ME", 100);" I do see "ESP Key" in my bluetooth devices. It shows as "connected" in the bluetooth applet. But there is a spinning cursor next to it. According to the log the ESP32 appears to think it is connected. But I see no keypresses being received to the focused app. If i remove power to the ESP32 and reconnect it, it will not connect again until i click "remove" on the device in the bluetooth applet. What may I Be missing here? |
I can confirm the latest release works on
Actually typed this comment using a ESP32 keyboard. |
“iPad 2, iOS 9.3.5: need turn off and on BLE” Hi @frank7fan, can you expand on that? How did you turn off and on BLE on the ESP32? |
I would like to maintain a list of Apple devices here that work or don't work with this library.
If you have tested a device that is not listed with the same OS version yet, please add a comment and tell me which device and operating system (i.e. iOS version or Mac OS version).
If you tested a device that is already listed, but you had different results (e.g. list says it doesn't work, but for you it does work), please add a comment as well. (And don't forget to mention your device name and OS version.)
Devices that work
Devices that don't work
The text was updated successfully, but these errors were encountered: