BLE Data Transfer Question
-
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 bitsso 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----------> IOSis 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) -
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?
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