Custom firmware for ESP32 - WiFi and BT

ESP32 Module Project

Goal: To write custom code for an ESP32 module that allow it to be used as a slave device to both deliver JSON packets AND allow pass-through Bluetooth Serial communications.


We have a custom PCB which incorporates the ATmega2560 and all support hardware. We have a header with RX/TX/SPI and I2C, +5, +3.3 and GND that a CUSTOM designed PCB will interface an ESP32 module like the ESP32-WROVER. The RX/TX we are using are Hardware Serial3 from Arduino code point of view. We need the ATmega2560 to be the master: we would like to offload all the WiFi work to the ESP and just have calls to setup and control Bluetooth and WiFi. We intend to use the I2C or SPI bus for WiFi control, packets and Bluetooth Control and the UART will be used for 2-way pass-through Bluetooth comms (as Serial Port Profile device).

For Development, an Arduino MEGA hooked up to ESP-32 via RX3/TX3 at 19200 Baud and the SPI bus will work fine.

Baud rate for Serial Passthrough is MAX 19200 because the ATmega2560 is custom-clocked.


The end device is a hand-held battery powered system in an enclosed case. Power usage and heat are major concerns. We need recommendations on which ESP32 module to use: WROVER, WROOM, etc. And if it can/should be de-clocked to save power and cut down on heat.


1) HEX and Source Code for ESP32– (preferred in Arduino environment.)

2) C++ class for facilitating communication between ATmega and ESP module.

3) Example MEGA code showing working transfer of data over Bluetooth Serial and HTTP Posts to URL.

4) Instructions on how to program the ESP32 custom firmware.

Requirements of C++ Class and ESP Firmware:

-Method to place the ESP into low-power mode or off.

-Methods to set Bluetooth Device Name, PIN

-Method to set Wi-Fi Station Name.

-Method to connect to an AP given SSID and Password– eventually we may also need WPA2-Enterprise but not for this phase.

-Method to set the URL for HTTP Posts.

-Method to define a packet of data that gets posted to URL. (2048 bytes)

-Method to check status of Wi-Fi connection (connected/Not Connected)

-Method to check last result of POST (200, 401, 404, etc. HTTP status codes or 0 for not posted) – Should reset status after call.

Data Flow and Operation for WiFi

SETUP: Pass SSID, Password, Port, URL to ESP


MEGA collects data from an array of sensors, data is packaged into JSON.

JSON is sent to ESP which posts to SERVER. This happens 1x per minute.

MEGA polls status of ESP which could include IDLE and PROCESSING

Repeat forever.

For Bluetooth, we need it to operate as a serial passthrough device like the HC-06 module. We just need to set the name of the device and PIN if possible. Baud rate will be 19200-N-8-1

Power Consumption

This is a battery powered device so we need to save power and heat. Data packets are sent 1x per minute so if its better battery-wise to make connection, send packet, drop connection every time we should do that.

Sample of a JSON data packet:

{ "version": 1.00,"generator": "DSII", "RAM": 1718, "serialNumber": "09-1021","stationID": "Probe in Hospital","token": "XXXXX","battery": "OK","status": "OK","timeStamp": "2019-01-22T15:53:44.000Z","data": [{ "code": 4,"unitCode": 4, "sensor": "CO2", "unit": "ppm","value": -1201.00, "id": 11188 },{ "code": 3,"unitCode": 4, "sensor": "CO", "unit": "ppm","value": 1.2, "id": 10201 },{ "code": 1,"unitCode": 3, "sensor": "RH", "unit": "RH","value": 35.2, "id": 11421 },{ "code": 0,"unitCode": 0, "sensor": "TEMP", "unit": "C","value": 19.1, "id": 11421 }] }


[login to view URL]

if TOKEN property is set to my email address it will authorize and return 200 otherwise it will return 401.


We may need WPA2-Enterprise at some point in the future.

I need an estimate for how long this project will take. I am also happy to pay a fixed price if we can reach an agreement.

Skills: Arduino, Bluetooth Low Energy (BLE), Electronics, Microcontroller, PCB Layout

See more: esp32 forum, esp32 wifi sniffer, esp32 based products, esp-idf, esp32 datasheet, esp32 espport, esp32 at command firmware, esp-idf examples, linux custom firmware linksys nas200, custom firmware ata voip uae, custom firmware samsung up5000, wvc200 custom firmware, nas 200 custom firmware, up5000 custom firmware, samsung custom firmware, joomla custom module include component, linksys nas200 nas custom firmware, custom firmware dg834pn, nanostation2 custom firmware, custom firmware samsung star

About the Employer:
( 2 reviews ) Samos, Greece

Project ID: #18933589

8 freelancers are bidding on average $545 for this job


Hello sir, I have experience in designing electronics circuits and can make your project. i will make your project completely on my side and will deliver a working prototype. I can also develop hardware compatible and More

$800 USD in 20 days
(39 Reviews)

Hi sir, we are very best team who have done machine to machine and machine to server communications for many years. we are able to configure these tiny esp32 modules , we are able to run both wifi and ble stack t More

$750 USD in 12 days
(46 Reviews)

Thanks sharing your project. As I'm a Senior Embedded System Engineer, so I have rich experiences in embedded device development using BLE/Bluetooth, Wifi, USB, RFID over 8+ years. Especially, I had developed m More

$600 USD in 10 days
(13 Reviews)

Hello my name is Maria, I would like to work in this project, I’m an engineer with plenty of experience working with Arduino, Bluetooth Low Energy (BLE), Electronics, Microcontroller, PCB Layout , I have made many Ardu More

$555 USD in 10 days
(8 Reviews)

Hello, Deep is here from India. I can help you to develop firmware for ATmega, ESP32 using Arduino IDE. I have experience with both. Developed various firmware which also consist JSON data, HTTP posting, Bluetooth co More

$350 USD in 10 days
(14 Reviews)

yes buddy,,its me imad, can do work in 50+ platforms myself,,,,,,u will get the best work accompanied with brotherhood,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

$250 USD in 10 days
(20 Reviews)

Hello! I am very interested in your post project. i am really looking for this kind of project for a long time in freelancer since i have rich experience on it. I think this project is very suitable for me and i am More

$555 USD in 10 days
(3 Reviews)

Hello! After reading your description, I interested to work with your project. I have hardware for testing project. And I have enough experience to make this project Look forward to your answer. Best regards.

$500 USD in 10 days
(5 Reviews)