I've been 'playing' with BLE on esp32 for a while (mostly because I have a simple idea that needs it..)
Up until now I've not really managed to get it to work reliably - although I could connect etc.
Until now - and I have managed to get a esp32 running as a BLE client.
Writing data to UUID 0xABF3 calls the macro Test with the new data as an argument (and here Test just outputs the values to a UART)
I'm not sure I fully understand the ins and outs of GATT and GAP - and I don't yet have an Android app of my own to send data (I'm using nRF connect)
After uploading (note no changes are needed to the program configuration) open a COM port using Putty or similar (on whatever com port at 115200)
Then in nRF Connect :
The esp32 shows in the 'scanner' as ESP_SPP_FCODE1 and after connecting - click on Unknown service UUID 0xABF0 (Primary service)
Click the 'up arrow' by UUID AbF3 and enter a value and then send then gasp as the values are output in putty (in decimal - sent in hex) along with much debug info..
Any suggestions / help polishing this a bit?
There is another characteristic - ABF4 that enables or disables notifications?
All the BLE handling is in supplementary code.
Martin
ESP32 BLE - a start
-
- Valued Contributor
- Posts: 1042
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 107 times
- Been thanked: 538 times
-
- Valued Contributor
- Posts: 1213
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 297 times
- Been thanked: 429 times
Re: ESP32 BLE - a start
Hi
I'm off down to the NEC this week or I'd definitely be trying it out.
Regards
I'm off down to the NEC this week or I'd definitely be trying it out.
Regards
-
- Valued Contributor
- Posts: 1213
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 297 times
- Been thanked: 429 times
Re: ESP32 BLE - a start
Hi
Solar & Storage LIVE
https://www.terrapinn.com/exhibition/so ... /index.stm
A friend has a company exhibiting and asked me along to assist. Free food for me so why not
Regards
Solar & Storage LIVE
https://www.terrapinn.com/exhibition/so ... /index.stm
A friend has a company exhibiting and asked me along to assist. Free food for me so why not
Regards
-
- Valued Contributor
- Posts: 798
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 157 times
- Been thanked: 185 times
Re: ESP32 BLE - a start
Hi Martin
very good!
A long time ago I used Microchip App for BLE on my mobile phone to test BLE.
In that time I also used a Microchip BT Device.
I also remember another BLE terminal program.
But unfortunately I changed the mobile phone.
I'll see if I can still find it
regards
Stefan
very good!
A long time ago I used Microchip App for BLE on my mobile phone to test BLE.
In that time I also used a Microchip BT Device.
I also remember another BLE terminal program.
But unfortunately I changed the mobile phone.
I'll see if I can still find it
regards
Stefan
- Attachments
-
- Snag_1e6b588c.png (221.83 KiB) Viewed 859 times
-
- Valued Contributor
- Posts: 1042
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 107 times
- Been thanked: 538 times
Re: ESP32 BLE - a start
That looks good - nRF Connect is rather utilitarian but does work on android or Windows..
The android app is actually better than the pc version.
Martin
The android app is actually better than the pc version.
Martin