Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jefusito/uwebsockets
Websocket connection as a client with Raspberry Pi Pico W (Micropython) removing the consideration of SSL/TLS authentication.
https://github.com/jefusito/uwebsockets
micropython raspberry-pi-pico websockets-client
Last synced: 8 days ago
JSON representation
Websocket connection as a client with Raspberry Pi Pico W (Micropython) removing the consideration of SSL/TLS authentication.
- Host: GitHub
- URL: https://github.com/jefusito/uwebsockets
- Owner: Jefusito
- Created: 2024-12-01T06:11:18.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-01T06:12:07.000Z (2 months ago)
- Last Synced: 2025-01-29T09:48:29.594Z (8 days ago)
- Topics: micropython, raspberry-pi-pico, websockets-client
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MicroPython WebSocket Client without USSL
This repository contains a small modification of the WebSocket client for MicroPython, based on [uwebsockets](https://github.com/danni/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:
```python
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.