ESP32 BLE - a start

For general Flowcode discussion that does not belong in the other sections.
Post Reply
mnfisher
Valued Contributor
Posts: 1008
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 106 times
Been thanked: 522 times

Flowcode v10 ESP32 BLE - a start

Post by mnfisher »

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.
ble_fc1.fcfx
(30.53 KiB) Downloaded 48 times

Martin

chipfryer27
Valued Contributor
Posts: 1203
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 289 times
Been thanked: 424 times

Re: ESP32 BLE - a start

Post by chipfryer27 »

Hi

I'm off down to the NEC this week or I'd definitely be trying it out.

Regards

mnfisher
Valued Contributor
Posts: 1008
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 106 times
Been thanked: 522 times

Re: ESP32 BLE - a start

Post by mnfisher »

What's on at the NEC?

chipfryer27
Valued Contributor
Posts: 1203
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 289 times
Been thanked: 424 times

Re: ESP32 BLE - a start

Post by chipfryer27 »

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 :lol:

Regards

stefan.erni
Valued Contributor
Posts: 771
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 151 times
Been thanked: 173 times

Re: ESP32 BLE - a start

Post by stefan.erni »

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
Attachments
Snag_1e6b588c.png
Snag_1e6b588c.png (221.83 KiB) Viewed 768 times

mnfisher
Valued Contributor
Posts: 1008
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 106 times
Been thanked: 522 times

Re: ESP32 BLE - a start

Post by mnfisher »

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

Post Reply