Hello,
Actually I know how to get the mac adresse. But how can I advertise it via BLE, in order to get it in the nrf Connect App.
Are there any sample or could someone share a program part.
You can see my advertising package in the following code. But I dont Know, what I have to change in order to display my mac adresse in the nrf Connect App
struct bt_le_adv_param *adv_param = BT_LE_ADV_PARAM((BT_LE_ADV_OPT_CONNECTABLE|BT_LE_ADV_OPT_USE_IDENTITY), /* Connectable advertising and use identity address */ 800, /*Min Advertising Interval 500ms (800*0.625ms) */ 801, /*Max Advertising Interval 500.625ms (801*0.625ms)*/ NULL); /* Set to NULL for undirected advertising*/ /* define software version, for example 0x23 */ #define SOFTWARE_VERSION 0x23 #define COMPANY_ID_CODE //Company_ID #define MAC_ADRESSE //MAC ADresse #define DEVICE_NAME CONFIG_BT_DEVICE_NAME #define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1) /* Declare the structure for your custom data */ typedef struct adv_mfg_data { uint16_t company_code; /* Company Identifier Code. */ uint16_t software_version; /* software version*/ uint16_t mac_adresse; } adv_mfg_data_type; /* Define and initialize a variable of type adv_mfg_data_type */ static adv_mfg_data_type adv_mfg_data = {COMPANY_ID_CODE, SOFTWARE_VERSION, MAC_ADRESSE}; static const struct bt_data ad[] = { /* Set the flags and populate the device name in the advertising packet */ BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)), BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN), BT_DATA(BT_DATA_MANUFACTURER_DATA,(unsigned char *)&adv_mfg_data, sizeof(adv_mfg_data)), }; const struct bt_data sd[] = { //BT_DATA_BYTES(BT_DATA_UUID128_ALL, BT_UUID_128_ENCODE(0x6CBB0001, 0x3309 ,0x4730 ,0x982C, 0x92A66E13BDC4)), };