This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ti-wisunfantund webapp

Part Number: LP-CC1352P7

Hi,

I built a ti-wisunfantund webapp using instructions from github.com/.../ti-wisunfantund. However, when I run node ti wisunfan webserver.js and navigate to localhost:8035, the interface does not display all connected devices. I also can't control the LED via that interface.

The command sudo /usr/local/bin/wfanctl —webserver displays an error anytime any node connected to the BR.  

  • Hi,

    I am struggling to reproduce your issue, can you please elaborate on your setup?

    1. Are you using LP-CC1352P7 for all routers (including the border router)?
    2. Are you using the default ns_coap_node and ns_br example projects or have you made any modifications? If you have made any modifications, which modifications have you made?
    3. How many nodes are you using?
    4. Which Linux OS are you using?
    5. Does any router/node other than the border router ever show up in the web interface?
    6. Are you following the steps in the "Steps to run demo" section? https://github.com/TexasInstruments/ti-wisunfantund#steps-to-run-demo
    7. Are you able to ping the connected devices using ping6 -I wfan0 <ip address>?

    By the way, the LED control is only supported on the CoAP based routers, so it is expected that you won't be able to control the LEDs for the border router.

    Thanks,
    Nikolaj

  • Hi,

    1. yes

    2. I used ns_coap_node and the ns_br example, with change preamble in syscfg to 8 bytes since I run on Mode 2a-2 EU domain. Channel 0 was chosen for capture packet with a TI sniffer agent.

    3. I have 3 coap nodes 

    4. Ubuntu version 21.10 OS on Raspberry Pi 4 B+

    5. No, just only BR

    6. yes, I think all steps were done sequentially.

    7. I ping with command ping6 <ip address> (when I added another argument -l or/and wfan0, It said invalid argument)

  • Hi,

    Updated,

    Hi, I made the change in /src/wpanctl/wpanctl.c. When any node router connected to BR, the command sudo /usr/local/bin/wfanctl —webserver did not fail as I mentioned above anymore. However, I believe the web demo can only accept two node routers connected to BR because when I test with three node routers, the third node does not appear on the same interface as the other two nodes.

    So, how do I go about implementing with more than two node routers?

  • Hi,

    What change did you do in /src/wpanctl/wpanctl.c?

    Thanks,

    Nikolaj

  • Hi,


    I changed line 780 in wpanctl.c from char [50] to [150]

    This seems like a logical change, I think the value of 50 is too small. I will report this issue to R&D. Thanks for catching this issue.

    So, how do I go about implementing with more than two node routers?

    I think I might have reproduced your issue, and it appears to be an issue with wfanctl and how it handles the "get connecteddevices" command. This command does not return all the connected devices (if you call the command multiple times, it will return all of the devices in sets of two or less), which I believe is why the webapp does not display all of the connected devices.

    Can you please confirm that the "get connecteddevices" command does not return all of the connected devices on your system (don't use the "--webserver" argument for wfanctl and wfantund?

    I have looped in the R&D team on this issue, and I am waiting for a response from them.

    Thanks for your patience,
    Nikolaj

  • Hi,

    The "get connecteddevices" does indeed only return up to two devices. This is why you only see up to two devices in the web interface.

    As a temporary workaround to get the web interface working, you can change CONNECTED_DEVICES_BLOCK_SIZE (in ncp_base_mtd.cpp in the border router example) to a higher number to allow the "get connecteddevices" command to return more than two devices. However, I am not sure what the side effects of such a change are. I do not suggest using this in production code, without fully understanding the consequences.
    Keep in mind that this file (ncp_base_mtd.cpp) is linked to the project and not copied. I will suggest adding the file to the project as a copied file and not a linked file, to prevent changing the value for all other projects.

    Regards,
    Nikolaj

  • Hi,

    Yes, I confirm "get connecteddevices" command does not return all of the connected devices.

  • Hi,

    Thanks, I will try your suggestion.