KW41Z Socket communication with PC

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

KW41Z Socket communication with PC

1,186 Views
davidpiskula
Contributor I

Hi, I have the USB-KW41Z and FRDM-KW41Z kits and I'm running the Thread network demo on them, with the USB being the border router. I've successfully remade some functions so that they fit my project but what I've been stuck on is transfering data (a temperature value to be exact) from my border router to my PC. I've been trying to do so through sockets.

I've tried using both the UDP and TCP protocol functions from app_socket_utils.h, I've also attempted to do it on my own using only the functions provided in sockets.h and I've also used the shell demo for socket communications on one of the FRDM nodes in my network.

When using TCP, my program causes a hard fault when it uses the connect() function. When using UDP, sendto() returns -1. Interestingly, sending data through sockets from my PC to the node works fine. Also, I can ping the nodes and the border router from my PC but can't ping my PC from the nodes, not sure if that's related.

I've also tried disabling the firewall and windows defender completely but that didn't help either.

Is there anyone who encountered the same problem? Any advice would be appreciated.

Tags (3)
0 Kudos
3 Replies

731 Views
soledad
NXP Employee
NXP Employee

Hi,

Please check the below link and let me know if this helps:

MKW41z NXP Thread stack socket decryption


Have a great day,
Soledad

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

731 Views
davidpiskula
Contributor I

Hi, thanks for the answer, I ended up trying it out on Ubuntu-mate and there are no problems with it there, so it's most likely a problem with Windows. I don't really need it to work on Windows either, I just had a different issue regarding my raspberry pi, so I was trying to develop everything on Windows at the time.

I would delete the question but I do not know how to do that, so I'll just mark it as resolved, if that's ok.

Nevertheless, thank you for your answer and have a nice day,

David

0 Kudos

731 Views
steffenjahnkepa
Contributor III

Hello David,

I know, it's been a while since you started this post, but I'm trying to do the same with the same Hardware and sockets on Linux. Could you maybe give me some Information how you proceed?

1.   You flashed the FRDM-KW41Z for example as RouterEligableDevice?

2.   You flashed the USB-KW41Z (MKW41) as Border-Router?

3.   You flashed the USB-KW41Z (K22F) with rndis_bridge application?

4.   But what have you done on the linux site to communicate via sockets with the end device? You are adressing the THREAD Nodes with ipv6-addresses in your self written linux application? Or is there something existing on linux to do this?

Would be awesome if you could give me some Information! Thanks a lot!

Best Regrads,

Steffen

0 Kudos