This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52832 BLE can't be seach by MI(xiaomi) TV & HUAWEI C5 pad and other device

Hi,

I designed a nRF52832_xxAA board, I can't find the bluetooth name in iphone - settings - Bluetooth - Devices, but I can read/write and notify in myself mobile app and nrf connect in iphone. maybe It means the settings of the mobile phone just can serach the classic Bluetooth. If it's like this?

HUAWEI mobile phone & iPhone nrf connect can find my device and connect normally. but my board device name can't appreace in MI TV(xiaomi) & HUAWEI C5 pad bluetooth device list and nrf connect, I'm sure Location Services and Positioning is already open. I can see the MI TV(Model:L55M5-AZ) about... info appreace Android Ver 6.0.1.and support bluetooth 4.2/BLE lowpower. nrf connect - Device information show Bluetooth Low Energy info like this:

Bluetooth Low Energy Supported         YES

Native HID supported                           YES

Lollipop scanner API supported            YES

Offloaded filtering supported                   NO

Offloaded scan batching supported         NO

Peripheral mode supported                     NO

Multiple advertisement supported           NO

High speed (PHY 2M) supported            NO

Long range (PHY Coded) supported      NO

Periodic advertisement supported          NO

Extended advertisement supported        NO

Maximum advertising data length          N/A

Idon't think this list have question, but the same device(no nRF52832) made by another equipment manufacturer, device name can appreace in MI TV(xiaomi) & HUAWEI C5 pad, connect normally.

My HUAWEI mobile phone Android Ver 5.1 and support BLE lowpower. nrf connect - Device information show Bluetooth Low Energy info like this:

Bluetooth Low Energy Supported         YES

Native HID supported                           YES

Lollipop scanner API supported            YES

Offloaded filtering supported                  YES

Offloaded scan batching supported         YES

Peripheral mode supported                     YES

Multiple advertisement supported           YES

my software configuration as this:

#define NRF_SDH_BLE_GAP_DATA_LENGTH 27

#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23

I tried with the sample code by nRF5_SDK_15.2.0_9412b96 & nRF5_SDK_14.2.0_17b948a, the same question.

I think there must be something wrong configuration settings in firmware, may be related to the Android version, so I hope to get your help. If the description is not detailed, I can add as required.

Best regards

ROO

Parents
  • Hello,

    I suspect that you don't find your device on the TV or iPhone settings because it is not considered a useful device. What sort of services do you have on your device?

    I bet that if you try the ble_app_hids_keyboard (not mouse), you will see it from your iphone settings. I am not sure what the TV is looking for, but I bet that ble_app_hids_keyboard will work for that as well. Not sure if hids_mouse is supported on the TV (it is not on iPhone).

    So the reason that they filter out "not useful" devices is because it can't find any services that it can use, and it assumes that there is no point in connecting to this device, so it is filtered out for better user experience. A cellphone wouldn't know what to do with e.g. the UART over BLE Service (NUS - Nordic UART Service). However, if you write an app for iPhone, and scan for BLE devices there, you will see all available devices, and the app can interpret the NUS service.

    So the question remains. What sort of services do you have on your nRF? Is it something that the iPhone or the TV/pad will know what to use for?

    Best regards,

    Edvin

  • Hi,

    I picked up some of the codes that has been modified:


    static void gap_params_init(void)
    {
    ……

    err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_HID_DIGITAL_PEN);
    APP_ERROR_CHECK(err_code);

    ……

    }


    void gatt_init(void)
    {
    ……
    err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 23);
    ……
    }


    static void services_init(void)
    {
    uint32_t err_code;
    ble_nus_init_t nus_init;

    memset(&nus_init, 0, sizeof(nus_init));

    nus_init.data_handler = nus_data_handler;

    err_code = ble_nus_init(&m_nus, &nus_init);
    APP_ERROR_CHECK(err_code);

    err_code = bat_ble_nus_init(&m_nus, &nus_init);
    APP_ERROR_CHECK(err_code);

    err_code = devinfo_ble_nus_init(&m_nus, &nus_init);
    APP_ERROR_CHECK(err_code);

    err_code = HID_ble_nus_init(&m_nus, &nus_init);
    APP_ERROR_CHECK(err_code);
    }


    static void dfu_init(void)
    {
    #ifdef DFU_SUPPORT
    uint32_t err_code;
    ble_dfu_buttonless_init_t dfus_init = {0};
    err_code = ble_dfu_buttonless_async_svci_init();
    APP_ERROR_CHECK(err_code);
    dfus_init.evt_handler = ble_dfu_evt_handler;
    err_code = ble_dfu_buttonless_init(&dfus_init);
    APP_ERROR_CHECK(err_code);
    #endif
    }


    static void advertising_init(void)
    {
    uint32_t err_code;
    ble_advertising_init_t init;
    ble_uuid_t m_adv_uuids[] = /**< Universally unique service identifier. */
    {
    {AIO_UUID_SERVICE, BLE_UUID_TYPE_BLE}, {BLE_UUID_BATTERY_SERVICE, BLE_UUID_TYPE_BLE}, {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE}, {HID_UUID_SERVICE, BLE_UUID_TYPE_BLE}, {BLE_DFU_SERVICE_UUID, BLE_UUID_TYPE_BLE}};

    memset(&init, 0, sizeof(init));

    ble_advdata_manuf_data_t manuf_data;
    uint8_t data[]="XXXXXXXX";
    manuf_data.company_identifier = 0x8888;
    manuf_data.data.p_data=data;
    manuf_data.data.size=sizeof(data);
    init.advdata.p_manuf_specific_data=&manuf_data;

    init.advdata.name_type = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance = true;
    init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.srdata.uuids_complete.p_uuids = m_adv_uuids;

    init.config.ble_adv_fast_enabled = true;
    init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout = APP_ADV_TIMEOUT_IN_SECONDS;

    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&m_advertising, &init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
    }

    So, my Device Client sort of services have Generic Access(Device Name/Appearance/Peripheral Preferred Connection Parameters/Central Address Resolution)、Generic Attribute(Service Changed)、Automation IO(Digital)、Battery Service(Battery Level)、Device Information(Manufacturer Name String/Model Number String/Serial Number String/Hardware Revision String/Firmware Revision String/PnP ID)、Unknown Service(0xA812, I was going to use the Human Interface Device - Report. After it was created, it would cause Bluetooth to crash, so give up and used unknown service 0xA812)(Protocol Mode/Boot Keyboard Input Report)、DFU。

    I tried to block the created services one by one from tail to head, but the TV App nRF Connect still couldn’t find it.

    the same device(no nRF52832) made by another equipment manufacturer, can be find and connect normally in mobile phone & iphone & TV and pad with nRF Connect. but my device only be find and connect normally in  mobile phone & iphone and Part of the pad, not in TV。

    Because our products usage scenarios cover mobile phone, TV, pad, Windows, Android and iOS, they must all be compatible. So this problem must be solved, I look forward to your support. Tks.

  • Can you try the ble_app_hids_keyboard example? Is that discovered from the TV?

  • yes, I tried, I download the nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_hids_keyboard, only change #define NRF_SDH_CLOCK_LF_SRC 2, because my device have only one external crystal 32M.

    my mobile phone nRF Connect can find Nordic_Keyboard, but the TV nRF Connect can't find.

    repeat, the same device(no nRF52832) made by another equipment manufacturer, can be find and connect normally in mobile phone & iphone & TV and pad with nRF Connect.

    So this phenomenon is very strange.

    I have already contacted your local technical support. They replied to our company's on-site guidance next week, so I am looking forward to it. However, I believe the power of R&D engineers and also hoping to get your support more.

    Best regards

    ROO

Reply
  • yes, I tried, I download the nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_hids_keyboard, only change #define NRF_SDH_CLOCK_LF_SRC 2, because my device have only one external crystal 32M.

    my mobile phone nRF Connect can find Nordic_Keyboard, but the TV nRF Connect can't find.

    repeat, the same device(no nRF52832) made by another equipment manufacturer, can be find and connect normally in mobile phone & iphone & TV and pad with nRF Connect.

    So this phenomenon is very strange.

    I have already contacted your local technical support. They replied to our company's on-site guidance next week, so I am looking forward to it. However, I believe the power of R&D engineers and also hoping to get your support more.

    Best regards

    ROO

Children
  • Hello ROO,

    What sort of device is the device made by another equipment manufacturer? Is it a Keyboard? Remote controller? Speaker device? It doesn't use nRF52832. Are you sure it uses BLE (Bluetooth Low Energy) and not standard Bluetooth?

    Either way, since the device is advertising, and you can find it on your phone and nRF Connect, it is filtered out by the TV. You need to figure out what sort of services the TV is looking for. What is it exactly that you are trying to make?

    since the TV will pick up advertisements from the other device, you can try to use the nRF Sniffer to sniff the advertisement packets from the other device.

  • Hi  Edvin,

    We have solved this problem, I think it may be related to the peripheral circuit and IC components, no problem with the codes.

    Thanks.

    ROO

Related