@@ -118,7 +118,8 @@ STATIC void add_generic_services(bleio_adapter_obj_t *adapter) {
118118 SECURITY_MODE_NO_ACCESS ,
119119 248 , // max length, from Bluetooth spec
120120 false, // not fixed length
121- & generic_name_bufinfo
121+ & generic_name_bufinfo ,
122+ NULL
122123 );
123124
124125 uint16_t zero_16 = 0 ;
@@ -140,7 +141,8 @@ STATIC void add_generic_services(bleio_adapter_obj_t *adapter) {
140141 SECURITY_MODE_NO_ACCESS ,
141142 2 , // max length, from Bluetooth spec
142143 true, // fixed length
143- & zero_16_value
144+ & zero_16_value ,
145+ NULL
144146 );
145147
146148 // Generic Attribute Service setup.
@@ -176,7 +178,8 @@ STATIC void add_generic_services(bleio_adapter_obj_t *adapter) {
176178 SECURITY_MODE_NO_ACCESS ,
177179 4 , // max length, from Bluetooth spec
178180 true, // fixed length
179- & zero_32_value
181+ & zero_32_value ,
182+ NULL
180183 );
181184}
182185
@@ -645,7 +648,11 @@ STATIC void check_data_fit(size_t data_len, bool connectable) {
645648// return true;
646649// }
647650
648- uint32_t _common_hal_bleio_adapter_start_advertising (bleio_adapter_obj_t * self , bool connectable , bool anonymous , uint32_t timeout , float interval , uint8_t * advertising_data , uint16_t advertising_data_len , uint8_t * scan_response_data , uint16_t scan_response_data_len , mp_int_t tx_power ) {
651+ uint32_t _common_hal_bleio_adapter_start_advertising (bleio_adapter_obj_t * self ,
652+ bool connectable , bool anonymous , uint32_t timeout , float interval ,
653+ const uint8_t * advertising_data , uint16_t advertising_data_len ,
654+ const uint8_t * scan_response_data , uint16_t scan_response_data_len ,
655+ mp_int_t tx_power , const bleio_address_obj_t * directed_to ) {
649656 check_enabled (self );
650657
651658 if (self -> now_advertising ) {
@@ -769,7 +776,11 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self,
769776 return 0 ;
770777}
771778
772- void common_hal_bleio_adapter_start_advertising (bleio_adapter_obj_t * self , bool connectable , bool anonymous , uint32_t timeout , mp_float_t interval , mp_buffer_info_t * advertising_data_bufinfo , mp_buffer_info_t * scan_response_data_bufinfo , mp_int_t tx_power ) {
779+ void common_hal_bleio_adapter_start_advertising (bleio_adapter_obj_t * self ,
780+ bool connectable , bool anonymous , uint32_t timeout , mp_float_t interval ,
781+ mp_buffer_info_t * advertising_data_bufinfo ,
782+ mp_buffer_info_t * scan_response_data_bufinfo ,
783+ mp_int_t tx_power , const bleio_address_obj_t * directed_to ) {
773784 check_enabled (self );
774785
775786 // interval value has already been validated.
@@ -803,7 +814,7 @@ void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool
803814 advertising_data_bufinfo -> len ,
804815 scan_response_data_bufinfo -> buf ,
805816 scan_response_data_bufinfo -> len ,
806- tx_power );
817+ tx_power , directed_to );
807818
808819 if (result ) {
809820 mp_raise_bleio_BluetoothError (translate ("Already advertising" ));
0 commit comments