BLE Advertisement Max Length
-
Hi,
I am trying to send some data as BLE advertisement on Lopy4, below is the function I am using
def normal_running_mode(): bluetooth = Bluetooth() bluetooth.advertise(False) bluetooth.stop_scan() bluetooth.init() data = [0x4C,0x00,0x02,0x15,0x00,0x00,0xc8,0x43,0xcc,0x00,0x00,0x00,0x00,0x9c, 0x00,0x00,0x48,0x42,0x02,0x00,0x00,0x00,0x00,0x9c,0x00,0x00,0xe1,0x42,0x81,0x0a] print("ADV Dat is " + str(ubinascii.hexlify(bytes(data)))) bluetooth.set_advertisement(name = None, manufacturer_data = bytes(data)) bluetooth.advertise(True) time.sleep(300)however the last 6 bytes of the payload is being dropped as shown in image below, what is the maximum size allowed by the field manufacturer_data. The BLE specification says the Max BLE Advertisement Packet size is 31 bytes and my whole payload is around 30 bytes. How can I send these 30 bytes as Advertisement. I tried using service UUID and service data as shown in the code in this link (https://forum.pycom.io/topic/1911/wipy-as-an-ibeacon/3) but that doesn't work.

-
This post is deleted! -
Hi @pvstejeswar , did you figure it out ?
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