1
\$\begingroup\$

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.

asked Nov 27, 2020 at 4:24
\$\endgroup\$
5
  • \$\begingroup\$ Mtqq is a tcp/ip protocol. Esp8266 is a wifi device. How are you trying to connect it by Bluetooth? \$\endgroup\$ Commented Nov 27, 2020 at 4:32
  • \$\begingroup\$ Via HC05 bluetooth device \$\endgroup\$ Commented Nov 27, 2020 at 4:35
  • \$\begingroup\$ 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? \$\endgroup\$ Commented Nov 27, 2020 at 4:37
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Nov 27, 2020 at 4:44
  • \$\begingroup\$ Questions seeking help finding off-site resources, examples, etc are off topic as a matter of site policy. Citation required. \$\endgroup\$ Commented Nov 27, 2020 at 6:50

1 Answer 1

1
\$\begingroup\$

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.

answered Nov 27, 2020 at 11:07
\$\endgroup\$
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.