BLE SPP example & UUID

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

BLE SPP example & UUID

Postby PeterR » Fri Nov 16, 2018 3:03 pm

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.
& I also believe that IDF CAN should be fixed.

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE SPP example & UUID

Postby chegewara » Fri Nov 16, 2018 5:55 pm

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

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: BLE SPP example & UUID

Postby PeterR » Mon Nov 19, 2018 11:12 am

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
Last edited by PeterR on Mon Nov 19, 2018 11:47 am, edited 1 time in total.
& I also believe that IDF CAN should be fixed.

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE SPP example & UUID

Postby chegewara » Mon Nov 19, 2018 11:30 am

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.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: BLE SPP example & UUID

Postby PeterR » Mon Nov 19, 2018 11:50 am

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.
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: No registered users and 109 guests