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.

CC1352P7: Wi-SUN connection time and optimization

Part Number: CC1352P7
Other Parts Discussed in Thread: SYSCONFIG, CC1354P10

Tool/software:

Hi,

I want to evaluate CC1352P7 for an IoT application using Wi-SUN.

Goal is to control and monitor nodes from a remote cloud app. Range and reliable connectivity (for real time control and monitor) are important for us.

The Wi-SUN nodes are expected to connect to a Wi-SUN gateway in a star topology ( no mesh).

1. How much time does a node take to connect with gateway?

2. If the connection time is in the order of minutes, why is it so high and how can we optimise it? Ideally, I would want it to be few seconds.

2. What is the maximum range under line of sight conditions?

Thanks

  • Hi Karthik,

    Wi-SUN is a mesh IOT network that usually consists of line powered routers and gateways. A good overview of the stack capabilities is our Wi-SUN Stack User's Guide: https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/docs/ti_wisunfan/html/wisun-guide/wisun-index.html# 

    1. The time that it takes to connect a router to a gateway is a matter of minutes because all devices in a Wi-SUN network are frequency hopping. That means when a new router wants to join the network it needs to first send a PAN advertisement solicit message that needs to be received by the border router and answered with a PAN advertisement message. After this the router has the frequency hopping information of the gateway and the join process transitions to state two were the certificates are exchanged which takes time due to the size of the certificate and the PHY that you chose. You can find the details of the join process here: https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/docs/ti_wisunfan/html/wisun-stack/join_process.html# 

    If you are using our latest SDK 8.30.1.1 https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK/8.30.01.01 a realistic expectation is below 15 min for 100 nodes.

    2. The fastest join time you will achieve by using the network profile Maximize Responsiveness (https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/docs/ti_wisunfan/html/wisun-stack/wisun-stack-overview.html#network-profiles) and using the rapid join option (both selectable in SysConfig). This will result in the time stated above.

    3. The maximum range depends mainly on the TX output power of the device, the PHY that you chose and the mounting height of the devices. You can use our range estimator to estimate this for your use case: https://www.ti.com/tool/RF-RANGE-ESTIMATOR You need to consider this as point to point range because Wi-SUN is a mesh network which means routers can connect to the gateway over other routers (basically each router is a repeater for other routers).

    4. If you are looking instead for a low power start network for battery powered nodes please have a look at the TI 15.4-Stack: https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/docs/ti154stack/html/ti154stack-guide/ti154stack-index-cc13xx_cc26xx.html# which allows for frequency hopping and sleepy nodes.

    Please let me know if you have more questions after looking through the documentation.

    Kind regards,
    Theo

  • Hi Theo,

    Do you recommend Wi-SUN for our use case?

    Thanks

    Karthik

  • Hi Karthik,

    will your gateway and routers be line powered or do you plan battery powered devices?

    Kind regards,
    Theo

  • Hi Theo,

    The devices(deployed in agriculture farm) will be line powered with a battery back in case of power failures. Primary supply is line power.

    Mesh is not preferred since direct link to gateway is easy to deploy and manage.

    We need real time control/monitor(to/from cloud app) of the devices with low connection/join time to the gateway.

    Range requirement is 1 km (would be ideal).

    Thanks
    Karthik

  • Hi Karthik,

    if the devices are line powered I strongly recommend you to use Wi-SUN.
    The protocol is made exactly for such use cases. 

    After the initial join process the Wi-SUN network will be always up and the nodes maintain their connection to the gateway and each other automatically. Also the nodes are automatically re-routing to always chose the cheapest connection to the gateway. This means you have no overhead for handling the mesh behavior because it is done automatically by the stack. From the gateway you can access each device in the network by it's IPv6 address which makes the integration with a cloud application and host management easy. You can send unicast and multicast messages and we integrate the CoAP protocol. All routers subscribe by default to one multicast group so that you also have a broadcast functionality that can be used to trigger all devices with low latency for safety critical shutdown mechanisms.

    If you really want to force a star network you can do it with Wi-SUN as well. The option is provided in SysConfig and it will lead to all routers connecting to the border router directly (no mesh). But then you are limited to the point to point range depending on the parameters explained in my first message and can not use the mesh to extend the range.

    We also provide a Linux host application that connects to the Border Router over  USB uart. https://github.com/TexasInstruments/ti-wisunfantund 
    On the Linux side you interact with the network as network socket and the application forwards traffic. It also already supports an external DHCP and external authentication server if you want to use it so that the network is managed completely on the host. You will also find the default web application that shows you your network setup after you started it.

    You can have a look at our setup examples to get started. The examples use our simpler host application but in your case I strongly recommend you to use the linux host application as it will ease your development. https://dev.ti.com/tirex/explore/node?node=A__ADa2uuCmB8bxyc-jInEdoQ__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST 

    Kind regards,
    Theo

  • Hi Karthik,

    could you tell me a bit more about the product that you want to implement with this solution. 
    Then I can assist you in how you can meet the requirements taken into account the final application.

    Kind regards,
    Theo

  • Hi Theo,

    We are building a product to remotely turn on and off motors in agriculture field and also to monitor currents/voltages using a metering IC(that is connected to the device via SPI). 

    Periodically, device reads current/voltage data and transmits to the border router. The border router would push it to the cloud using 4G cellular modem. The border gets commands from the cloud to control the motors.

    Based on the references mentioned above, the connection process is what is concerning. Taking 15 minutes to connected to a border router is too high. Say, if a device is disconnected for any reason, then it would take so many minutes to re-join. Until then, the device is on its own and the updates to the cloud won't be real time.

    Thanks

    Karthik

  • Hi Karthik,

    thank you for providing me with more background information. 

    Here we need to differentiate between join and re-join looking at Wi-SUN. The initial join process only happens when the device joins the network for the first time, you can see it as a initial setup. If you would start a network with 1 border router and 100 routers all at the same time it would take less 10 to 15 minutes until all devices are connected due to the required security exchange. This is obviously also faster if you have already a network set-up and want to only connect one more device to it. 

    Now looking at the situation that you are concerned about. If a device joined the network it gets provided with an address provided by the DHCP server (either running on the border router or the host) and a it has a network key. Both of this has an expiration time that can be configured at which it will get re-newed automatically. If a device is now disconnected for any reason and needs to reconnect we are in a re-join situation where the device does not need to go through the security exchange again because it has still a valid key. You can expect the router to re-join the network in around 1 min.

    I'm sure that you need to implement anyways some kind of additional handling for the case that the device disconnects. But in general you will end up with a very reliable network after join because the network maintains itself and you are not in an environment with a lot of obstructions or noise. Also the Wi-SUN Stack is frequency hopping in a pseudo random pattern which means that the connection will not be lost if there is one frequency covered as most likely the next one in the hopping sequence will be free again. This means the stack is very resilient and a disconnection would most likely only occur if the router looses power connection and I guess this would mean that also the connected motor lost power connection.

    If you are looking for a more lower level stack I think you can checkout the TI 15.4-Stack and of course it would also be possible for you to develop your own proprietary protocol using our radio Apis.

    Do you already have the CC1352P7 LaunchPads?

    Kind regards,
    Theo

  • Hi Theo,

    I don't have the kits yet.

    Could you clarify this: "I'm sure that you need to implement anyways some kind of additional handling for the case that the device disconnects"

    If I want to connect the Wi-SUN node with an MCU(UART or SPI) , can we do it?

    Is there a host MCU interface document that I can take a look at to check out what all APIs are available to integrate Wi-SUN module at the application level.

    Also, for the border router, we plan to use Raspberry Pi as the host. Any resources if its done already?

    Please point me to the test results of the range observed in start topology if you have it.

    Thanks

    Karthik

  • Hi Karthik,

    if you have the kits you can setup easy tests with the out of the box examples to get familiar with the network functionality. Please reach out once you have them and need help to set up a test. A good starting point is the SimpleLink Academy: https://dev.ti.com/tirex/explore/node?node=A__ADa2uuCmB8bxyc-jInEdoQ__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST 

    What I meant is that no matter which wireless protocol you use you need to always implement the handling of a connection loss. I explained in my last post how the MCU will behave from a Wi-SUN stack point of view. Since you mentioned that it will be connected to a motor I would expect that there is some kind of backup implemented that will safely turn off the motor if the connection is lost for a defined timeout.

    We have two host applications for Wi-SUN and both connect to the MCU over UART. The first one is TI Wi-SUN FAN Spinel https://github.com/TexasInstruments/ti-wisunfan-pyspinel and the second one is the linux host application 
    ti-wisunfantund https://github.com/TexasInstruments/ti-wisunfantund. Both are documented in their git repositories and you can go through the list of commands and features that they provide.

    If you run debian on the Raspberry Pi you can run both host applications out of the box and connect the MCU over UART. There is nothing that needs to be done additionally.

    You can estimate the range using the https://www.ti.com/tool/RF-RANGE-ESTIMATOR. You can select the different Wi-SUN PHYs and also see the influence of antenna mounting height and tx power (need to take into account the local regulations). This is always giving you the point to point range.


    Kind regards,
    Theo

  • Hi Theo,

    I am planning to buy few kits. Could you confirm the part.

    https://www.ti.com/tool/LP-CC1352P7

    We should be taking CC1352P7-1, right?

    Also, we would need antenna. Looks like the kit does not have it. Any recommendations?

    Thanks

    Karthik

  • Hi Karthik,

    yes, this is the correct LaunchPad for CC1352P7.

    CC1352P7 is a good starting point because it can run as the border router or as the router node. Also it has the high PA with max +20 dBm TX power that will help you to achieve a long range.
    If you need more RAM and flash you could look into using CC1354P10 (https://www.ti.com/product/CC1354P10) instead.

    All LaunchPads come with a PCB antenna that is sufficient to get started.
    If you want to start later evaluating external antennas you can use the SMA connector on the board to connect an external antenna.
    To connect to the SMA connector you need to move one resistor on the LaunchPad that is by default connecting to the PCB antenna.

    Kind regards,
    Theo


  • Hi Theo, please see the snapshots. What is the issue here?

    I followed the instructions on this URL to test:

    Task 1 – Run the Border Router Project

    https://dev.ti.com/tirex/explore/node?node=A__AQ43bVrHhe7o7BTHhal9Cw__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST

    CCS version: Version: 20.1.1.8__1.7.1

    Thanks

    Karthik

  • Hi Karthik,

    the error indicates that the LaunchPad does not receive the command and does not reply to it. This is why the PySpinel application shows error.

    please try to close the debug session after you flashed the device with it. Then unplug and reconnect the LaunchPad and start PySpinel again.

    If this doesn't help please help me to narrow down the problem by answering the following questions.

    1. Do you have imported the project: ns_br for CC1352P7: ns_br_LP_CC1352P7_1_tirtos7_ticlang?

    2. Did you load the project with the debug option on the chip?

    3. Did you close the debug session and reconnected the LaunchPad?

    4. Did you download the latest tag from the PySpinel repository: https://github.com/TexasInstruments/ti-wisunfan-pyspinel/archive/refs/tags/TI_WiSUN_STACK_01_00_09.zip ?


    Kind regards,
    Theo

  • Hi Theo,

    1.

    2. What does it mean? I did Run -> Debug Project on CCS. Control does not halt at main ( please refer to snapshot in my previous message)

    3. Yes, i did.

    4. Not sure about the version. Where can  I check that?  I used the following SDK:

    Thanks

    Karthik

  • Hi Karthik,

    please try to flash the board using the option "Run -> Flash project"

    I would like to ensure that the debug session does not interfere with PySpinel.

    Kind regards,
    Theo

  • Hi Theo,

    I did as directed. Doesn't work. Please check the snapshots:

    1. After flashing code from CCS

    2. command line output

    Thanks

    Karthik

  • Hi Theo,
    I am not able to make progress. Could you help sort this out quickly.

    Thanks

    Karthik

  • Hi Theo, awaiting response.

    Thanks

    Karthik

  • Hi Karthik,

    I apologize for the late reply I was ooo.
    I will follow up in the new thread that you opened,

    Kind reagards,
    Theo