Issue with the name of the peripheral in Coded phy

The issue is that the name appear when the peripheral is in 1M PHY but he don't apprear when the device is in Coded PHY, do you know why ?

I use NCS 2.0.0 and to scan i use a central with shell commands.

  • Hi

    Most likely this is because you're using extended advertising packets on the 1M PHY, where the device name is able to fit. Coded PHY has a restriction in the size of advertising packets. It could also be that your central is not scanning on the Coded PHY and only get the initial advertisement on the main advertising channels, the rest of the advertising data is transmitted on secondary channels (other than 37, 38, and 39).

    Best regards,

    Simon

  • hi

    I think it's the first solution because my central use command shell to scan in coded and get normally all the information from the device, and also because my phone also don't see the name in coded PHY but how to solve this ? increase the size of advertising packets ?

    Regards,

    Py

  • Hi

    The Coded PHY doesn't allow you to increase the advertising packet size (without big performance losses). If the phone isn't able to pick up the Coded PHY advertising name (likely the secondary channels), that points to the phone not supporting Coded PHY. What phone model is this? You can try to make room in the initial advertising packet, but it needs to contain the indication that there is more data on the secondary channels, so that might be hard to do if you have more data to include.

    Best regards,

    Simon

  • Hi,

    I cdon't use really use my phone, i don't think he can use CodedPHY, but he can see the adress of the peripheral.

    My central is a dongle BLE with shell command and i use this code bellow to see the name :

    static void scan_recv(const struct bt_le_scan_recv_info *info,
    		      struct net_buf_simple *buf)
    {
    	char le_addr[BT_ADDR_LE_STR_LEN];
    	char name[NAME_LEN];
    
    	(void)memset(name, 0, sizeof(name));
    
    	bt_data_parse(buf, data_cb, name);
    
    	bt_addr_le_to_str(info->addr, le_addr, sizeof(le_addr));
    
    	if (scan_filter.name_set && !is_substring(scan_filter.name, name)) {
    		return;
    	}
    
    	if (scan_filter.addr_set && !is_substring(scan_filter.addr, le_addr)) {
    		return;
    	}
    
    	shell_print(ctx_shell, "[DEVICE]: %s, AD evt type %u, RSSI %i %s "
    		    "C:%u S:%u D:%d SR:%u E:%u Prim: %s, Secn: %s, "
    		    "Interval: 0x%04x (%u ms), SID: 0x%x",
    		    le_addr, info->adv_type, info->rssi, name,
    		    (info->adv_props & BT_GAP_ADV_PROP_CONNECTABLE) != 0,
    		    (info->adv_props & BT_GAP_ADV_PROP_SCANNABLE) != 0,
    		    (info->adv_props & BT_GAP_ADV_PROP_DIRECTED) != 0,
    		    (info->adv_props & BT_GAP_ADV_PROP_SCAN_RESPONSE) != 0,
    		    (info->adv_props & BT_GAP_ADV_PROP_EXT_ADV) != 0,
    		    phy2str(info->primary_phy), phy2str(info->secondary_phy),
    		    info->interval, BT_CONN_INTERVAL_TO_MS(info->interval),
    		    info->sid);
    }

    In 1m i can have it but not in coded..

    It's the only information of the advertising paquet that i can't have unfortunatly..

    I also can't see the information even after connexion, i can see it in 1m with the characteristics but not in coded, somethings miss i think, but i don't know what ...

  • Hi

    By "dongle BLE" can you explain a bit more, is it an nRF52840 Dongle or some other third party Dongle? Please check out this DevZone ticket where my colleague Einar has uploaded a simple scanner for Coded PHY example that should be usable.

    Best regards,

    Simon

Related