element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum How to listen to bluetooth boards?
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 4 replies
  • Subscribers 288 subscribers
  • Views 948 views
  • Users 0 members are here
  • bluetooth
  • ble
  • sensor
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

How to listen to bluetooth boards?

obones
obones over 1 year ago

Hello,

I have quite a few ESP32 based custom devices that are connected to WiFi and this works just fine.

However, I also have sitting on my desk a few boards that are only capable of communicating via Bluetooth (BLE) and I'm not sure how I would connect to them to retrieve whatever data they have to transmit.

For instance, one of them has an accelerometer that I could use to sense vibrations on a water pipe to infer water consumption. It could store a set of values for a given amount of past time and then send that history data to the reading device when it is being asked to do so.

With WiFi, I can write a web server that exposes an endpoint to which the device would connect to post its data. Or even have it directly use the MQTT protocol and be done with it.

But with Bluetooth, I'm not sure what I should come up with. Something that would go BLE --> MQTT would be ideal of course, but if it goes BLE -> WiFi -> MQTT, it's also fine as maybe I could piggyback it on an existing ESP32 based board.

Any ideas are most welcome.

  • Sign in to reply
  • Cancel

Top Replies

  • shabaz
    shabaz over 1 year ago +3
    BLE devices operate in different roles, so you'd need to choose what roles suit your needs. For instance, you might prefer a connectionless approach where some sensors periodically just advertise information…
Parents
  • aswinvenu
    0 aswinvenu over 1 year ago

    What you are looking for is a BLE Gateway. You can build one with one of your ESp32 boards. BLE devices can't communicate directly to an MQTT server.
    BLE Salve devices ( BLE GATT servers - Sensors with BLE ) -> BLE Master device ( BLE GATT client, In this case it's the gateway).-> Internet through WiFi or Ethernet connection.

    Eg: https://github.com/oh2mp/esp32_ble2mqtt

    Note: This just came up in a google search. I haven't tested it by myself.

    My suggested gateway setup:

    • ESP32 as BLE GATT Client
    • Set WiFi STA mode - Configure Static IP Adress
    • Establish a connection between your MQTT Broker and the gateway.
    • Host a webpage for configuring the BLE Profiles and Characteristics, MQTT Topics etc.
    • Read/Notify sensor data ( Through BLE), Format it ( Probably in JSON) and forward it to your MQTT Broker
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • aswinvenu
    0 aswinvenu over 1 year ago

    What you are looking for is a BLE Gateway. You can build one with one of your ESp32 boards. BLE devices can't communicate directly to an MQTT server.
    BLE Salve devices ( BLE GATT servers - Sensors with BLE ) -> BLE Master device ( BLE GATT client, In this case it's the gateway).-> Internet through WiFi or Ethernet connection.

    Eg: https://github.com/oh2mp/esp32_ble2mqtt

    Note: This just came up in a google search. I haven't tested it by myself.

    My suggested gateway setup:

    • ESP32 as BLE GATT Client
    • Set WiFi STA mode - Configure Static IP Adress
    • Establish a connection between your MQTT Broker and the gateway.
    • Host a webpage for configuring the BLE Profiles and Characteristics, MQTT Topics etc.
    • Read/Notify sensor data ( Through BLE), Format it ( Probably in JSON) and forward it to your MQTT Broker
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • obones
    0 obones over 1 year ago in reply to aswinvenu

    Thanks, that gave a word to search for and in doing so I stumbled on the OpenMQTTGateway project here: https://docs.openmqttgateway.com/

    This looks very promising, especially considering that it could centralize a couple of amateur boards that I created to talk/listen to various 433/868MhZ devices.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube