星期五, 5月 03, 2024
星期三, 4月 17, 2024
ser2net和socat
Reference:
- ser2net和socat
- ACCESSING A USB IO MODULE IN A NETWORK BY USING LINUX AND SOCAT
- 即時監看 Serail Port 傳輸內容
root@Moxa:~# socat -u -x file:/dev/ttyM0,raw file:/dev/null 2>&1 | awk '{print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'
- 使用 Socat 進行加密綁定和反向 Shell (Linux/Windows),使用綁定或反向 shell 時,使用 openssl 加密您的流量。
- Connecting to a Remote Serial Port over TCP/IP
星期二, 2月 20, 2024
取出so 內function name
nm -D libmy.so | sed -n 's/^[0-9a-f]* [Tt] \(.*\)/\1/p'
- parsing name
- nm -D ./libmy.so | sed -n -e 's/^\([0-9a-f]*\) [Tt] \(.*\)/\2 \U\2/p' | sed -e 's/\([^ ]*\) *\([^_]*\)_.*/,\1, \2, 0},/'| nl|sed -e 's/^/{/'
- //{num, name, define, bused}
- { 27, mutual_exclusion_read_unlock, MUTUAL_EXCLUSION_READ, 0},
- class out
- nm -D ./libmy.so | sed -n -e 's/^\([0-9a-f]*\) [Tt] \(.*\)/\2 \U\2/p' | sed -e 's/\([^ ]*\) *\([^_]*\)_.*/,\1, \2, 0},/'| nl|sed -e 's/^/{/' |awk -F ", " '{print $2}' | awk '!seen[$0]++'
- VPI
- enum out
- nm -D ./libmy.so | sed -n -e 's/^\([0-9a-f]*\) [Tt] \(.*\)/\2 \U\2/p' | sed -e 's/\([^ ]*\) *\([^_]*\)_.*/,\1, \2, 0},/'| nl|sed -e 's/^/{/' |awk -F ", " '{print $2}' | awk '!seen[$0]++'| awk '{print $0 "=" NR-1 ","}'
- CGI=0,
- EEPROM=1,
- GET=2,
- IPC=3,
- MQ=4,
- MUTUAL=5,
- PRINTLOG=6,
- PUT=7,
星期六, 2月 17, 2024
星期五, 2月 16, 2024
星期一, 11月 13, 2023
modbus
簡介 Modbus TCP
https://fullstackladder.dev/blog/2022/11/07/introduction-modbustcp/
第六章 Modbus 通訊方法及格式
chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://www.cyei.com.tw/upload_files/services/03.pdf
modbus-rtu和modbus-tcp和modbus-rtu-Over-tcp/ip
星期四, 11月 09, 2023
哪個NVR錄影方案最適合你?
https://upsangel.com/security/home-security/ip-cam-nvr-synology-surveillance-zoneminder-shinobi-frigate/
哪個NVR錄影方案最適合你?
Synology Surveillance Station:上手難度最低,兼容性強,又有APP。缺點是Synology NAS價錢貴,Surveilance Station額外授權貴。
ZoneMinder:最輕量級,依賴基本的算法,普通CPU能做到動態偵測錄影。適合基本NVR錄影功能,即使是老舊電腦,或者在Raspberry Pi等單板電腦上使用也沒問題。Proxmox等虛擬化系統也很好兼容。缺點是項目已經邁入老年期,不要指望有新功能。
Shinobi:安裝簡單。但是設置界面不友善,功能調試我的經驗有明顯缺失。
Frigate:整合了Object Detection 的AI識別功能,適合想玩AI識別、再聯動IoT、智能家居的用家。留意AI功能對CPU/GPU要求高。安裝方法較很很繁瑣。
Initial support for rockchip boards
## Rockchip RKNN-Toolkit-Lite2
This detector is only available if one of the following Rockchip SoCs is used:
- RK3566/RK3568
- RK3588/RK3588S
- RV1103/RV1106
- RK3562
ffmpeg fectch video from pipe element stream
How to convince ffmpeg that input is raw H264?
ffmpeg -f h264 -i avcfile.h264 -c copy out.mp4
somenetworkstreamer | ffmpeg -f h264 -i pipe: -c copy out.mp4
[SOLVED]-CREATE A VIDEO-STREAMING SERVER FROM A RAW H.264 FRAME STREAM-C
ffmpeg -f h264 -i pipe: -c copy -f mp4 -movflags frag_keyframe+empty_moov pipe:
cat file.mp3 | ffmpeg -f mp3 -i pipe: -c:a pcm_s16le -f s16le pipe:
https://ffmpeg.org/ffmpeg-protocols.html#pipe
This protocol accepts the following options:
blocksize
Set I/O operation maximum block size, in bytes. Default value is INT_MAX, which results in not limiting the requested block size. Setting this value reasonably low improves user termination request reaction time, which is valuable if data transmission is slow.
fd
Set file descriptor
Note that some formats (typically MOV), require the output protocol to be seekable, so they will fail with the pipe output protocol.