I build a wearable based on esp32 witch connects to an iOS app. It would be great if my customers could see the current battery level in the default iOS widget. To do so, you have to implement the custom at-command „HFP Command AT+XAPL“.
In Detail it is described here: 13.1 page 66:
https://developer.apple.com/accessories ... pdf#page66
Did anyone implement this? Or does this only works for bluetoooth and not Bluetooth LE?
Thanks a lot
Esp32 in iOS battery widget use HFP Command AT+XAPL
-
- Posts: 2
- Joined: Tue Apr 23, 2019 5:41 pm
Re: Esp32 in iOS battery widget use HFP Command AT+XAPL
Did you get any answer about this? I would like to do the same with BLE.
Cheers.
Cheers.
-
- Posts: 2
- Joined: Wed May 06, 2020 11:46 am
Re: Esp32 in iOS battery widget use HFP Command AT+XAPL
I have implemented AT+XAPL command. But for this you have to make changes to the ESP32 IDF framework and add functions implementing APPLE command. There is no direct function available that can be used to send custom AT commands.
Re: Esp32 in iOS battery widget use HFP Command AT+XAPL
can you please share the changes @sudhirmetaliya
-
- Posts: 2
- Joined: Wed May 06, 2020 11:46 am
Re: Esp32 in iOS battery widget use HFP Command AT+XAPL
I have attached the changes.txt file, follow the instructions mentioned in it to make the respective changes in ESP-IDF. All the details like dir, file name, line number and changes to be made are mentioned in the file.
- Attachments
-
- changes.txt
- (3.7 KiB) Downloaded 570 times
Re: Esp32 in iOS battery widget use HFP Command AT+XAPL
Hello, I'm new in develop ESP32. I do this changes like in your instruction, but have errorssudhirmetaliya wrote: ↑Thu Aug 13, 2020 5:58 amI have attached the changes.txt file, follow the instructions mentioned in it to make the respective changes in ESP-IDF. All the details like dir, file name, line number and changes to be made are mentioned in the file.
esp/esp-idf/components/bt/host/bluedroid/api/esp_hf_client_api.c:339:16:error: 'BTC_HF_CLIENT_SEND_APPLE_EVT' undeclared (first use in this function); did you mean 'BTC_HF_CLIENT_SEND_NREC_EVT'?
msg.act = BTC_HF_CLIENT_SEND_APPLE_EVT;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
BTC_HF_CLIENT_SEND_NREC_EVT
esp/esp-idf/components/bt/host/bluedroid/api/esp_hf_client_api.c:358:16: error: 'BTC_HF_CLIENT_SEND_BATT_EVT' undeclared (first use in this function); did you mean 'BTC_HF_CLIENT_SEND_NREC_EVT'?
msg.act = BTC_HF_CLIENT_SEND_BATT_EVT;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
BTC_HF_CLIENT_SEND_NREC_EVT
/esp/esp-idf/components/bt/host/bluedroid/api/esp_hf_client_api.c:362:9: error: 'btc_hf_client_args_t' {aka 'union <anonymous>'} has no member named 'apple_batt'
arg.apple_batt.val = val;
Does this file contain all the changes?
missing BTC_HF_CLIENT_SEND_APPLE_EVT definition
and BTC_HF_CLIENT_SEND_BATT_EVT
In newer IDF 5.0 components updated and have the same examples with apple specific commands, but it doesn't work on iPhone specifically. and it works on android OS/
Can you help me?
Maybe because IDF 5.0 does not stable release.
Who is online
Users browsing this forum: No registered users and 24 guests