Page 1 of 1
BLE SPP example & UUID
Posted: Fri Nov 16, 2018 3:03 pm
by PeterR
Just getting started with BLE.
The ESP SPP example uses the 16 bit service UUID of 0xABF0
My understanding is that BLE does not have an SPP service and that we are not allowed to use 16bit UUIDs (unless we pay and register) for custom services.
BT has the SPP as 0x1101 in anycase.
Is the 0xABF0 example just a poor choice or is there some meaning to it?
Also, I am struggling to find out how the 'spp_adv_data' (used in esp_ble_gap_config_adv_data_raw()) raw advert array of bytes was arrived at.
Thanks.
Re: BLE SPP example & UUID
Posted: Fri Nov 16, 2018 5:55 pm
by chegewara
Im pretty sure it is just a "bad choice", since:
In Bluetooth classic (BR/EDR) systems, a Serial Port Profile (SPP) is an adopted profile defined by the Bluetooth Special Interest Group (SIG) used to emulate a serial port connection over a Bluetooth wireless connection. For BLE systems, an adopted SPP profile over BLE is not defined, thus emulation of a serial port must be implemented as a vendor-specific custom profile.
https://github.com/espressif/esp-idf/bl ... /README.md
Also you can see this article about spp over ble:
https://www.silabs.com/community/thunde ... scrip-1ExC
Re: BLE SPP example & UUID
Posted: Mon Nov 19, 2018 11:12 am
by PeterR
Thanks.
And this explains the binary advert:
https://www.silabs.com/community/wirele ... tisin-hGsf
EDIT: So I am still confused as the advert contains the list of 16 bit adopted UUIDs. The SPP example shows 0xABF0.
So if I should use a 128bit UUID then what do I put in the advert?
EDIT: Got it, I just use type 0x07
Re: BLE SPP example & UUID
Posted: Mon Nov 19, 2018 11:30 am
by chegewara
In advert you can put whatever you want. Advertised serviseUUID does not have to match services UUID served by your device, my understanding is that it to help filter and find devices you are looking for without connecting it and sometimes to gather data without connecting device.
Re: BLE SPP example & UUID
Posted: Mon Nov 19, 2018 11:50 am
by PeterR
Thanks. I read the article again & it is all explained.
I should use a 128 bit UUID for my unique SPP and introduced with a 0x06 or 0x07 data type value.
All seems to make perfect sense.