Skip to content

Websocket connection as a client with Raspberry Pi Pico W (Micropython) removing the consideration of SSL/TLS authentication.

Notifications You must be signed in to change notification settings

Jefusito/uwebsockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MicroPython WebSocket Client without USSL

This repository contains a small modification of the WebSocket client for MicroPython, based on uwebsockets.

Features

  • Supports WebSocket (ws://) and secure WebSocket (wss://) connections in trusted networks.
  • Optimized implementation for MicroPython without dependencies like logging or ussl.

⚠️ Warning: wss:// connections in this implementation do not use SSL/TLS encryption, making them insecure for public networks.

Example Code:

from uwebsockets.client import connect

# Connect to the WebSocket server
ws = connect("ws://host:port/path")  # Replace with your WebSocket URL

# Send a message
ws.send("Hello from MicroPython!")

# Receive a response
response = ws.recv()
print("Received response:", response)

# Close the connection
ws.close()

Notes

  • Security: This WebSocket client does not implement encryption for wss:// connections. Using a secure proxy is recommended if TLS encryption is needed.
  • Compatibility: Tested on MicroPython for Raspberry Pi Pico W, ESP32, and ESP8266.

About

Websocket connection as a client with Raspberry Pi Pico W (Micropython) removing the consideration of SSL/TLS authentication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages