Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Bluetooth LE set_advertisement with flag and service_data

    Scheduled Pinned Locked Moved MicroPython
    bluetoothsetadvertisemeservicedatable
    1 Posts 1 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      PhS
      last edited by

      I try to make BLE beacon app and listener with no connection.

      I've develop an Android application who send BLE beacon no_connected, she work well and my LoPy receive and decode correctly all beacon.

      I try to develop the android application on a second LoPy, but I've some problem with the pycom bluetooth library.

      Only service_data in set_advertisement

      When I try to advertise in bluetooth with my LoPy, if I add only service_data in the bluetooth.set_advertisement, no data was send, when i start the bluetooth.advertise ( checked with a UberTooth )

      bluetooth.set_advertisement(service_data=srv_data)
      bluetooth.advertise(True)
      

      If I use only the manufacturer_data, all my data was sent correctly but not in the good container ! ( checked with a UberTooth )

      bluetooth.set_advertisement(manufacturer_data=srv_data)
      bluetooth.advertise(True)
      

      How I can send only service_data in the BLE advertise ?

      Set flag value in in set_advertisement

      I use another Lopy to receive data sent by my LoPy advertiser
      But the flag in the data have a bad value (6) not referenced in the docs.pycom.io.
      How, i can set the flag value in bluetooth.set_advertisement ?

      Thanks

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • 1 / 1
      • First post
        Last post

      Pycom on Twitter

      Pycom