Scan BLE devices and send data via http post request

smushball
Posts: 1
Joined: Wed Apr 18, 2018 5:24 pm

Scan BLE devices and send data via http post request

Postby smushball » Wed Apr 18, 2018 5:31 pm

Hey there

First of all, sorry if this is not the right place to post this question. I am starting with esp32.

I have been looking for a this solution for a long time, so let's get to it.

I am trying to scan all BLE devices available near my esp32 and send its data to my server through an http post request.
The data would consist in the BLE device MAC Address, the ESP32 MAC Address and the rssi of the BLE device.

I would be very grateful if anyone could point me on the right direction.

Thanks in advance.

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

Re: Scan BLE devices and send data via http post request

Postby kolban » Thu Apr 19, 2018 12:15 am

Howdy and welcome to the community.

It feels like this is quite a specialized task so you might not get a response on the complete solution. However, if we break it into parts it may be easier. The first is getting the BLE scan data you are looking for. There are a number of API libraries available for the ESP32 that will perform BLE scans and return lists of detected BLE devices. Assuming we can source the data, the next task is to transmit it. Again, there are a number of libraries available that will perform HTTP encapsulation for transmission. What I'd suggest you do is break your project into subprojects and tackle each one individually.

Ask yourself how to get the BLE scan data and separately ask yourself how to transmit REST data over WiFi/network.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 103 guests