Thread connection problem OTA update

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Thread connection problem OTA update

Jump to solution
3,086 Views
lukaszgesieniec
Contributor II

Hi,

I am working with KW41Z and I am trying to add ota functionality to my application.

I have played router_eligible_device_ota_client together with host_controlled_device_ota_server and it works very well.

The next step is to add ota client functionality to my own application based on ble_thread_router_wireless_uart. I am trying to do this with instructions included in "Kinetis Thread Stack OTA Firmware Update User’s Guide.pdf".

The problem is that my application can not connect to host_controlled_device_ota_server (CommissionerJoinerDtlsError).

It looks like thread configuration problem but everything inside app_thread_config.h files (my app and server app) are the same.

Where can be the problem?

Labels (2)
0 Kudos
Reply
1 Solution
2,556 Views
jc_pacheco
NXP Employee
NXP Employee

Hello Lukasz, 

Indeed it seems to be an application issue.

I'd recommend to take a look into task priorities and general resources. It'd be worth to try increasing the gAppJoinTimeout_c.

-JC

View solution in original post

0 Kudos
Reply
8 Replies
2,556 Views
jc_pacheco
NXP Employee
NXP Employee

Miguel,

The download of an OTA image from server to client requires an application bootloader (framework/bootloader_otap) installed and sufficient memory (external or internal) to store the newly loaded image. The Thread framework includes an application interface in the OtaSupport header and module files for using the external storage modules while receiving the firmware image blocks over the air.

First, program the bootloader_otap and then the client_ota application.

See Kinetis Thread Stack OTA Firmware Update User’s Guide.pdf 

-JC

0 Kudos
Reply
2,556 Views
miguelgonzalez
Contributor II

Hi Lukasz Gesieniec.

I am trying to use the same router_eligible_device_ota_client example as you did. I can't execute the program without running the code in Kinetis Design Studio (debug mode). Did you have the same problem? If you had it, how did you solve it?

Thank you.

0 Kudos
Reply
2,556 Views
lukaszgesieniec
Contributor II

I did not problem with execute the program.

0 Kudos
Reply
2,557 Views
jc_pacheco
NXP Employee
NXP Employee

Hello Lukasz, 

Indeed it seems to be an application issue.

I'd recommend to take a look into task priorities and general resources. It'd be worth to try increasing the gAppJoinTimeout_c.

-JC

0 Kudos
Reply
2,556 Views
lukaszgesieniec
Contributor II

Hello Juan Carlos,

Thank you for your answer. It helped me to find the issue. The problem was in my task where I have added THR_NwkJoin function to auto connect to network without pressing button on the board. I have added also code to init my own coap session. Now I think the right way to do this is modifying code rather than adding additional code in new tasks.

I have to learn a lot about sdk.

Thanks.

0 Kudos
Reply
2,556 Views
jc_pacheco
NXP Employee
NXP Employee

Hello Lukasz, 

Can you please provide some sniffer captures?

Did you follow the steps to Start Commissioner,  Add an expected joiner and Sync Steer data on the HCD_OTA_Server?

What clock configuration are you using?

Meanwhile, you could try using "#define THR_DEV_IS_OUT_OF_BAND_CONFIGURED  TRUE" to avoid the commissioning step on the joiner device.

-JC

0 Kudos
Reply
2,556 Views
lukaszgesieniec
Contributor II

Hello Juan,

It took a long time but there are logs from nxp test tool and wireshark.

I see key exchange done but after there is handshake failure. Where can be the bug?

249    150.021832    fe80::51b8:34d:34bc:3014    fe80::6dda:bccd:3ab1:ee42    DTLSv1.2    103    Server Hello, Server Key Exchange, Server Hello Done

251    152.766746    fe80::6dda:bccd:3ab1:ee42    fe80::51b8:34d:34bc:3014    DTLSv1.2    62    Alert (Level: Fatal, Description: Handshake Failure)

Please look at this if you can.

0 Kudos
Reply
2,556 Views
lukaszgesieniec
Contributor II

Hello Juan,

Yes, I followed the steps Start Commissioner, Add an expected joiner and Sync Steer data on the server side. My application is based on ble_thread_router_wireless_uart example because I need to support ble and thread communication.

The clock configuration is the same like in ble_thread_router_wireless_uart example. I did not change it.

I will check the clock configuration.

Tommorow I will get the USB-KW41Z stick so I will provide some sniffer captures.

Thank you for help,

Lukas

0 Kudos
Reply