All Projects → fbertone → lib32100

fbertone / lib32100

Licence: MIT license
Library implementing port 32100 UDP Cloud protocol

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to lib32100

netstack
A batteries included networking crate for games.
Stars: ✭ 40 (+8.11%)
Mutual labels:  udp
laminar
A simple semi-reliable UDP protocol for multiplayer games
Stars: ✭ 717 (+1837.84%)
Mutual labels:  udp
docker-iot-dashboard
A complete IoT server for LoRaWAN IoT projects: node-red + influxdb + grafana + ssl + let's encrypt using docker-compose.
Stars: ✭ 79 (+113.51%)
Mutual labels:  iot-cloud
Arduino-STM32-Ethernet-LAN8720
Ethernet on STM32 using external PHY
Stars: ✭ 19 (-48.65%)
Mutual labels:  udp
Socket-Programming-With-C
✉️ Learn Network Protocol and Network Programming
Stars: ✭ 147 (+297.3%)
Mutual labels:  udp
okdbc
A fast, light-weight key/value store with http & memcache(TCP/UDP) interface.
Stars: ✭ 28 (-24.32%)
Mutual labels:  udp
HelenaFramework
Modern framework on C++20 for backend/frontend development.
Stars: ✭ 53 (+43.24%)
Mutual labels:  udp
iextrading4j-hist
IEX Trading library to parse TOPS and DEEP multicast packets
Stars: ✭ 20 (-45.95%)
Mutual labels:  udp
cloud4rpi
Cloud4RPi Client Library
Stars: ✭ 21 (-43.24%)
Mutual labels:  iot-cloud
Packet Sender Mobile
iOS and Android version of Packet Sender
Stars: ✭ 58 (+56.76%)
Mutual labels:  udp
eufy-security-ws
Small server wrapper around eufy-security-client library to access it via a WebSocket.
Stars: ✭ 83 (+124.32%)
Mutual labels:  cam
vscode-gcode-syntax
G Code Language Extension for Visual Studio Code. Turn VSCode into a fully capable G-Code editor, including language support & more.
Stars: ✭ 59 (+59.46%)
Mutual labels:  cam
vtun
A simple VPN written in Go.
Stars: ✭ 592 (+1500%)
Mutual labels:  udp
MonkeyCAM
CAD/CAM software for ski and snowboard design and G-code program generation.
Stars: ✭ 34 (-8.11%)
Mutual labels:  cam
okhoxi-serac
冰塔协议-传输层协议
Stars: ✭ 33 (-10.81%)
Mutual labels:  udp
sx
🖖 Fast, modern, easy-to-use network scanner
Stars: ✭ 1,267 (+3324.32%)
Mutual labels:  udp
vectorexpress-api
Vector Express is a free service and API for converting, analyzing and processing vector files.
Stars: ✭ 66 (+78.38%)
Mutual labels:  cam
ENet-CSharp
A improved fork of ENet, a tried and true networking library. C, C++, C# compatible.
Stars: ✭ 65 (+75.68%)
Mutual labels:  udp
udppunch
udppunch hole for wireguard
Stars: ✭ 123 (+232.43%)
Mutual labels:  udp
captcp
A open source program for TCP analysis of PCAP files
Stars: ✭ 110 (+197.3%)
Mutual labels:  udp

npm Standard - JavaScript Style Guide

lib32100

Library implementing port 32100 UDP Cloud protocol used by many P2P cameras. You can find a description of the protocol in the wiki

News

  • Check my new Wireshark dissector to analyze the protocol
  • Warning: since the commands directed to cams turnedo out to be vendor-specific, they will be deprecated and afterwards removed in next major release, keeping just the transport protocol in core lib and leaving higher-level payload interpretation to specific client implementation.

Install

npm install --save lib32100

Usage

Require the Library

const lib32100 = require('lib32100')

Istantiate a client

const client = lib32100.client()

Note that each client can handle one device (camera) and multiple cloud servers.

Add servers

client.addServer({host: "myserver.example.com", port: 32100})

Set the device UID

client.setUid('PROD123456ABCDE')

Add listeners

client.on('stun', (e) => console.log(JSON.stringify(e)))
client.on('lookup', (e) => console.log(JSON.stringify(e)))

Send commands to the Cloud servers

client.sendSTUNRequest()
client.lookupUid()

Add camera address

client.addCamAddress({host: "192.168.0.100", port: 10088})

Set camera credentials

client.setCamCredentials({user: 'admin', pass: 'password'})

Open direct camera session

client.openDirectCamSession({host: "192.168.0.100", port: 10088})

Check credentials

client.checkCredentials()

Get snapshot

client.getSnapshot()

Send custom GET request

client.sendGet('/custom_url.cgi?myparam=hello')

Send multiple GET requests

client.sendMultipleGet(['/custom_url1.cgi', '/custom_url2.cgi', '/custom_url3.cgi'])

Get live video stream

client.getVideoStream()

Get live audio stream

client.getAudioStream()

Stop video stream

client.stopVideoStream()

Stop audio stream

client.stopAudioStream()

Get various information

client.getParams()
client.getCameraParams()
client.getFactoryParam()
client.getStatus()
client.cameraControl()
client.getMisc()
client.login()
client.getRtsp()
client.getOnvif()
client.getRecord()
client.wifiScan()
client.getWifiScanResult()

Move in directions in steps

client.stepDown()
client.stepLeft()
client.stepRight()
client.stepUp()

Move in directions

client.moveDown()
client.moveLeft()
client.moveRight()
client.moveUp()
client.stopMove()

Close session

client.closeCamSession()

Events

You can listen on the following events:

stun (server response)
lookup (server response)
lookupACK (server response)
unknownMsg (any message not yet parsable by the library)
pingpong (camera ping or pong)
close (camera closed session)
confirmed (camera comfirmed ID i.e. session opened)
ack (camera acked a message)
http (an http response)
audio (live audio data)
video (live video data)
complete (a complete http response)
lostConnection (the connection was lost)

TODO

  • improve documentation
  • improve reliability (add various checks / validations)
  • parse camera id in response
  • automate connection (from uid lookup to selecting the address)
  • add other connection methods (relays, ...)
  • add methods to retrieve / set parameters / reboot / etc
  • parse responses
  • add more details in events
  • verify send acks and correct sequence numbers
  • add callbacks / promises
  • authenticated http requests
  • send audio to the camera
  • implement server
  • emulate camera
  • translate stream to RTP

DISCLAIMER

This implementation is not based on official specs but purely on reverse engineering of the protocol. I cannot guarantee it will work on every device.

License

MIT. Copyright (c) Fabrizio Bertone

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].