Skip to content

anon767/stm32_websocket_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Websocket Client implementation

Simple Websocket Client using mbedtls tested on STM32F7

Features

  • Sending and Receiving encrypted websocket data

Limitations

  • No continuation frames
  • Not parsing Server Handshake response
  • No other Op Codes than "text"
  • No random Nonce for handshake

Prerequisites

Set up a Project for your STM32 Microcontroller with LWip and mbedTLS For example:

Also you need:

  • openssl
  • golang (for the test websocket server)

Usage

  1. Adjust the client.h
  2. In your main.c
#include client.h

and call

SSL_Client();

Somewhere in you main();

  1. Generate Cert/Key and build and start server
mkdir -p $GOPATH/src/github.com/anon767/wsserver
cp ./test_server.go $GOPATH/src/github.com/anon767/wsserver/wsserver.go
cd $GOPATH/src/github.com/anon767/wsserver
go get && go build
chmod +x wsserver
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
./wsserver
  1. Compile and Flash your device

About

Websocket Client using mbedtls

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published