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 Data Transfer Question

    Scheduled Pinned Locked Moved LoPy
    bledatapycom
    2 Posts 2 Posters 347 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.
    • M Offline
      mitchlau
      last edited by

      HI i have a project need to send data from pycom to IOS.
      I success send data from peripheral(pycom) to central(IOS)

      However the problem is, the data is too big to send
      after i do research i find out every single send can only 20 bits

      so my idea is cut all data to 20 bits and send data as below
      Pycom -------send first 20 bits----------> IOS
      Pycom <------response whatever------- IOS
      Pycom -------send other 20 bits----------> IOS
      Pycom <------response whatever------- IOS
      Pycom -------send other 20 bits----------> IOS

      is anyone can tell me how to send data in BLE for 300 word of string???

      Below is part of my code

      # See https://docs.pycom.io for more information regarding library specifics
      
      bluetooth = Bluetooth()
      bluetooth.set_advertisement(name='LoPy', service_uuid=b'12312390123456')
      
      def conn_cb (bt_o):
          events = bt_o.events()
          if  events & Bluetooth.CLIENT_CONNECTED:
              print("Client connected")
          elif events & Bluetooth.CLIENT_DISCONNECTED:
              print("Client disconnected")
      
      bluetooth.callback(trigger=Bluetooth.CLIENT_CONNECTED | Bluetooth.CLIENT_DISCONNECTED, handler=conn_cb)
      
      bluetooth.advertise(True)
      
      srv1 = bluetooth.service(uuid=b'1223190123456', isprimary=True)
      chr1 = srv1.characteristic(uuid=b'ab3451230123456', value=5)
      while True:
          print("Send Data")
          chr1.value("here is the data need to be send  it should be a very very long string")
          time.sleep(3.050)
      
      
      
      1 Reply Last reply Reply Quote 0
      • W Offline
        Wolli01
        last edited by

        Cool, I need it the other way around.
        I would like to send login data from my mobile phone to my Wipy/Lopy.
        Can you help me with how to proceed?

        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