The author of the original article - https://t.me/Pryslonskyi
All rights belongs to him. Here is only .md adaptation and translation.
USB modem - Huawei E3372h-153/E3372s-153 (in StickMode; non-HiLink)
Firmware versions beginning with 21.xxx.xx.xx.xx NOT 22.xxx.xx.xx.xx
Router running OpenWRT; I use:
- GL.iNet AR750S firmware v3.022
- OpenWrt 18.06.1 r7258-5eb055306f / LuCI openwrt-18.06 branch (git-18.196.56128-9112198)
| Visual Studio 2019 Professional: NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y | |
| Visual Studio 2017 Professional: KBJFW-NXHK6-W4WJM-CRMQB-G3CDH | |
| Visual Studio 2015 Professional: HMGNV-WCYXV-X7G9W-YCX63-B98R2 | |
| Visual Studio 2013 Professional: XDM3T-W3T3V-MGJWK-8BFVD-GVPKY | |
| Visual Studio 2012 Professional: 4D974-9QX42-9Y43G-YJ7JG-JDYBP |
| import asyncio | |
| import cv2 | |
| from aiohttp import web, MultipartWriter | |
| async def mjpeg_handler(request): | |
| boundary = "boundarydonotcross" | |
| response = web.StreamResponse(status=200, reason='OK', headers={ | |
| 'Content-Type': 'multipart/x-mixed-replace; ' | |
| 'boundary=--%s' % boundary, |
| #!/bin/bash | |
| # SPDX-License-Identifier: Apache-2.0 | |
| ################################################################################ | |
| # secure-erase.sh | |
| # Copyright 2018-2023 bwDraco - Brian Wong | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. |
Frame data is transferred inside packets (similar to DMX, for example). A frame is an image representing a matrix or a light scene.
The packets start and end with one-byte characters. In between are a few control bytes followed by the payload. There is no set size for a payload; it is transmitted with each packet. This makes the protocol quite flexible. There are enough bytes in a single packet for an RGB matrix with 21,845 pixels, but if you just want to control an RGBW lamp, that only requires 9 bytes. The variable frame size means there is no overhead, allowing for maximum transfer speed.