Connect Wifi via Bluetooth Low Energy

doduong
Posts: 7
Joined: Wed Aug 30, 2017 7:58 am

Connect Wifi via Bluetooth Low Energy

Postby doduong » Wed Aug 30, 2017 8:28 am

Hi everyone,

I have started a project use wifi and ble. My esp32 will scan and send list of Access points to my smartphone via BLE. I will choose AP in smartphone then esp32 will conect with that AP. I can get AP list form Wifi but I don't know how to write AP list to Characteristic in BLE. Someone can help me ?

I will be greatful for any help!

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Connect Wifi via Bluetooth Low Energy

Postby kolban » Wed Aug 30, 2017 1:46 pm

Howdy,
What kind of help do you need?

Loosely, think of a characteristic in BLE as a variable that contains byte data. The "name" of the variable is the characteristic UUID (the 128 bits of data of the form 1322b5aa-d1b3-450c-addc-c8f4c80dbb3c). The BLE server maintains that data and the BLE client can ask for the value of that variable or ask the server to save a new value for that variable.

If we think of your access point SSIDs as simply "data" then you can set the value of your characteristic to a delimited concatenation of your list of SSIDs.

This would be my high level approach.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

doduong
Posts: 7
Joined: Wed Aug 30, 2017 7:58 am

Re: Connect Wifi via Bluetooth Low Energy

Postby doduong » Thu Aug 31, 2017 7:02 am

kolban wrote:Howdy,
What kind of help do you need?

Loosely, think of a characteristic in BLE as a variable that contains byte data. The "name" of the variable is the characteristic UUID (the 128 bits of data of the form 1322b5aa-d1b3-450c-addc-c8f4c80dbb3c). The BLE server maintains that data and the BLE client can ask for the value of that variable or ask the server to save a new value for that variable.

If we think of your access point SSIDs as simply "data" then you can set the value of your characteristic to a delimited concatenation of your list of SSIDs.

This would be my high level approach.
Hi kolban,
Thanks for your help.

doduong
Posts: 7
Joined: Wed Aug 30, 2017 7:58 am

Re: Connect Wifi via Bluetooth Low Energy

Postby doduong » Fri Sep 01, 2017 3:20 am

kolban wrote:Howdy,
What kind of help do you need?

Loosely, think of a characteristic in BLE as a variable that contains byte data. The "name" of the variable is the characteristic UUID (the 128 bits of data of the form 1322b5aa-d1b3-450c-addc-c8f4c80dbb3c). The BLE server maintains that data and the BLE client can ask for the value of that variable or ask the server to save a new value for that variable.

If we think of your access point SSIDs as simply "data" then you can set the value of your characteristic to a delimited concatenation of your list of SSIDs.

This would be my high level approach.
Hi kolban,
Can you tell me how to change or add services, characterstic, attribute in Sample Project "gatt_sever" ?
Thank you.

Who is online

Users browsing this forum: No registered users and 169 guests