这就跟你问声好!
I am using the sample
1. Why do I use the Bluetooth broadcast data of this routine to have only the Bluetooth name, the other fields are blank. How to add data such as Bluetooth service and Bluetooth mac address in Bluetooth broadcast package?
2.I use a mobile phone to connect to this device, and I use my mobile phone to send data to the device. Why ca n’t the device receive it?
Hope to reply as soon as possible, thank you very much! Below is my code。
ble_peripheral_start();
ble_register_app ();
ble_gap_device_name_set("Custom BLE Service", ATT_PERM_NONE);
const mcs_characteristic_config_t custom_service_1[] = {
/* Initialized Characteristic Attribute */
CHARACTERISTIC_DECLARATION(ff02, CHARACTERISTIC_ATTR_VALUE_MAX_BYTES,
CHAR_WRITE_PROP_EN, CHAR_READ_PROP_DIS, CHAR_NOTIF_NONE, NULL,
set_var_value_cb1, NULL, NULL),
CHARACTERISTIC_DECLARATION(ff01, CHARACTERISTIC_ATTR_VALUE_MAX_BYTES,
CHAR_WRITE_PROP_DIS, CHAR_READ_PROP_DIS, CHAR_NOTIF_NOTIF_EN, NULL,
get_var_value_cb, set_var_value_cb, event_sent_cb)
};
SERVICE_DECLARATION(custom_service_1, ff00)
/ *设置Bluetooth address */
ble_gap_address_set(&user_bd_address, 0x00FF);
ble_gap_adv_intv_set(MIN_INTERVAL_MS,MAX_INTERVAL_MS);
ble_gap_adv_data_set(sizeof(adv_data), adv_data, 0, NULL);
ble_gap_adv_start(GAP_CONN_MODE_UNDIRECTED);
Hi There,
Thanks for your question online. Would it be possible to provide more clarifications on your issues?
Thanks, PM_Dialog
Hi,
Thank you very much!Broadcasting issues have been resolved.
Hi There,
Glad that you resolved your issue and thanks for accepting my answer.
Thanks, PM_Dialog