Send only manufacturer_data (BLE advertisement)



  • Issue:

    Advertisement types

    Bluetooth.ADV_TYPE_IND, 
    Bluetooth.ADV_TYPE_DIRECT_IND_HIGH, 
    Bluetooth.ADV_TYPE_SCAN_IND, 
    Bluetooth.ADV_TYPE_NONCONN_IND, 
    Bluetooth.ADV_TYPE_DIRECT_IND_LOW
    

    When my_adv_type=Bluetooth.ADV_TYPE_IND it sends name and manufacturer_data.
    When my_adv_type=ADV_TYPE_NONCONN_IND it sends only name field.

    Is there a way to send only manufacturer data because raw data always contains 0x020106020409051220004000
    even when name=None in the advertisement detected by gateway.

    bluetooth.set_advertisement_params(adv_int_min=0x20, 
                                                    adv_int_max=0x40, 
                                                    adv_type=my_adv_type, 
                                                    #own_addr_type=Bluetooth.BLE_ADDR_TYPE_PUBLIC, 
                                                    channel_map=Bluetooth.ADV_CHNL_ALL, 
                                                    adv_filter_policy=Bluetooth.ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY)
    
    bluetooth.set_advertisement(name = None, manufacturer_data = message, service_data = None, service_uuid = None)
    

Log in to reply
 

Pycom on Twitter