Websocket Client on Kinetis

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

Websocket Client on Kinetis

2,878 Views
stevenlutz
Contributor II

I need to make a websocket connection to a server from a K64F (or other K series MCU) to exchange JSON formatted data. I can't find an example of how this is done with FreeRTOS, Lwip, or the KSDK at all. All I can find are Websocket server examples. 
Can someone please advise me of what I should ne looking for or if this is no possible?
I'm also tempted to try mongoose os. 

0 Kudos
1 Reply

2,100 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Steven:

This should be possible but you will probably have to implement the client yourself.

There is no lwIP web socket client example in SDK. Just a server socket implementation in middleware\lwip\src\apps\httpsrv\httpsrv_ws.c.

I have found some client libraries which perhaps could be used as inspiration for lwIP / FreeRTOS implementation:

 

https://github.com/jeremyhahn/cwebsocket

https://github.com/dhbaird/easywsclient

https://github.com/warmcat/libwebsockets

https://github.com/contiki-os/contiki/blob/master/core/net/ipv6/websocket-http-client.c

https://github.com/payden/libwsclient

 

Regards

Daniel

 

0 Kudos