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.

CC2538: CC2538 for OTA

Other Parts Discussed in Thread: CC2538, Z-STACK, CC2531, SMARTRF06EBK, CC2531EMK, CC2538EMK, CC2538EM-RD

Hi team,

I already opened this forum for cc2538 OTA operation. I am still in that issue. For your reference, I given link below of previous forum
https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1176617/dongle-part/4438527?tisearch=e2e-sitesearch&keymatch=%252525252525252520user%25252525252525253A544493#4438527

PAN ID successfully created, but the device list still not appear. Is there any details to move forward. I uploaded my current situation as screenshot below.


Best Regards,

kamalesh.C

  • Hi kamlesh,

    Here are the latest prior responses from the other E2E:

    "I would suggest you to use sniffer to check what exactly happens over the air." https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/699648/faq-zigbee-packet-sniffing-solutions?tisearch=e2e-sitesearch&keymatch=faq%3Atrue 

    "The OTA Dongle must form the network and open for joining (BDB formation and steering) which the OTA client should fresh join (BDB steering) after being factory reset (i.e. remove NV and prior network information).  They should both also discover services by enabling BDB Finding & Binding.  This is all supported through UI, whether it is pushbuttons or UART terminal, by default. Changes are required for automatic commissioning.  Complete instructions are provided in <Z-Stack directory>/Documents/Z-Stack OTA Upgrade User's Guide.pdf or the online Z-Stack OTA Upgrade guide.  It would be optimal if you could use TI hardware to run the default examples and better familiarize with the OTA interface."

    Thus the first step would be to test the OTA Server ZC with a default Z-Stack OTA example and TI-provided hardware, then the second part is comparing the sniffer log of a working example against that from your custom board and software changes.

    Regards,
    Ryan

  • Hi Ryan, 

    Actually I am using my custom hardware board, it is exact equivalent to cc2538dk board. With this custom board, I able to form the pan id. But I dont know what is happening here?

    This z-stack OTA Upgrade guide is suitable for my custom board?
    Can i follow this to do this ota firmware update?

    Best Regards,
    Kamalesh.C

  • With this custom board, I able to form the pan id

    So you programmed your custom hardware board with ZC OTA Server firmware and have formed the network, now you must join a OTA-capable ZR/ZED application to this network.so that this ZC OTA Server can upgrade the remote device.

    This z-stack OTA Upgrade guide is suitable for my custom board?
    Can i follow this to do this ota firmware update?

    If the hardware is equivalent to the TI EVM then this should be possible.

    Regards,
    Ryan

  • Hi,

    If the hardware is equivalent to the TI EVM then this should be possible.
    Ok. So, it is good to go.

    now you must join a OTA-capable ZR/ZED application to this network.so that this ZC OTA Server can upgrade the remote device

    I did not get this,  I followed all the guidelines, whichever z-stack contain. But still, i am not getting this device list under the pan id.
    Client board have the image A downloaded, i powered this board and i started the otaserver application with dongle board.

    Is there any steps i missed?

    Regards,
    Kamalesh

  • Push buttons are available to start the commissioning process.  For example, HAL_KEY_SW_1 from OTA_Dongle_HandleKeys of the OTA_Dongle example.  Thus your client board must also activate its commissioning to join the ZC's network.  You must make sure that PAN ID, channel, etc. settings are aligned from the f8w*.cfg files.

    Regards,
    Ryan

  • Hi Ryan,

    In our board, we don't have such option. In Dongle board, earlier yikai chen suggested to add one line (BDB commissioning) in Dongle_init function to initiate this activation.

    But, for client, Is there any such option to activate to join in the zc's network?

    Regards,
    Kamalesh.C

  • You can add similar automatic commissioning to your client as well.  This will make start-up timing more critical as the Dongle needs to be commissioning and ready to join devices before the Client starts its commissioning process, or you must modify the application to continually attempt commissioning until successful.  Note that the permit join enable period only lasts 180 seconds after ZC commissioning begins (max 254), BDBC_MIN_COMMISSIONING_TIME.

    Regards,
    Ryan

  • Hi Ryan,

    Could you please suggest where i have to add this bdb_commissioning line in client code.
    I am trying to do the client code from the example of sampleswitch application code in z-stack-3.0.2.

    Best Regards,
    Kamalesh.

  • You already mentioned how YK had given you an example for Dongle_init, and I suggest a similar approach be achieved for zclSampleSw_Init.

    Regards,
    Ryan

  • Hi Ryan,

    Sorry for this late reply. I tried this updation, but I did not get the device list under this pan id. Still that same condition here.

    Is there any other way to move forward?

    Best Regards,
    Kamalesh

  • Hi Ryan,

    Actually I tried ubiqua analyzer also by created custom adapter. I attached the screenshot for your reference.

    There also I tried all the channel and default channel 0B. No traffic packets are coming. What to do?

    In my custom board, we have a pcb zigbee antenna. If you have the client bin file for execution means, Please share those bin file.

    Best Regards,
    kamalesh.C

  • Ways to move forward include testing with TI hardware and/or using ZNP firmware and Z-Tool to further understand the intended commissioning process.  The default channel for OTA_Dongle is 11, which is the decimal representation (0x0B being hexadecimal).  This can be modified from the f8wConfig.cfg file if desired.  You should at least observe Link Status messages from the ZC once the network is formed, and hopefully beacon requests from the ZR/ZED if the commissioning process has been activated.  You can add a timer to your joining device main application to repeat join attempts until successful (osal_start_timerEx and then call bdb_StartCommissioning from the event)

    Regards,
    Ryan

  • Hi Ryan,

    I done this changes, then also this device did not created here. what to do?

    Regards,
    Kamalesh.C

  • I have no further suggestions to give without more details and information.  It appears that you should be evaluating basic Zigbee device functionality further before addressing OTA operations

    Regards,
    Ryan

  • Hi Ryan,

    Actually I am using contiki os in my custom board. From the example of contiki, I done zigbee example programs, after that only i came here to do the ota.

    Feel free to ask details about this. I will tell you.

    Regards,
    Kamalesh

  • You need to provide a sniffer log confirming that your ZC forms a Zigbee network and enables permit join the ZR/ZED joins this network (i.e. commissioning works through BDB NWK steering) over the same IEEE channel.

    Regards,
    Ryan

  • Hi Ryan,

    You are saying, I have to use the packet sniffer tool , to check whether our dongle is creating network or not?, right?

    But, Actually while opening the application itself it is showing cc2531 dongle. But, I am using cc2538 board having dongle program. How it will work?

    Is there any seperate application for cc2538 dongle?

    After that I tried dongle board with that packer sniffer application, there is no output and actions.

    Regards,
    kamalesh

  • One device for the ZC, one device for the ZR/ZED, and one device for the packet sniffer.  If the OTA Dongle is not sending out regular Link Status packets (every 15 seconds) then it has not formed a Zigbee network over the channel you are sniffing.

    Regards,
    Ryan

  • Hi Ryan,

    I am bit confusing, for dongle application, i have to use the cc2531 dongle or cc2538 evaluation board?

    One device for packet sniffer in the since, it is cc2531 usb device?


    Regards,
    Kamalesh

  • The OtaServer PC Tool only communicates through UART, not USB, so the CC2531EMK is not supported by the OTA Dongle application.  Thus I would recommend that you use the CC2538EMK + SMARTRF06EBK as the OTA Dongle Zigbee coordinator application, and the CC2531EMK as the Packet Sniffer.  Then there would be a third device which is the OTA client and Zigbee joiner (router or end device).

    Regards,
    Ryan

  • Hi Ryan, 

    I understood clearly. But why we have to connect this EMK board with smartrf board.

    Can i connect the emk board only for dongle?

    Why we are merging this EMK with SMARTRF Board, what purpose?

    Best Regards,
    Kamalesh

  • Hello Ryan,

    Could you please clarify my above doubts?

    Regards,
    Kamalesh.C

  • As I recall, the CC2538 OTA Dongle example does not support the USB peripheral (only UART) whereas the CC2538EMK (or CC2538EM-RD) only supports a direct USB peripheral connection.  Unless you've modified the code example to support such functionality, the SMARTRF06EBK is necessary as a backchannel UART to USB translation tool.

    Regards,
    Ryan

  • HI Ryan,

    Sorry for the late reply.

    Please find my interpretation below and correct me if I am wrong.

    1. CC2538 OTA dongle example works with UART alone.
    2. CC2538EMK has only USB
    3. To access the UART of CC2538EMK, we need SMARTRF board.

    Kindly clarify the below points.

    1. Which pins of CC2538 is used as UART for OTA dongle example?
    2. We use PA0 and PA1(UART pins of CC2538), to program the CC2538 over USB to UART transistion IC(CP2102)

    Regards,
    kamalesh

  • Your interpretation is correct on all accounts.

    1. My assumption is PA1 as UART_TX and PA0 as UART_RX, but please confirm this with your OTA_Dongle project build.
    2. https://www.ti.com/lit/swra466 is the CC2538 ROM bootloader User's Guide, the pins you've listed are correct.

    Regards,
    Ryan

  • Hi Ryan,

    I did not get your first point. How to confirm these UART PINS?

    I searched for the pin assignment in OTA_DONGLE program. But, there is no assignment. Could you please tell me how and where to find those pin assignment in dongle application?

    Regards,
    kamalesh

  • Hi kamalesh,

    In your project source files, can you find where the UART is opened?

    I'd expect there should be some pin initialization there.

    Thanks,
    Toby

  • Hi Toby,

    I am Trying to do the application of z-stack(3.0.2) application of sample light from home automation only.

    This application itself is not happening.

    Best Regards,

    Kamalesh.C 

  • OTADongle project example: ZTOOL_P1 defined(Project Options -> C/C++ Compiler -> Preprocessor), ZTOOL_PORT is HAL_UART_PORT_0.  The rest is HalUARTInit -> HalUARTInitIsr which is declared from Z-Stack 3.0.2\Components\hal\target\CC2538\_hal_uart_isr.c

    Regards,
    Ryan

  • Hi Ryan,

    Sorry for the late reply.

    I checked that functions parameters for uart. There also same configuration like ours.

    void HalUARTInitIsr(void)
    {
    SysCtrlPeripheralEnable(HAL_UART_SYS_CTRL);

    /* Setup PB0 as UART_CTS, PD3 as UART_RTS
    * PA1 as UART_TX and PA0 as UART_RX
    */
    IOCPinConfigPeriphOutput(GPIO_A_BASE, GPIO_PIN_1, IOC_MUX_OUT_SEL_UART1_TXD);
    IOCPinConfigPeriphInput(GPIO_A_BASE, GPIO_PIN_0, IOC_UARTRXD_UART1);
    GPIOPinTypeUARTInput(GPIO_A_BASE, GPIO_PIN_0);
    GPIOPinTypeUARTOutput(GPIO_A_BASE, GPIO_PIN_1);
    recRst();

    }

    We also used the same port for uart communication.

    What is the reason for our issue?

    Could you please tell me?

    Regards,
    Kamalesh

  • Can you please summarize your current hardware setup (TI EVMs or custom board) and observed behavior?  I recall you were able to open a Port session inside of the OtaServer PC Tool, thus your OTA Dongle ZC setup should be sufficient.  There was a matter of modifying your ZC and ZR/ZED OTA client to enable permit join / commissioning without using the default push button setup by calling bdb_StartCommissioning after device initialization.

    Regards,
    Ryan

  • Hi Ryan,

    Hardware setup:-  

    We have the custom board having cc2538 micrcontroller. It have the uart for flashing(we already given above the details). For dongle application, We successfully flashed the dongle image to this board and after adding the bdb commissioning line, it is creating the pan id.

    But for client, I successfully flashed the client image to our same custom board. In the application of ota server pc tool, after open the com port of dongle board, it is creating pan id and waiting for the device node. I added the bdb commissioning line in client code also, but no use.

    I checked the uart configuration also.

    How to display the node devices from client board?

    let me know If you want to know any pin configuration details in my custom  board?

    Regards,
    Kamalesh

  • The node device will be displayed from the client board on the OtaServer once it joins the OTA dongle's Zigbee network.  The Pan ID being created by the OTA dongle is a good sign that this device is in working order, but sniffer confirmation is always preferred. Here are the steps you need to perform:

    • Set up a sniffer log using Wireshark and a CC26X2 LaunchPad.
    • Confirm that that both devices use the same channel and Pan ID settings.
    • Provide the bdb_StartCommissioning code you added to the client where it starts commissioning the node two to five seconds after initializing the device.
    • Debug the client bdb_StartCommissioning to ensure that commissioning starts and steers the Zigbee BDB
    • Optional: Repeat bdb_StartCommissioning every 30 seconds in your application until the device state is no longer init/disc/joining/unauthorized but actually indicates that it is a end device or router.

    Regards,
    Ryan

  • Hi Ryan,

    I don't have CC26X2 LaunchPad. Is this mandatory to use this launchpad for sniffer checking or can we do it with another way? 

    Both devices have same channel and PAN ID settings.

    Regards,
    Kamalesh

  • Hi Ryan,

    I gone through this link. I will buy cc2531 dongle board and  do sniffing using packet sniffer application. You are saying we have to see the zigbee network between our dongle and client board right?

    I will get back to you.

    Regards,
    Kamalesh

  • A CC2531EMK and Packet Sniffer 1 is suitable.

    You can add a timer to your joining device main application to repeat join attempts until successful (osal_start_timerEx and then call bdb_StartCommissioning from the event)
    • Provide the bdb_StartCommissioning code you added to the client where it starts commissioning the node two to five seconds after initializing the device.
    • Debug the client bdb_StartCommissioning to ensure that commissioning starts and steers the Zigbee BDB
    • Optional: Repeat bdb_StartCommissioning every 30 seconds in your application until the device state is no longer init/disc/joining/unauthorized but actually indicates that it is a end device or router.

    You are enabled to continue modifying and debugging your ZED project until the hardware arrives.

    Regards,
    Ryan