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

    BLE reading services and writing characateristics

    Scheduled Pinned Locked Moved WiPy 2&3
    4 Posts 3 Posters 1.3k Views 3 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.
    • L Offline
      luis.reis
      last edited by

      Hi, i'm working on a little project that uses Wipy as a master device and some BLE devices as slaves. I want to discovery the services from the slaves, then write the characteristcs values, is there any way to do that by passing the uuid of the services and the uuid of the specific characteristic besides iterating throgh the characteristic list (services.characteristics())? the type value that i want to write is a string (text).

      Thanks.

      J 1 Reply Last reply Reply Quote 0
      • L Offline
        luis.reis
        last edited by

        Someone could help? Almost one month and yet no answers!!!

        1 Reply Last reply Reply Quote 0
        • J Offline
          jmarcelino @luis.reis
          last edited by jmarcelino

          @luis.reis I don't think there is a way other than iterating but I hear a BLE module restructure is planned so it may change in the near future

          1 Reply Last reply Reply Quote 0
          • M Offline
            maku
            last edited by

            I find it very hard to understand what your are trying to achieve.
            It seems that you would like to get certain characteristics from specific BLE devices.
            You'll have to iterate through the list and select your specified devices using an if-loop.
            For example:

            while bluetooth.isscanning():
                if bluetooth.get_adv():
                     if [your_ble_device_mac] == binascii.hexlify(bluetooth.get_adv()[0]).decode():
                         print ("Short name is: ", bluetooth.resolve_adv_data(adv.data, Bluetooth.ADV_NAME_SHORT))
                   else:
                        print("no known devices")
                else:
                       print("No adv")
            

            Something like that will work.
            Sorry for low readability.

            Please upvote me or something, I can only post every 600s.

            1 Reply Last reply Reply Quote 1

            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