Merge branch 'DavidVentura:master' into master
This commit is contained in:
@@ -15,9 +15,6 @@ build: node_modules
|
||||
run: node_modules
|
||||
./node_modules/.bin/ts-node --esm cmd/bin http_server --port=1234
|
||||
|
||||
pair: node_modules
|
||||
./node_modules/.bin/ts-node --esm cmd/bin pair
|
||||
|
||||
hook: bundle.js venv
|
||||
./venv/bin/python3 -u loader3.py
|
||||
|
||||
|
||||
@@ -6,9 +6,35 @@ Re-implementation of the "iLnk"/"iLnkP2P"/"PPPP" protocol used on some cheap (\<
|
||||
|
||||
Per pictures of the [X5](https://github.com/DavidVentura/cam-reverse/blob/master/pics/pcb.jpg?raw=true), [A9](https://github.com/DavidVentura/cam-reverse/blob/master/pics/pcb_a9.jpg?raw=true) the main chip is TXW817 ([chinese](https://www.taixin-semi.com/Product/ProductDetail?productId=306), [eng, google translate](https://www-taixin--semi-com.translate.goog/Product/ProductDetail?productId=306&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp))
|
||||
|
||||
## Building
|
||||
|
||||
Simply run `make build` to build the binaries.
|
||||
|
||||
## Pairing a new camera
|
||||
|
||||
Ensure your device in access point mode (the blue LED blinks slowly to indicate that); optionally, press the MODE button for 5s to switch to access point mode.
|
||||
|
||||
Connect to the device's access point (e.g., FTYC811847AGFDZ) and run `node dist/bin.cjs pair --ssid <SSID> --password <PASSWORD>`.
|
||||
|
||||
```bash
|
||||
$ node dist/bin.cjs pair --help
|
||||
|
||||
configure a camera
|
||||
|
||||
Options:
|
||||
--help Show help [boolean]
|
||||
--version Show version number [boolean]
|
||||
--debug [boolean] [default: false]
|
||||
--ansi [boolean] [default: false]
|
||||
--discovery_ip [default: "192.168.1.255"]
|
||||
--attempt_to_fix_packet_loss [default: false]
|
||||
--ssid [string] [required]
|
||||
--password [string] [required]
|
||||
```
|
||||
|
||||
## Running
|
||||
To execute the HTTP server, run `node bin.cjs`; you can access the JPEG stream at http://localhost:5000/ and (optionally) a file `audio.pcm` will be created.
|
||||
|
||||
To execute the HTTP server, run `node dist/bin.cjs http_server`; you can access the JPEG stream at http://localhost:5000/ and (optionally) a file `audio.pcm` will be created.
|
||||
|
||||
```bash
|
||||
$ node dist/bin.cjs http_server --help
|
||||
@@ -36,25 +62,6 @@ The server will send a broadcast packet every few seconds to discover all the ca
|
||||
|
||||
Clicking on the image will take you to a page that has audio streaming enabled.
|
||||
|
||||
## Pairing a new camera
|
||||
|
||||
Connect to the device's access point and run `node bin.cjs pair --ssid <SSID> --password <PASSWORD>`.
|
||||
```bash
|
||||
$ node dist/bin.cjs pair --help
|
||||
|
||||
configure a camera
|
||||
|
||||
Options:
|
||||
--help Show help [boolean]
|
||||
--version Show version number [boolean]
|
||||
--debug [boolean] [default: false]
|
||||
--ansi [boolean] [default: false]
|
||||
--discovery_ip [default: "192.168.1.255"]
|
||||
--attempt_to_fix_packet_loss [default: false]
|
||||
--ssid [string] [required]
|
||||
--password [string] [required]
|
||||
```
|
||||
|
||||
## Protocol
|
||||
|
||||
The protocol is weirdly complex, though very little communication is necessary to use the device
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ export const discoverDevices = (debug: boolean, discovery_ip: string): EventEmit
|
||||
|
||||
let buf = create_LanSearch();
|
||||
setInterval(() => {
|
||||
console.log(".");
|
||||
process.stdout.write(".");
|
||||
sock.send(new Uint8Array(buf.buffer), SEND_PORT, discovery_ip);
|
||||
}, 2000);
|
||||
sock.send(new Uint8Array(buf.buffer), SEND_PORT, discovery_ip);
|
||||
|
||||
Reference in New Issue
Block a user