BLE GATT CLIENT MQTT gateway.
Posted: Tue Jun 27, 2017 12:00 pm
Hi everyone,
I am working on project that which will connect to BLE devices we have made and send data to Broker on via MQTT and also will require to set wifi setting and restore it if reset or restarted.
I am right now working with 3 example codes of ESP32 (this is my first time working with IDF, I previous have worked with ESP8266 with arduino)
1) BLUFI example
2) MQTT example(https://github.com/tuanpmt/esp32-mqtt)
3) GATT client example.
Right now I have understood BLUFI code somewhat. It sets wifi setting in function example_event_callback() at ESP_BLUFI_EVENT_RECV_STA_SSID and ESP_BLUFI_EVENT_RECV_STA_PASSWD. And MQTT example sets it in user_config.sample.h which we have to hardcode it. I want to replace that and also store it to flash to load it if Device restarts.
Can anyone please guide me. I have currently seperated all BLE function,variables and structs in seperate file and same with wifi so as to easily manage things. It compiles well without any changes.
I am working on project that which will connect to BLE devices we have made and send data to Broker on via MQTT and also will require to set wifi setting and restore it if reset or restarted.
I am right now working with 3 example codes of ESP32 (this is my first time working with IDF, I previous have worked with ESP8266 with arduino)
1) BLUFI example
2) MQTT example(https://github.com/tuanpmt/esp32-mqtt)
3) GATT client example.
Right now I have understood BLUFI code somewhat. It sets wifi setting in function example_event_callback() at ESP_BLUFI_EVENT_RECV_STA_SSID and ESP_BLUFI_EVENT_RECV_STA_PASSWD. And MQTT example sets it in user_config.sample.h which we have to hardcode it. I want to replace that and also store it to flash to load it if Device restarts.
Can anyone please guide me. I have currently seperated all BLE function,variables and structs in seperate file and same with wifi so as to easily manage things. It compiles well without any changes.