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

Can not see any CoAP packets on sniffer when Leader role

[development software, with versions]

  1. nRF5_SDK_for_Thread_and_Zigbee_v1.0.0
  2. RaspPi_OT_Border_Router_Demo_v1.0.0-1.alpha
  3. NCP example located in <InstallFolder>/examples/thread/ncp/uart/hex/nrf52840_xxaa.hex
  4. nRF52840-PDK
  5. Raspberry Pi connect through an Ethernet cable to my switch that provides IPv4 connectivity with the DHCP service.

I've asked this question before. I'd like to create similar application, using nRF5_SDK_for_Thread_and_Zigbee_v1.0.0. My application is based on ble_app_blinky_c. I've added Thread protocol support to it, referring to Adding dynamic multiprotocol Thread support to BLE examples, and called thread_coap_utils_cloud_data_update(...) function in on_adv_report(...) function. In thread_instance_init(...) function, I've set

.role                  = RX_OFF_WHEN_IDLE,

then (built and) run. After that, OT_DEVICE_ROLE become Child and it works (I can see CoAP packets on sniffer). So that, I've set

.role                  = RX_ON_WHEN_IDLE,

then (built and) run. After that, OT_DEVICE_ROLE become Child or Router or Leader. When OT_DEVICE_ROLE become Child or Router, my application works (I can see CoAP packets on sniffer). But when OT_DEVICE_ROLE become Leader, I can not see any CoAP packets on sniffer (Of course, thread_coap_utils_cloud_data_update(...) function is called many times). In this case, when my application starts from OT_DEVICE_ROLE_CHILD, (after a short time) OT_DEVICE_ROLE changes to Router, then (after a short time) OT_DEVICE_ROLE changes to Leader (and CoAP packets are disappeared on sniffer).

Is this behavior expected? Can anyone help me?

By the way, is there any way to limit OT_DEVICE_ROLE Child and Router? SetLeaderRoleEnabled = false, or something...
Thank you.

EDIT: I've uploaded ble_app_scan_c_th.zip .

EDIT2: I've uploaded main.c_20180831.zip .

Parents
  • Hi,

    I do not think it is possible to disable the Leader role, as this is needed if you are the only Router in the network.

    Note: There is always a single Leader in each Thread network partition.

    Have you checked if you get any error codes when the device is in the Leader role? It sounds very strange that the role should affect the ability to send CoAP packets.

    Can you please upload your project so we can try to reporoduce the issue?

    Best regards,
    Jørgen

  • Hi,

    I've checked, but couldn't find any error codes when the device is in the Leader role.

    I've uploaded my project (Thread and BLE scan application?). I'm using <InstallFolder>\examples\ble_central\ble_app_scan_c_th\pca10056\s140\ses\ble_app_scan_c_th_pca10056_s140.emProject. This application must be used along with <InstallFolder>\examples\ble_peripheral\ble_app_blinky or something to provide BLE advertising. I'm sorry for many unused (ble_app_blinky_c) parts are remaining.

    And per this post, I've changed the NAT64 prefix from "prefix 64:ff9b::/96" to "prefix fd00:0064:0123:4567::/96" in /etc/tayga.conf at RaspPi_OT_Border_Router_Demo_v1.0.0-1.alpha (for making use of test CoAP server, which has private IPv4 address).

    Thank you.

Reply
  • Hi,

    I've checked, but couldn't find any error codes when the device is in the Leader role.

    I've uploaded my project (Thread and BLE scan application?). I'm using <InstallFolder>\examples\ble_central\ble_app_scan_c_th\pca10056\s140\ses\ble_app_scan_c_th_pca10056_s140.emProject. This application must be used along with <InstallFolder>\examples\ble_peripheral\ble_app_blinky or something to provide BLE advertising. I'm sorry for many unused (ble_app_blinky_c) parts are remaining.

    And per this post, I've changed the NAT64 prefix from "prefix 64:ff9b::/96" to "prefix fd00:0064:0123:4567::/96" in /etc/tayga.conf at RaspPi_OT_Border_Router_Demo_v1.0.0-1.alpha (for making use of test CoAP server, which has private IPv4 address).

    Thank you.

Children
No Data
Related