1

I trying to use Bluetooth HC-05 with esp8266 to connect with Mqtt broker (Raspberry Pi), I already know how to connect by Wi-Fi, because there are a lot of example code for it. But not for Bluetooth. Can it possible to use Bluetooth to connect with Mqtt with Adafruit library, does anyone know any reference code about that matter. or any way to do it. The hardware I using is HC-05 and arduino iDE.

  • Mtqq is a tcp/ip protocol. Esp8266 is a wifi device. How are you trying to connect it by Bluetooth? – Passerby Nov 27 '20 at 04:32
  • Via HC05 bluetooth device – Anime Lover Nov 27 '20 at 04:35
  • So you have a hc05 connected to the serial port of the esp? Why? Why correct Bluetooth to a wifi microcontroller? And what is your schematic? – Passerby Nov 27 '20 at 04:37
  • Questions seeking help finding off-site resources, examples, etc are off topic as a matter of site policy. One would not typically try to utilize MQTT over bluetooth, though in theory it might be possible. Rather you probably want to use the esp8266 for MQTT, and bluetooth for whatever other bluetooth thing you are trying to interact with. A traditional web search should find you plenty of resources and examples for MQTT on the ESP8266, and using your hc-05 to interact with mutually compatible bluetooth devices. – Chris Stratton Nov 27 '20 at 04:44
  • `Questions seeking help finding off-site resources, examples, etc are off topic as a matter of site policy.` Citation required. – Passerby Nov 27 '20 at 06:50

1 Answers1

1

I have Tasmota running in my gateway which has an esp8266 and a bluetooth module. Worked out of the box. The bluetooth module is not a HC05 though. You might need to write some code to string it together. Tasmota has MQTT implemented, so it is just a matter of how you translate what comes from the bluetooth module to a JSON packet to be sent via MQTT and vice-versa.

Kartman
  • 5,930
  • 2
  • 6
  • 13