[BCM20736 SDK2.2] The add devices on Windows 7

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi Sir,

I have 2 devices and follow the following link to change device name.

Re: How to change the device name?

Then I add new BT devices on Windows 7, these two devices show in the same logo and jump back and forth.

Can it be shown as two independent logo?

ScreenClip.png

ScreenClip.png

0 Likes
1 Solution

I was not able to reproduce, I have a BLE name " BLE Prox key fob" greater than 8 and it shows up. It depends on your pc's bluetooth(LE chip and driver) for Windows 7.

BLE_Scan.png

View solution in original post

8 Replies
Anonymous
Not applicable

My bad, this is due to the same id... I've solved it.

0 Likes
Anonymous
Not applicable

Hi Sir,

I have one more question about the add device on Win7.

When the length of the local_name over 8, the device only show Bluetooth LE Device.

Anyway to overcome it?

ScreenClip.png

0 Likes

I was not able to reproduce, I have a BLE name " BLE Prox key fob" greater than 8 and it shows up. It depends on your pc's bluetooth(LE chip and driver) for Windows 7.

BLE_Scan.png

Anonymous
Not applicable

Hi Sirs,

I do more experiment. It's not only happen on Win7. I use my iphone6 plus and install an App which name is eBeacon. It detect the local name as null.

Experiment 1:

If I define the local name with the length over 8 bytes in the  "BLE_PROFILE_CFG", this shows correct.

Experiment 2:

I follow the code on the forum to change the local_name dynamically. See the bold part. One is 7 bytes local name, and another one is 15 bytes local name. The 7 bytes local_name can be shown correct on both Win7 and the eBeacon app. But, the 15 bytes local_name can't be shown correct on Win7 and eBeacon.

The code is as follow:

    // Read value of the service from GATT DB.

    bleprofile_ReadHandle(HANDLE_MI_MAIN_SERVICE_UUID, &db_pdu);

    ble_tracen((char *)db_pdu.pdu, db_pdu.len);

    if (db_pdu.len != 16)

    {

        ble_trace1("\rmicro_inverter bad service UUID len: %d", db_pdu.len);

    }

    else

    {

    BLE_ADV_FIELD adv[3];

        // flags

        adv[0].len     = 1 + 1;

        adv[0].val     = ADV_FLAGS;

        adv[0].data[0] = LE_LIMITED_DISCOVERABLE | BR_EDR_NOT_SUPPORTED;

        adv[1].len     = 16 + 1;

        adv[1].val     = ADV_SERVICE_UUID128_COMP;

        memcpy(adv[1].data, db_pdu.pdu, 16);

        // name, TODO: the final version should get the address from microcontroller.

        UINT8 *bda = emconinfo_getAddr();

        //sprintf(bleprofile_p_cfg->local_name, "SMI%02x%02x%02x%02x%02x%02x", bda[0x05], bda[0x04], bda[0x03], bda[0x02], bda[0x01], bda[0x00]);

        sprintf(bleprofile_p_cfg->local_name, "SMI%02x%02x", bda[0x01], bda[0x00]);

        BLEPROFILE_DB_PDU p_pdu;

        p_pdu.len = strlen(bleprofile_p_cfg->local_name) + 1;

        memcpy(&p_pdu.pdu[0], bleprofile_p_cfg->local_name, strlen(bleprofile_p_cfg->local_name));

        bleprofile_WriteHandle(0x0016, &p_pdu);

        adv[2].len      = strlen(bleprofile_p_cfg->local_name) + 1;

        adv[2].val      = ADV_LOCAL_NAME_COMP;

        memcpy(adv[2].data, bleprofile_p_cfg->local_name, adv[2].len - 1);

        bleprofile_GenerateADVData(adv, 3);

    }

    blecm_setTxPowerInADV(0);

    bleprofile_Discoverable(HIGH_UNDIRECTED_DISCOVERABLE, micro_inverter_remote_addr);

Any comment and idea?

0 Likes

Is the goal to change the device name dynamically (To change the device's name dynamically

The name needs to be changed in two places per this thread: Re: Unable to change device name

The first one is used during a connection as it allows a client to read the device name value from the GATT database  and the second instance is what’s placed in the advertisement packet.

0 Likes
Anonymous
Not applicable

The 2nd link is fail.

0 Likes

mmfae/fran - I get the un-authorized error message when I try to view the 2nd link as well.

0 Likes

fran santol

I think I was able to fix the access issue.  Give it another try.

0 Likes