DavidVentura / cam-reverse

42 stars 10 forks source link

Minicamera A9 detected but not logged #17

Closed anddag closed 2 months ago

anddag commented 2 months ago

I've ha minicam A9. Running the tool I see the camera name: BATD..... but don't see the video in web browser. I believe that there is some difference in login protocol. In attachment there are the screenshot and the file captured with wireshark. The camera has IP 192.168.238.1 (AP Mode). The pc has ip 192.168.238.103 a9_debug_issue.zip

DavidVentura commented 2 months ago

The PC seems to be sending P2PRdy but never getting a P2PRdy reply. Are you able to capture traffic from the mobile app?

anddag commented 2 months ago

How can i do? What emulator can I use?

Il mar 30 apr 2024, 00:34 David Ventura @.***> ha scritto:

The PC seems to be sending P2PRdy but never getting a P2PRdy reply. Are you able to capture traffic from the mobile app?

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2083801380, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M2F2TDAVIAOVBI4N33Y73DGFAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTHAYDCMZYGA . You are receiving this because you authored the thread.Message ID: @.***>

DavidVentura commented 2 months ago

My initial research was using tcpdump on an android phone; I followed these instructions: https://wladimir-tm4pda.github.io/porting/tcpdump.html

anddag commented 2 months ago

Ok. Now i'm trying to install ysxlite on LD player (an android emulator rootable and with bridged networking). I Hope tò send you the pcap ASAP.

Il mar 30 apr 2024, 12:08 David Ventura @.***> ha scritto:

My initial research was using tcpdump on an android phone; I followed these instructions: https://wladimir-tm4pda.github.io/porting/tcpdump.html

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2084898359, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M7KR5EB52YYHOAKPT3Y75UTRAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBUHA4TQMZVHE . You are receiving this because you authored the thread.Message ID: @.***>

anddag commented 2 months ago

I've captured the network traffic using emulator (ld player ).. I've done it in two different ways: 1 -- using microsoft network monitor from windows pc (the host of ld player) 2 -- using tcpdump from android running inside ld player you can download from wetransfer https://we.tl/t-wGdZ32Sjni

the ip of android is 192.168.238.104 the ip of camera in ap mode is 192.168.238.1

I'm waiting for a your response. andrea

Il giorno mar 30 apr 2024 alle ore 12:59 andrea d'agostino @.***> ha scritto:

I've captured the network traffic using emulator (ld player ).. I've done it in two different ways: 1 -- using microsoft network monitor from windows pc (the host of ld player) 2 -- using tcpdump from android running inside ld player

the ip of android is 192.168.238.104 the ip of camera in ap mode is 192.168.238.1

I'm waiting for a your response. andrea

Il giorno mar 30 apr 2024 alle ore 12:08 David Ventura < @.***> ha scritto:

My initial research was using tcpdump on an android phone; I followed these instructions: https://wladimir-tm4pda.github.io/porting/tcpdump.html

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2084898359, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M7KR5EB52YYHOAKPT3Y75UTRAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBUHA4TQMZVHE . You are receiving this because you authored the thread.Message ID: @.***>

DavidVentura commented 2 months ago

Comparing the pcaps, the only difference that I see is that P2PAlive and LanSearch do not have the padding zeroes at the end of the messages - but that shouldn't matter for the protocol. Do you get any logs from this server when running with debug? Have you tried restarting the camera?

anddag commented 2 months ago

Starting HTTP server on port 5000 Searching for devices on 192.168.238.1 Discovery got a PunchPkt discovered BATD156362WONJM - 192.168.238.1

P2pRdy 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 00000000 f1 42 00 14 42 41 54 44 00 00 00 00 00 02 62 ca .B..BATD......b. 00000010 57 4f 4e 4a 4d 00 00 00 WONJM... P2PAlive Disconnected from BATD156362WONJM - 192.168.238.1 deleting from sessions .Discovery got a PunchPkt discovered BATD156362WONJM - 192.168.238.1 P2pRdy 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 00000000 f1 42 00 14 42 41 54 44 00 00 00 00 00 02 62 ca .B..BATD......b. 00000010 57 4f 4e 4a 4d 00 00 00 WONJM... P2PAlive Disconnected from BATD156362WONJM - 192.168.238.1 deleting from sessions .Discovery got a PunchPkt discovered BATD156362WONJM - 192.168.238.1 P2pRdy 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 00000000 f1 42 00 14 42 41 54 44 00 00 00 00 00 02 62 ca .B..BATD......b. 00000010 57 4f 4e 4a 4d 00 00 00 WONJM... P2PAlive Disconnected from BATD156362WONJM - 192.168.238.1 deleting from sessions .Discovery got a PunchPkt discovered BATD156362WONJM - 192.168.238.1 P2pRdy 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 00000000 f1 42 00 14 42 41 54 44 00 00 00 00 00 02 62 ca .B..BATD......b. 00000010 57 4f 4e 4a 4d 00 00 00 WONJM... P2PAlive Disconnected from BATD156362WONJM - 192.168.238.1 deleting from sessions .Discovery got a PunchPkt discovered BATD156362WONJM - 192.168.238.1 P2pRdy 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 00000000 f1 42 00 14 42 41 54 44 00 00 00 00 00 02 62 ca .B..BATD......b. 00000010 57 4f 4e 4a 4d 00 00 00 WONJM... P2PAlive Disconnected from BATD156362WONJM - 192.168.238.1 deleting from sessions .Discovery got a PunchPkt discovered BATD156362WONJM - 192.168.238.1 P2pRdy 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 00000000 f1 42 00 14 42 41 54 44 00 00 00 00 00 02 62 ca .B..BATD......b. 00000010 57 4f 4e 4a 4d 00 00 00 WONJM... P2PAlive Disconnected from BATD156362WONJM - 192.168.238.1 deleting from sessions

Il giorno mar 30 apr 2024 alle ore 15:48 David Ventura < @.***> ha scritto:

Comparing the pcaps, the only difference that I see is that P2PAlive and LanSearch do not have the padding zeroes at the end of the messages - but that shouldn't matter for the protocol. Do you get any logs from this server when running with debug? Have you tried restarting the camera?

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2085390520, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2MZBQB6VMFS5PVP4VR3Y76OMRAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBVGM4TANJSGA . You are receiving this because you authored the thread.Message ID: @.***>

adrcunha commented 2 months ago

What a coincidence. I got 3 more A9 cameras, from the same vendor. 2 worked fine, but 1 didn't: it behaves exactly like anddag described. The ftycampro app recognizes the camera, but doesn't connect (cycles through "connect"/"disconnected", sometimes with "timeout"). The YsxLite app doesn't recognize the AP and thus can't connect. I think it's a matter of different hardware/firmware because for this one the red LED flashes in AP mode (for the other 3, the blue LED flashes). I'll take a look at the PCB out of curiosity, and will try getting a TCP dump following the instructions above.

adrcunha commented 2 months ago

Do you get any logs from this server when running with debug?

No. Just the sequence PunchPkt/discovery/P2pRdy/P2PAlive/disconnected, like this:

Starting HTTP server on port 1234
Searching for devices on 192.168.1.255
.....Discovery got a PunchPkt
Discovered camera FTYB492321INQAX at 192.168.1.1
>> P2pRdy
           0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  0123456789ABCDEF
00000000  f1 42 00 14 46 54 59 42 00 00 00 00 00 07 83 21  .B..FTYB.......!
00000010  49 4e 51 41 58 00 00 00                          INQAX...
>> P2PAlive
Disconnected from camera FTYB492321INQAX at 192.168.1.1
Camera FTYB492321INQAX disconnected
.Discovery got a PunchPkt
Discovered camera FTYB492321INQAX at 192.168.1.1
>> P2pRdy
           0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  0123456789ABCDEF
00000000  f1 42 00 14 46 54 59 42 00 00 00 00 00 07 83 21  .B..FTYB.......!
00000010  49 4e 51 41 58 00 00 00                          INQAX...
>> P2PAlive
Disconnected from camera FTYB492321INQAX at 192.168.1.1
Camera FTYB492321INQAX disconnected
.Discovery got a PunchPkt
Discovered camera FTYB492321INQAX at 192.168.1.1
>> P2pRdy
           0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  0123456789ABCDEF
00000000  f1 42 00 14 46 54 59 42 00 00 00 00 00 07 83 21  .B..FTYB.......!
00000010  49 4e 51 41 58 00 00 00                          INQAX...
>> P2PAlive
Disconnected from camera FTYB492321INQAX at 192.168.1.1
Camera FTYB492321INQAX disconnected
.Discovery got a PunchPkt
Discovered camera FTYB492321INQAX at 192.168.1.1
>> P2pRdy
           0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  0123456789ABCDEF
00000000  f1 42 00 14 46 54 59 42 00 00 00 00 00 07 83 21  .B..FTYB.......!
00000010  49 4e 51 41 58 00 00 00                          INQAX...
>> P2PAlive
Disconnected from camera FTYB492321INQAX at 192.168.1.1
Camera FTYB492321INQAX disconnected
...

Have you tried restarting the camera?

Yes. The behavior remained the same.

adrcunha commented 2 months ago

The ftycampro app recognizes the camera, but doesn't connect The YsxLite app doesn't recognize the AP

Apparently I need to turn mobile data off also for the apps to work. So nevermind my comment, both apps work.

I think it's a matter of different hardware/firmware because for this one the red LED flashes in AP mode

Actually the red LED flashes in AP mode while charging. While not charging it stays off, the blue LED blinks slowly. But turning off the camera is a bit different: you press on/off for 5s, the release it and the camera turns off (for the other cameras I have you keep pressing it for ~5s until the camera turns off). So definitely this is a different firmware.

adrcunha commented 2 months ago

the only difference that I see is that P2PAlive and LanSearch do not have the padding zeroes at the end of the messages but that shouldn't matter for the protocol.

I wouldn't be surprised if the firmware had some hardcoded assumptions... :) Any code I could patch and try?

DavidVentura commented 2 months ago

Could you post the serial numbers as recognized by one of the official apps? maybe there's a hint there. (specifically working v non-working)

@adrcunha could you get a pair of packet captures? One from this repo with the camera that doesn't work (10 seconds is enough) and one when using an app? There's no need to start the stream, just having the camera show up in the app UI is enough

I just pushed a change which sends out a P2PAlive on connect, I noticed this from @anddag's captures; though I doubt it'll do anything. I've not tested it as I don't have the cameras on me.

adrcunha commented 2 months ago

Using YsxLite version 1.42 from Google Play. Non-working camera has ID FTYB492321INQAX, firmware version 1.2.2.53. One of the working cameras had ID FTYC844438MZKOP, firmware version 62.1.2.20.

I just tried your patch and indeed nothing changed (except the double >> P2PAlive after >> P2pRdy in the debug log).

I'll try to get the packet captures later and post them here.

anddag commented 2 months ago

With ysxlite 1.42 the camera works fine. In the .pcap I sent this morning you should see the traffic between emulator and camera (with stream video). I believe that there Is an incorrect decoding of response packets received from camera. Could you dump all the traffic received (before any other decoding action)??

DavidVentura commented 2 months ago

I think the padding zeroes from @anddag's capture are purely a capture artifact on a9-mini -- the code does not pad the packets, and capturing my own traffic I do not see it:

@anddag's: image (wireshark also only considers 4 bytes as payload)

mine:

image

Comparing with the other capture (nm-cattura) the padding zeroes are not present on the app's packets.


Comparing the captures (a9-mini, nm_cattura), the bytes sent by YsxLite and this app are identical, but the camera never responds to our P2pRdy or P2pAlive messages.

My hypothesis: the camera is stuck on something and the pattern in which we send packets doesn't let it make progress

The only meta-differences I see are:

I just pushed a --slow-startup flag that you can try, maybe it'll work on these cameras? There's no behavior difference on mine (other than the slightly delayed startup)

anddag commented 2 months ago

same result.. the file cattura.pcap of yesterday (ip 192.168.238.104) is the traffic captured in emulator running ysxlite. with this filter (ip.addr == 192.168.238.104 && udp&&!dns) and the flow is different from the other.. here are the new. pcap and debug output with the latest version: https://we.tl/t-7ayqyj93Qo

Il giorno mer 1 mag 2024 alle ore 11:59 David Ventura < @.***> ha scritto:

I think the padding zeroes from @anddag https://github.com/anddag's capture are purely a capture artifact on a9-mini -- the code does not pad the packets, and capturing my own traffic I do not see it:

@anddag https://github.com/anddag's: image.png (view on web) https://github.com/DavidVentura/cam-reverse/assets/3650670/8d147987-10bc-4481-83d8-0871f23803ff (wireshark also only considers 4 bytes as payload)

mine:

image.png (view on web) https://github.com/DavidVentura/cam-reverse/assets/3650670/b13557ca-a64f-435d-9013-ae56b7a7f59c

Comparing with the other capture (nm-cattura) the padding zeroes are not present on the app's packets.

Comparing the captures (a9-mini, nm_cattura), the bytes sent by YsxLite and this app are identical, but the camera never responds to our P2pRdy or P2pAlive messages.

My hypothesis: the camera is stuck on something and the pattern in which we send packets doesn't let it make progress

The only meta-differences I see are:

  • YsxLite sends LanSearchExt (but never gets an answer, same as my cameras), and we do not
    • I could send this packet as a "priming" packet, but I find this unlikely
  • YsxLite does not send P2pRdy on the first 3 seconds since it receives a PunchPkt
    • It may be coincidence -- it sends P2pRdy immediately upon receiving the 5th PunchPkt

I just pushed a --slow-startup flag that you can try, maybe it'll work on these cameras? There's no behavior difference on mine (other than the slightly delayed startup)

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2088236135, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M7FTWJ45PSLJCACH63ZAC4HTAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYGIZTMMJTGU . You are receiving this because you were mentioned.Message ID: @.***>

DavidVentura commented 2 months ago

I'm out of ideas - I've just increased the delay & added the LanSearchExt packet on startup, here's a CI artifact: https://github.com/DavidVentura/cam-reverse/actions/runs/8910954474/artifacts/1464057191

Can you try with this one? You will now need to do --log_level trace --slow_startup

anddag commented 2 months ago

Unfortunately, it doesn't work with this version either. Now I've connected up the minicam to the wifi at home (using ysxlite) . In my LAN there are three p2p cams: the one with the name BATC* is the only one that works correctly with your application. I'll attach the .zip with the .pcap and the output in debug mode. the ip of working camera is: 192.168.1.137 The ip of the other mini-cam (BATD) is 192.168.1.188. The link with file is https://we.tl/t-4Yzdx9hOQf

Il giorno mer 1 mag 2024 alle ore 16:59 David Ventura < @.***> ha scritto:

I'm out of ideas - I've just increased the delay & added the LanSearchExt packet on startup, here's a CI artifact: https://github.com/DavidVentura/cam-reverse/actions/runs/8910954474/artifacts/1464057191

Can you try with this one?

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2088590922, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M42WEFEEQWUBAVUY53ZAD7MJAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYGU4TAOJSGI . You are receiving this because you were mentioned.Message ID: @.***>

DavidVentura commented 2 months ago

Sadly the last capture did not capture the right traffic - there's only TCP traffic in there; the log also seems to be only capturing info traces - I was interested in the trace log level to see if any unimplemented message is getting through.

I wonder if your XHA994KMMEB camera shows up like that on YsxLite or if the serial number is padded with zeroes? like XHA000994KMMEB.

I have 3 cameras, which seem to work, so it makes debugging hard :grimacing:

2024-05-01T17:24:30.815Z [info] Mapping camera names: {"BATC609531EXLVS":"cam1"}
2024-05-01T17:24:30.819Z [info] Starting HTTP server on port 5000
2024-05-01T17:24:30.832Z [info] Searching for devices on 192.168.40.255
2024-05-01T17:24:30.843Z [info] Discovered camera BATC609531EXLVS at 192.168.40.102
2024-05-01T17:24:30.902Z [info] Logging in to camera BATC609531EXLVS
2024-05-01T17:24:30.903Z [info] Camera BATC609531EXLVS is now ready to stream
2024-05-01T17:24:30.965Z [info] Camera BATC609531EXLVS: charging, battery at 4.278V, Wifi -65 dBm
2024-05-01T17:24:48.854Z [info] Discovered camera FTYC477360FAWUK at 192.168.40.104
2024-05-01T17:24:48.912Z [info] Logging in to camera FTYC477360FAWUK
2024-05-01T17:24:48.913Z [info] Camera FTYC477360FAWUK is now ready to stream
2024-05-01T17:24:48.976Z [info] Camera FTYC477360FAWUK: charging, battery at 3.721V, Wifi -65 dBm
2024-05-01T17:25:02.853Z [info] Discovered camera BATC609580HVDCS at 192.168.40.101
2024-05-01T17:25:02.910Z [info] Logging in to camera BATC609580HVDCS
2024-05-01T17:25:02.910Z [info] Camera BATC609580HVDCS is now ready to stream
2024-05-01T17:25:02.975Z [info] Camera BATC609580HVDCS: charging, battery at 4.258V, Wifi -65 dBm
anddag commented 2 months ago

here there is the trace and tcpdump filtered only for the ip of camera BATD. https://we.tl/t-KvAYFZgawn the other camera is an oldest camera and that cannot reconfigure . ciao

Il giorno mer 1 mag 2024 alle ore 19:28 David Ventura < @.***> ha scritto:

Sadly the last capture did not capture the right traffic - there's only TCP traffic in there; the log also seems to be only capturing info traces

  • I was interested in the trace log level to see if any unimplemented message is getting through.

I wonder if your XHA994KMMEB camera shows up like that on YsxLite or if the serial number is padded with zeroes? like XHA000994KMMEB.

I have 3 cameras, which seem to work, so it makes debugging hard 😬

2024-05-01T17:24:30.815Z [info] Mapping camera names: {"BATC609531EXLVS":"cam1"} 2024-05-01T17:24:30.819Z [info] Starting HTTP server on port 5000 2024-05-01T17:24:30.832Z [info] Searching for devices on 192.168.40.255 2024-05-01T17:24:30.843Z [info] Discovered camera BATC609531EXLVS at 192.168.40.102 2024-05-01T17:24:30.902Z [info] Logging in to camera BATC609531EXLVS 2024-05-01T17:24:30.903Z [info] Camera BATC609531EXLVS is now ready to stream 2024-05-01T17:24:30.965Z [info] Camera BATC609531EXLVS: charging, battery at 4.278V, Wifi -65 dBm 2024-05-01T17:24:48.854Z [info] Discovered camera FTYC477360FAWUK at 192.168.40.104 2024-05-01T17:24:48.912Z [info] Logging in to camera FTYC477360FAWUK 2024-05-01T17:24:48.913Z [info] Camera FTYC477360FAWUK is now ready to stream 2024-05-01T17:24:48.976Z [info] Camera FTYC477360FAWUK: charging, battery at 3.721V, Wifi -65 dBm 2024-05-01T17:25:02.853Z [info] Discovered camera BATC609580HVDCS at 192.168.40.101 2024-05-01T17:25:02.910Z [info] Logging in to camera BATC609580HVDCS 2024-05-01T17:25:02.910Z [info] Camera BATC609580HVDCS is now ready to stream 2024-05-01T17:25:02.975Z [info] Camera BATC609580HVDCS: charging, battery at 4.258V, Wifi -65 dBm

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2088806922, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M2QJXF4YDSGTNJE7PLZAEQ4ZAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYHAYDMOJSGI . You are receiving this because you were mentioned.Message ID: @.***>

anddag commented 2 months ago

analyzing the cattura.pcap (worked with app inside the emulator) I see the sequence from app: f132 (4byte) f132 (4byte) f130 (4byte) f130 (4byte) f142 (24 byt) f1e0 (4byte) f1e1 (4byte) f1e1 (4byte) f1f0 (4byte) f1f0 (4byte)

Il giorno mer 1 mag 2024 alle ore 19:28 David Ventura < @.***> ha scritto:

Sadly the last capture did not capture the right traffic - there's only TCP traffic in there; the log also seems to be only capturing info traces

  • I was interested in the trace log level to see if any unimplemented message is getting through.

I wonder if your XHA994KMMEB camera shows up like that on YsxLite or if the serial number is padded with zeroes? like XHA000994KMMEB.

I have 3 cameras, which seem to work, so it makes debugging hard 😬

2024-05-01T17:24:30.815Z [info] Mapping camera names: {"BATC609531EXLVS":"cam1"} 2024-05-01T17:24:30.819Z [info] Starting HTTP server on port 5000 2024-05-01T17:24:30.832Z [info] Searching for devices on 192.168.40.255 2024-05-01T17:24:30.843Z [info] Discovered camera BATC609531EXLVS at 192.168.40.102 2024-05-01T17:24:30.902Z [info] Logging in to camera BATC609531EXLVS 2024-05-01T17:24:30.903Z [info] Camera BATC609531EXLVS is now ready to stream 2024-05-01T17:24:30.965Z [info] Camera BATC609531EXLVS: charging, battery at 4.278V, Wifi -65 dBm 2024-05-01T17:24:48.854Z [info] Discovered camera FTYC477360FAWUK at 192.168.40.104 2024-05-01T17:24:48.912Z [info] Logging in to camera FTYC477360FAWUK 2024-05-01T17:24:48.913Z [info] Camera FTYC477360FAWUK is now ready to stream 2024-05-01T17:24:48.976Z [info] Camera FTYC477360FAWUK: charging, battery at 3.721V, Wifi -65 dBm 2024-05-01T17:25:02.853Z [info] Discovered camera BATC609580HVDCS at 192.168.40.101 2024-05-01T17:25:02.910Z [info] Logging in to camera BATC609580HVDCS 2024-05-01T17:25:02.910Z [info] Camera BATC609580HVDCS is now ready to stream 2024-05-01T17:25:02.975Z [info] Camera BATC609580HVDCS: charging, battery at 4.258V, Wifi -65 dBm

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2088806922, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M2QJXF4YDSGTNJE7PLZAEQ4ZAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYHAYDMOJSGI . You are receiving this because you were mentioned.Message ID: @.***>

DavidVentura commented 2 months ago

Ha!! I finally noticed in this capture that your camera sends packets on a random port, while mine seems hardcoded to 32108. I've just pushed a change which replies based on the incoming packet's port, can you try? You probably should not use slow_startup after this change.

If this works, I'll delete slow_startup

adrcunha commented 2 months ago

I'm happy to inform that, with the latest change, the camera is now recognized:

$ node dist/bin.cjs http_server --port=1234
2024-05-01T22:06:25.703Z [info] Mapping camera names: {"FTYC811847AGFDZ":"Office camera"}
2024-05-01T22:06:25.707Z [info] Starting HTTP server on port 1234
2024-05-01T22:06:25.721Z [info] Searching for devices on 192.168.1.255
2024-05-01T22:07:07.745Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-01T22:07:07.927Z [info] Logging in to camera FTYB492321INQAX
2024-05-01T22:07:07.927Z [info] Camera FTYB492321INQAX is now ready to stream
2024-05-01T22:07:09.737Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:11.868Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:13.740Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:15.738Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:17.739Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:19.739Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:20.263Z [info] Video stream requested for camera FTYB492321INQAX
2024-05-01T22:07:21.747Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:23.740Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:25.189Z [info] Video stream closed for camera FTYB492321INQAX
2024-05-01T22:07:25.196Z [info] Video stream requested for camera FTYB492321INQAX
2024-05-01T22:07:25.741Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:27.742Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:29.743Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:31.744Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:33.745Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:35.745Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:37.745Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:39.745Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:41.746Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:43.746Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:45.746Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:47.748Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:07:49.155Z [info] Video stream closed for camera FTYB492321INQAX
2024-05-01T22:07:49.788Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring

However, something is missing for the video stream, as it never returns an image. Also, the "already discovered" message keeps popping up.

The --slow_startup flag has no effect:

$ node dist/bin.cjs http_server --port=1234 --slow_startup
2024-05-01T22:08:03.246Z [info] Mapping camera names: {"FTYC811847AGFDZ":"Office camera"}
2024-05-01T22:08:03.248Z [info] Starting HTTP server on port 1234
2024-05-01T22:08:03.263Z [info] Searching for devices on 192.168.1.255
2024-05-01T22:08:03.341Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-01T22:08:03.342Z [info] Delaying session startup
2024-05-01T22:08:05.268Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:07.268Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:09.269Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:10.020Z [info] Logging in to camera FTYB492321INQAX
2024-05-01T22:08:10.020Z [info] Camera FTYB492321INQAX is now ready to stream
2024-05-01T22:08:11.269Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:13.271Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:15.270Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:17.270Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:19.275Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:20.163Z [info] Video stream requested for camera FTYB492321INQAX
2024-05-01T22:08:21.270Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:23.271Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:25.271Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:27.272Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:29.272Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-01T22:08:31.272Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
^C
DavidVentura commented 2 months ago

Can you try rebooting the camera? I have the same with my working cameras sometimes. I'll try to repro with a capture and see if it is on this side

adrcunha commented 2 months ago

Rebooting didn't do anything. The camera disconnects, then it's discovered again, login happens but the video stream never returns an image. Note: I'm connecting to the camera's AP, let me try with my network.

adrcunha commented 2 months ago

Hmmm... The pairing script isn't working, the camera should reboot if the Wifi config is accepted, but it doesn't. I'll have to use the app. One more reason for me to find some time to get tcpdump working somehow after my failed attempt to root my Galaxy S9.

adrcunha commented 2 months ago

And the ftycampro app wasn't able to configure the camera's Wifi (even though it's the recommended app), but YsxLite was. YsxLite was able to get a video stream, but http_server doesn't log in and restarting the camera doesn't fix the issue:

$ node dist/bin.cjs http_server --port=1234
2024-05-01T22:30:01.816Z [info] Mapping camera names: {"FTYC811847AGFDZ":"Office camera"}
2024-05-01T22:30:01.819Z [info] Starting HTTP server on port 1234
2024-05-01T22:30:01.831Z [info] Searching for devices on 192.168.1.255
2024-05-01T22:30:01.917Z [info] Discovered camera FTYB492321INQAX at 192.168.1.114
2024-05-01T22:30:04.330Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:05.969Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:08.423Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:10.067Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:12.525Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:14.345Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:16.620Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:18.447Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:19.897Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring
2024-05-01T22:30:28.365Z [info] Disconnected from camera FTYB492321INQAX at 192.168.1.114
2024-05-01T22:30:28.366Z [info] Camera FTYB492321INQAX disconnected
2024-05-01T22:30:36.469Z [info] Discovered camera FTYB492321INQAX at 192.168.1.115
2024-05-01T22:30:37.920Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring
2024-05-01T22:30:40.373Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring
2024-05-01T22:30:42.018Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring
2024-05-01T22:30:44.470Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring
2024-05-01T22:30:46.110Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring
2024-05-01T22:30:48.572Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring

Of couse, YsxLite continues to work fine.

anddag commented 2 months ago

NOw the cam BATD is seen but threre is no image in webserver. Dont see the image neither of BATC (the camera that was ok with the oldest release). running in trace there is an error..

2024-05-02T05:38:01.994Z [info] Mapping camera names: {"FTYC811847AGFDZ":"Office camera"} 2024-05-02T05:38:02.009Z [info] Starting HTTP server on port 5000 2024-05-02T05:38:02.061Z [info] Searching for devices on 192.168.1.255 2024-05-02T05:38:02.065Z [trace] >> LanSearch 2024-05-02T05:38:02.067Z [trace] >> LanSearchExt 2024-05-02T05:38:02.113Z [debug] Received a PunchPkt message 2024-05-02T05:38:02.116Z [info] Discovered camera XHA994KMMEB at 192.168.1.81 2024-05-02T05:38:02.119Z [trace] >> P2pRdy (19674) 2024-05-02T05:38:02.120Z [trace] >> P2PAlive (19674) 2024-05-02T05:38:02.122Z [debug] Received a PunchPkt message 2024-05-02T05:38:02.123Z [info] Discovered camera BATC652493RFUBY at 192.168.1.137 2024-05-02T05:38:02.125Z [trace] >> P2pRdy (32108) 2024-05-02T05:38:02.125Z [trace] >> P2PAlive (32108) 2024-05-02T05:38:02.126Z [debug] Received a PunchPkt message 2024-05-02T05:38:02.127Z [info] Discovered camera BATD156362WONJM at 192.168.1.188 2024-05-02T05:38:02.128Z [trace] >> P2pRdy (54926) 2024-05-02T05:38:02.129Z [trace] >> P2PAlive (54926) 2024-05-02T05:38:02.132Z [trace] << P2PAlive 2024-05-02T05:38:02.132Z [trace] >> P2PAliveAck (32108) 2024-05-02T05:38:02.134Z [trace] << P2pRdy 2024-05-02T05:38:02.136Z [trace] >> Drw (32108) 2024-05-02T05:38:02.138Z [trace] << P2PAlive 2024-05-02T05:38:02.138Z [trace] >> P2PAliveAck (32108) 2024-05-02T05:38:02.139Z [trace] << P2PAliveAck 2024-05-02T05:38:02.139Z [debug] ^^ P2PAliveAck (f1e1) and it's not implemented yet 2024-05-02T05:38:02.140Z [trace] << P2PAlive 2024-05-02T05:38:02.141Z [trace] >> P2PAliveAck (54926) 2024-05-02T05:38:02.142Z [trace] << P2pRdy 2024-05-02T05:38:02.143Z [trace] >> Drw (54926) 2024-05-02T05:38:02.144Z [trace] << P2PAliveAck 2024-05-02T05:38:02.145Z [debug] ^^ P2PAliveAck (f1e1) and it's not implemented yet 2024-05-02T05:38:02.147Z [trace] << DrwAck 2024-05-02T05:38:02.148Z [trace] << P2PAlive 2024-05-02T05:38:02.149Z [trace] >> P2PAliveAck (54926) 2024-05-02T05:38:02.167Z [trace] << DrwAck 2024-05-02T05:38:02.178Z [trace] << Drw 2024-05-02T05:38:02.179Z [trace] >> DrwAck (32108) 2024-05-02T05:38:02.181Z [info] Logging in to camera BATC652493RFUBY 2024-05-02T05:38:02.182Z [trace] >> Drw (32108) 2024-05-02T05:38:02.183Z [trace] >> Drw (32108) 2024-05-02T05:38:02.183Z [trace] >> Drw (32108) 2024-05-02T05:38:02.184Z [info] Camera BATC652493RFUBY is now ready to stream 2024-05-02T05:38:02.196Z [trace] << DrwAck 2024-05-02T05:38:02.220Z [trace] << Drw 2024-05-02T05:38:02.220Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.221Z [info] Logging in to camera BATD156362WONJM 2024-05-02T05:38:02.222Z [trace] >> Drw (54926) 2024-05-02T05:38:02.222Z [trace] >> Drw (54926) 2024-05-02T05:38:02.223Z [trace] >> Drw (54926) 2024-05-02T05:38:02.223Z [info] Camera BATD156362WONJM is now ready to stream 2024-05-02T05:38:02.239Z [trace] << DrwAck 2024-05-02T05:38:02.245Z [trace] << Drw 2024-05-02T05:38:02.245Z [trace] >> DrwAck (32108) 2024-05-02T05:38:02.247Z [info] Camera BATC652493RFUBY: charging, battery at 3.969V, Wifi -65 dBm 2024-05-02T05:38:02.296Z [trace] << Drw 2024-05-02T05:38:02.297Z [trace] >> DrwAck (32108) 2024-05-02T05:38:02.348Z [trace] << Drw 2024-05-02T05:38:02.348Z [trace] >> DrwAck (32108) 2024-05-02T05:38:02.394Z [trace] << Drw 2024-05-02T05:38:02.394Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.395Z [info] Camera BATD156362WONJM: not charging, battery at 8V, Wifi -256 dBm 2024-05-02T05:38:02.451Z [trace] << P2PAlive 2024-05-02T05:38:02.451Z [trace] >> P2PAliveAck (54926) 2024-05-02T05:38:02.466Z [trace] << Drw 2024-05-02T05:38:02.467Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.510Z [trace] << Drw 2024-05-02T05:38:02.510Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.512Z [trace] << Drw 2024-05-02T05:38:02.512Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.519Z [trace] >> P2PAlive (19674) 2024-05-02T05:38:02.520Z [info] Disconnected from camera XHA994KMMEB at 192.168.1.81 2024-05-02T05:38:02.521Z [info] Camera XHA994KMMEB disconnected 2024-05-02T05:38:02.523Z [trace] << Drw 2024-05-02T05:38:02.523Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.525Z [trace] << Drw 2024-05-02T05:38:02.526Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.527Z [trace] << Drw 2024-05-02T05:38:02.527Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.534Z [trace] << Drw 2024-05-02T05:38:02.534Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.535Z [trace] << Drw 2024-05-02T05:38:02.535Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.537Z [trace] << Drw 2024-05-02T05:38:02.538Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.543Z [trace] << Drw 2024-05-02T05:38:02.544Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.555Z [trace] << P2PAlive 2024-05-02T05:38:02.555Z [trace] >> P2PAliveAck (32108) 2024-05-02T05:38:02.560Z [trace] << Drw 2024-05-02T05:38:02.560Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.561Z [trace] << Drw 2024-05-02T05:38:02.562Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.562Z [trace] << Drw 2024-05-02T05:38:02.563Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.563Z [trace] << Drw 2024-05-02T05:38:02.564Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.567Z [trace] << Drw 2024-05-02T05:38:02.567Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.568Z [trace] << Drw 2024-05-02T05:38:02.569Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.582Z [trace] << Drw 2024-05-02T05:38:02.583Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.585Z [trace] << Drw 2024-05-02T05:38:02.586Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.588Z [trace] << Drw 2024-05-02T05:38:02.589Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.591Z [trace] << Drw 2024-05-02T05:38:02.592Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.661Z [trace] << Drw 2024-05-02T05:38:02.662Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.665Z [trace] << Drw 2024-05-02T05:38:02.666Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.666Z [trace] << Drw 2024-05-02T05:38:02.667Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.668Z [trace] << Drw 2024-05-02T05:38:02.669Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.674Z [trace] << Drw 2024-05-02T05:38:02.674Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.678Z [trace] << Drw 2024-05-02T05:38:02.678Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.681Z [trace] << Drw 2024-05-02T05:38:02.681Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.694Z [trace] << Drw 2024-05-02T05:38:02.694Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.696Z [trace] << Drw 2024-05-02T05:38:02.697Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.698Z [trace] << Drw 2024-05-02T05:38:02.699Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.705Z [trace] << Drw 2024-05-02T05:38:02.706Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.708Z [trace] << Drw 2024-05-02T05:38:02.709Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.711Z [trace] << Drw 2024-05-02T05:38:02.711Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.713Z [trace] << Drw 2024-05-02T05:38:02.713Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.725Z [trace] << Drw 2024-05-02T05:38:02.725Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.727Z [trace] << Drw 2024-05-02T05:38:02.728Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.731Z [trace] << Drw 2024-05-02T05:38:02.731Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.732Z [trace] << Drw 2024-05-02T05:38:02.733Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.754Z [trace] << P2PAlive 2024-05-02T05:38:02.755Z [trace] >> P2PAliveAck (54926) 2024-05-02T05:38:02.822Z [trace] << Drw 2024-05-02T05:38:02.822Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.837Z [trace] << Drw 2024-05-02T05:38:02.839Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.842Z [trace] << Drw 2024-05-02T05:38:02.844Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.846Z [trace] << Drw 2024-05-02T05:38:02.848Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.855Z [trace] << Drw 2024-05-02T05:38:02.856Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.858Z [trace] << Drw 2024-05-02T05:38:02.860Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.864Z [trace] << Drw 2024-05-02T05:38:02.865Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.872Z [trace] << Drw 2024-05-02T05:38:02.873Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.885Z [trace] << Drw 2024-05-02T05:38:02.886Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.891Z [trace] << Drw 2024-05-02T05:38:02.891Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.893Z [trace] << Drw 2024-05-02T05:38:02.894Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.895Z [trace] << Drw 2024-05-02T05:38:02.895Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.898Z [trace] << Drw 2024-05-02T05:38:02.898Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.900Z [trace] << Drw 2024-05-02T05:38:02.901Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.903Z [trace] << Drw 2024-05-02T05:38:02.904Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.905Z [trace] << Drw 2024-05-02T05:38:02.906Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.908Z [trace] << Drw 2024-05-02T05:38:02.908Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.911Z [trace] << Drw 2024-05-02T05:38:02.911Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.961Z [trace] << P2PAlive 2024-05-02T05:38:02.962Z [trace] >> P2PAliveAck (32108) 2024-05-02T05:38:02.984Z [trace] << Drw 2024-05-02T05:38:02.984Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.986Z [trace] << Drw 2024-05-02T05:38:02.987Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.990Z [trace] << Drw 2024-05-02T05:38:02.991Z [trace] >> DrwAck (54926) 2024-05-02T05:38:02.994Z [trace] << Drw 2024-05-02T05:38:02.994Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.005Z [trace] << Drw 2024-05-02T05:38:03.006Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.009Z [trace] << Drw 2024-05-02T05:38:03.010Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.010Z [trace] << Drw 2024-05-02T05:38:03.011Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.013Z [trace] << Drw 2024-05-02T05:38:03.014Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.037Z [trace] << Drw 2024-05-02T05:38:03.037Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.087Z [trace] << Drw 2024-05-02T05:38:03.087Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.088Z [trace] << Drw 2024-05-02T05:38:03.089Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.090Z [trace] << Drw 2024-05-02T05:38:03.090Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.091Z [trace] << Drw 2024-05-02T05:38:03.092Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.094Z [trace] << Drw 2024-05-02T05:38:03.095Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.101Z [trace] << Drw 2024-05-02T05:38:03.101Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.102Z [trace] << Drw 2024-05-02T05:38:03.103Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.104Z [trace] << Drw 2024-05-02T05:38:03.104Z [trace] >> DrwAck (54926) 2024-05-02T05:38:03.105Z [trace] << P2PAlive 2024-05-02T05:38:03.106Z [trace] >> P2PAliveAck (54926) 2024-05-02T05:38:03.107Z [trace] << Drw 2024-05-02T05:38:03.107Z [trace] >> DrwAck (54926) /root/a9ter/cam-reverse-master/dist/bin.cjs:17270 ret.setUint8(i, this.getUint8(i)); ^

RangeError: Offset is outside the bounds of the DataView at DataView.prototype.getUint8 () at DataView.readByteArray (/root/a9ter/cam-reverse-master/dist/bin.cjs:17270:26) at deal_with_data (/root/a9ter/cam-reverse-master/dist/bin.cjs:17697:27) at Object.handle_Drw [as Drw] (/root/a9ter/cam-reverse-master/dist/bin.cjs:17791:5) at handleIncoming (/root/a9ter/cam-reverse-master/dist/bin.cjs:17804:16) at Socket. (/root/a9ter/cam-reverse-master/dist/bin.cjs:17814:38) at Socket.emit (node:events:520:28) at UDP.onMessage [as onmessage] (node:dgram:943:8)

Node.js v22.0.0

Il giorno gio 2 mag 2024 alle ore 00:31 Adriano Cunha < @.***> ha scritto:

And the ftycampro app wasn't able to configure the camera's Wifi (even though it's the recommended app), but YsxLite was. YsxLite was able to get a video stream, but http_server doesn't log in and restarting the camera doesn't fix the issue:

$ node dist/bin.cjs http_server --port=1234 2024-05-01T22:30:01.816Z [info] Mapping camera names: {"FTYC811847AGFDZ":"Office camera"} 2024-05-01T22:30:01.819Z [info] Starting HTTP server on port 1234 2024-05-01T22:30:01.831Z [info] Searching for devices on 192.168.1.255 2024-05-01T22:30:01.917Z [info] Discovered camera FTYB492321INQAX at 192.168.1.114 2024-05-01T22:30:04.330Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:05.969Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:08.423Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:10.067Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:12.525Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:14.345Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:16.620Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:18.447Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:19.897Z [info] Camera FTYB492321INQAX at 192.168.1.114 already discovered, ignoring 2024-05-01T22:30:28.365Z [info] Disconnected from camera FTYB492321INQAX at 192.168.1.114 2024-05-01T22:30:28.366Z [info] Camera FTYB492321INQAX disconnected 2024-05-01T22:30:36.469Z [info] Discovered camera FTYB492321INQAX at 192.168.1.115 2024-05-01T22:30:37.920Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring 2024-05-01T22:30:40.373Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring 2024-05-01T22:30:42.018Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring 2024-05-01T22:30:44.470Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring 2024-05-01T22:30:46.110Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring 2024-05-01T22:30:48.572Z [info] Camera FTYB492321INQAX at 192.168.1.115 already discovered, ignoring

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2089238545, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M2DTU726SY2AWRS6WTZAFUNTAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBZGIZTQNJUGU . You are receiving this because you were mentioned.Message ID: @.***>

adrcunha commented 2 months ago

Thanks for noticing the crash, Andrea. I haven't. :) https://github.com/DavidVentura/cam-reverse/pull/21 fixes that. Unfortunately nothing changed for the new camera, still no image. :(

adrcunha commented 2 months ago

I'm not sure if this information is useful without a network dump, but... I just noticed a bunch of Expected start_type to be 0xa11, got 0x10a with the new camera. I haven't seen those before.

2024-05-02T06:35:41.370Z [info] Camera FTYB492321INQAX disconnected
2024-05-02T06:35:42.630Z [info] Discovered camera FTYB492321INQAX at 192.168.1.122
2024-05-02T06:35:45.088Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:35:45.465Z [error] Expected start_type to be 0xa11, got 0x10a
2024-05-02T06:35:46.727Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:35:49.183Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:35:50.567Z [error] Expected start_type to be 0xa11, got 0x10a
2024-05-02T06:35:50.971Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:35:53.427Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:35:54.919Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:35:55.676Z [error] Expected start_type to be 0xa11, got 0x10a
2024-05-02T06:35:57.376Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:35:59.012Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:00.652Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:00.771Z [error] Expected start_type to be 0xa11, got 0x10a
2024-05-02T06:36:01.745Z [info] Video stream requested for camera FTYB492321INQAX
2024-05-02T06:36:03.107Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:04.748Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:05.901Z [error] Expected start_type to be 0xa11, got 0x10a
2024-05-02T06:36:07.206Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:07.454Z [info] Video stream closed for camera FTYB492321INQAX
2024-05-02T06:36:08.840Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:11.044Z [error] Expected start_type to be 0xa11, got 0x10a
2024-05-02T06:36:11.300Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:12.938Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:14.578Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:16.162Z [error] Expected start_type to be 0xa11, got 0x10a
2024-05-02T06:36:17.036Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:18.671Z [info] Camera FTYB492321INQAX at 192.168.1.122 already discovered, ignoring
2024-05-02T06:36:21.281Z [error] Expected start_type to be 0xa11, got 0x10a
DavidVentura commented 2 months ago

This may hint that the camera is sending slightly different messages, and this code can't really handle them. Are you able to run YsxLite in an emulator? (LDPlayer / Anbox) then you could capture traffic from your computer.

DavidVentura commented 2 months ago

Looking at YsxLite internals, at least it confirms 0x10a is not a valid IO command:

image

This will abort the connection with a non-0xa11 start code. though, without a capture, it's hard to know if there's another difference. Could you get a capture on the http_server? It won't help to figure out what the right answer to this packet should be, but it could show if there are other things going wrong

adrcunha commented 2 months ago

Here's the capture of http_server and the logs so you can correlate packets and actions. As usual, opening the main page doesn't cause the video stream to show. http_server is running on 192.168.1.2, only the "bad" camera is connected. I can't run LDPlayer/Anbox on Mac, so once I can get the Android emulator working with tcpdump I should be able to send you those captures as well.

pcap file: https://we.tl/t-suhvnECkpV

$ node dist/bin.cjs http_server --port=1234 --log_level=info
2024-05-02T15:58:33.466Z [info] Mapping camera names: {"FTYC811847AGFDZ":"Office camera"}
2024-05-02T15:58:33.469Z [info] Starting HTTP server on port 1234
2024-05-02T15:58:33.489Z [info] Searching for devices on 192.168.1.255
2024-05-02T15:58:34.305Z [info] Discovered camera FTYB492321INQAX at 192.168.1.134
2024-05-02T15:58:35.944Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:36.354Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:58:37.513Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:39.937Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:41.393Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:58:41.606Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:44.033Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:45.678Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:46.466Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:58:46.521Z [info] Video stream requested for camera FTYB492321INQAX
2024-05-02T15:58:48.129Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:49.768Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:51.629Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:58:52.325Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:53.866Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:55.507Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:56.726Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:58:57.790Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:58:59.599Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:01.857Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:02.058Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:03.516Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:06.938Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:07.890Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:10.247Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:11.986Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:12.077Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:13.528Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:16.082Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:17.314Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:17.471Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:17.516Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:18.068Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:20.081Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:21.716Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:22.298Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:24.175Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:25.913Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:27.394Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:27.963Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:29.913Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:31.550Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
2024-05-02T15:59:32.526Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50
2024-05-02T15:59:34.006Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring
DavidVentura commented 2 months ago

Huh, this camera speaks a fairly different protocol! My camera, sends audio streams by prefacing the payloads with 0x55aa15a8, and anything without that preface is a JPEG stream. This capture is sending the JPEG data prefaced with 0x55aa15a8, which is very similar to this random PDF I found a while ago (page 14, _STREAMHEAD): https://github.com/DavidVentura/cam-reverse/blob/master/data/cgi_ip_cam.pdf

I've updated the wireshark dissector to include the _STREAMHEAD fields and they seem to make sense.

Could you link the camera you bought? I'll get one and see if I get the same firmware. Other than that, I'll try to implement this protocol based on the captures, but it may require you to test a lot :grin:

anddag commented 2 months ago

This is my debug.txt + .pcap https://we.tl/t-c7p33u639b in the browser no image is shown. In the pcap there is the video traffic encrypted.

The ip of camera i 192.168.1.188

Il giorno gio 2 mag 2024 alle ore 18:09 Adriano Cunha < @.***> ha scritto:

Here's the capture of http_server and the logs so you can correlate packets and actions. As usual, opening the main page doesn't cause the video stream to show. http_server is running on 192.168.1.2, only the "bad" camera is connected.

pcap file: https://we.tl/t-suhvnECkpV

$ node dist/bin.cjs http_server --port=1234 --log_level=info 2024-05-02T15:58:33.466Z [info] Mapping camera names: {"FTYC811847AGFDZ":"Office camera"} 2024-05-02T15:58:33.469Z [info] Starting HTTP server on port 1234 2024-05-02T15:58:33.489Z [info] Searching for devices on 192.168.1.255 2024-05-02T15:58:34.305Z [info] Discovered camera FTYB492321INQAX at 192.168.1.134 2024-05-02T15:58:35.944Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:36.354Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:58:37.513Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:39.937Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:41.393Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:58:41.606Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:44.033Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:45.678Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:46.466Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:58:46.521Z [info] Video stream requested for camera FTYB492321INQAX 2024-05-02T15:58:48.129Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:49.768Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:51.629Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:58:52.325Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:53.866Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:55.507Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:56.726Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:58:57.790Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:58:59.599Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:01.857Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:02.058Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:03.516Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:06.938Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:07.890Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:10.247Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:11.986Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:12.077Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:13.528Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:16.082Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:17.314Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:17.471Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:17.516Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:18.068Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:20.081Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:21.716Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:22.298Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:24.175Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:25.913Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:27.394Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:27.963Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:29.913Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:31.550Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring 2024-05-02T15:59:32.526Z [info] Expected start_type to be 0xa11, got 0x10a and cmd_id=0xff50 2024-05-02T15:59:34.006Z [info] Camera FTYB492321INQAX at 192.168.1.134 already discovered, ignoring

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2090906228, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M25DMT2DJZGV3XNP5DZAJQM3AVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJQHEYDMMRSHA . You are receiving this because you were mentioned.Message ID: @.***>

DavidVentura commented 2 months ago

@anddag I see the same protocol as with @adrcunha's capture, so the same solution should work for both

anddag commented 2 months ago

The link is https://a.aliexpress.com/_EyLs7UL

The version firmware Is: 2.2.14.178

DavidVentura commented 2 months ago

My camera looks exactly the same and that link is 'no longer for sale', so it's a bit of a gamble to buy from another seller and try and get the same firmware :disappointed: However! I just pushed a change which may work for you, could you give it a shot with --debug?

adrcunha commented 2 months ago

It works!!! 😄

image
adrcunha commented 2 months ago

The server logs with debug enabled:

$ node dist/bin.cjs http_server --port=1234 --log_level=debug
2024-05-02T21:35:12.036Z [error] Node version 14 is not supported, may malfunction
2024-05-02T21:35:12.037Z [info] Mapping camera names: {}
2024-05-02T21:35:12.039Z [info] Starting HTTP server on port 1234
2024-05-02T21:35:12.054Z [info] Searching for devices on 192.168.1.255
2024-05-02T21:35:12.505Z [debug] Received a PunchPkt message
2024-05-02T21:35:12.505Z [info] Discovered camera FTYB492321INQAX at 192.168.1.137
2024-05-02T21:35:12.716Z [info] Logging in to camera FTYB492321INQAX
2024-05-02T21:35:12.717Z [info] Camera FTYB492321INQAX is now ready to stream
2024-05-02T21:35:12.949Z [info] Camera FTYB492321INQAX: not charging, battery at 3.848V, Wifi -65 dBm
2024-05-02T21:35:13.210Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:13.365Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:13.516Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:13.663Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:13.817Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:13.972Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:14.080Z [debug] Received a PunchPkt message
2024-05-02T21:35:14.080Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:14.138Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:14.285Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:14.442Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:14.596Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:14.745Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:14.902Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:15.052Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:15.211Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:15.371Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:15.515Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:15.665Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:15.822Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:15.996Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:16.125Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:16.285Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:16.441Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:16.538Z [debug] Received a PunchPkt message
2024-05-02T21:35:16.538Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:16.592Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:16.746Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:16.904Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:17.052Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:17.209Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:17.367Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:17.515Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:17.669Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:17.825Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:17.977Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:18.135Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:18.178Z [debug] Received a PunchPkt message
2024-05-02T21:35:18.178Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:18.282Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:18.444Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:18.596Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:18.744Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:18.901Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:19.054Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:19.211Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:19.359Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:19.515Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:19.674Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:19.820Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:20.036Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:20.142Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:20.288Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:20.435Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:20.595Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:20.636Z [debug] Received a PunchPkt message
2024-05-02T21:35:20.636Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:20.743Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:20.901Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:21.056Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:21.205Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:21.362Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:21.519Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:21.667Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:21.824Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:21.985Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:22.129Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:22.293Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:22.303Z [debug] Received a PunchPkt message
2024-05-02T21:35:22.303Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:22.443Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:22.590Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:22.748Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:22.905Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:23.053Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:23.209Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:23.371Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:23.515Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:23.696Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:23.839Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:23.976Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:24.105Z [info] Video stream requested for camera FTYB492321INQAX
2024-05-02T21:35:24.134Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:24.292Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:24.450Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:24.595Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:24.729Z [debug] Received a PunchPkt message
2024-05-02T21:35:24.729Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:24.751Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:24.899Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:25.060Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:25.217Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:25.361Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:25.531Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:25.679Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:25.829Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:25.984Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:26.131Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:26.288Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:26.369Z [debug] Received a PunchPkt message
2024-05-02T21:35:26.369Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:26.444Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:26.591Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:26.755Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:26.907Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:27.054Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:27.212Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:27.369Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:27.517Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:27.673Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:27.831Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:27.979Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:28.138Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:28.292Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:28.448Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:28.597Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:28.752Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:28.824Z [debug] Received a PunchPkt message
2024-05-02T21:35:28.824Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:28.900Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:29.058Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:29.219Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:29.372Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:29.518Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:29.673Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:29.832Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:29.995Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:30.135Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:30.290Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:30.466Z [debug] Received a PunchPkt message
2024-05-02T21:35:30.467Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:30.599Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:30.764Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:30.935Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:31.089Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:31.258Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:31.424Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:31.594Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:31.747Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:31.912Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:32.101Z [debug] Received a PunchPkt message
2024-05-02T21:35:32.101Z [info] Camera FTYB492321INQAX at 192.168.1.137 already discovered, ignoring
2024-05-02T21:35:32.249Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:32.415Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:32.578Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:32.741Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:32.981Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:33.066Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:33.231Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:33.401Z [debug] Reading 992 bytes - should be 992?
2024-05-02T21:35:33.572Z [debug] Reading 992 bytes - should be 992?
adrcunha commented 2 months ago

My camera looks exactly the same and that link is 'no longer for sale', so it's a bit of a gamble to buy from another seller and try and get the same firmware

Indeed. I bought my 3 cameras from the same vendor on AliExpress in one transaction, and got 2 that worked out-of-the-box with cam-reverse, and this one that didn't. They all look the same and come exactly in the same box and have the exact same manual, but the PCB is different (the green PCB is the one that worked, the black PCB is the one that didn't):

image

adrcunha commented 2 months ago

Anyway, I still need to get a packet dump for the login/Wifi/discovery part, because this part isn't working flawlessly yet:

$ node dist/bin.cjs pair --ssid ...
2024-05-02T21:49:16.997Z [info] Will configure any devices found to join XXXXX
2024-05-02T21:49:17.007Z [info] Searching for devices on 192.168.1.255
2024-05-02T21:49:19.012Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-02T21:49:21.012Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:23.013Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:25.012Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:27.014Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:29.014Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:31.014Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:33.016Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:35.037Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:37.017Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:49:39.017Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
...

and

2024-05-02T21:41:16.245Z [info] Camera FTYB492321INQAX disconnected
2024-05-02T21:42:09.060Z [info] Discovered camera FTYB492321INQAX at 192.168.1.139
2024-05-02T21:42:11.051Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:14.329Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:16.793Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:17.470Z [info] Disconnected from camera FTYB492321INQAX at 192.168.1.139
2024-05-02T21:42:17.470Z [info] Camera FTYB492321INQAX disconnected
2024-05-02T21:42:18.429Z [info] Discovered camera FTYB492321INQAX at 192.168.1.139
2024-05-02T21:42:20.881Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:22.319Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:26.619Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:26.838Z [info] Disconnected from camera FTYB492321INQAX at 192.168.1.139
2024-05-02T21:42:26.838Z [info] Camera FTYB492321INQAX disconnected
2024-05-02T21:42:29.070Z [info] Discovered camera FTYB492321INQAX at 192.168.1.139
2024-05-02T21:42:29.313Z [info] Logging in to camera FTYB492321INQAX
2024-05-02T21:42:29.314Z [info] Camera FTYB492321INQAX is now ready to stream
2024-05-02T21:42:29.541Z [info] Camera FTYB492321INQAX: not charging, battery at 3.845V, Wifi -65 dBm
2024-05-02T21:42:30.331Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:34.396Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:36.340Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:38.906Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:40.318Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:42.344Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:44.635Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:48.528Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring
2024-05-02T21:42:50.372Z [info] Camera FTYB492321INQAX at 192.168.1.139 already discovered, ignoring

There are too many "already discovered" messages for this camera, and usually the login takes a while or requires me to power cycle the camera.

And, finally:

$ node dist/bin.cjs pair --ssid ...
2024-05-02T21:53:41.435Z [info] Will configure any devices found to join XXXXX
2024-05-02T21:53:41.472Z [info] Searching for devices on 192.168.1.255
2024-05-02T21:53:41.619Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-02T21:53:43.475Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:53:45.476Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:53:47.478Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:53:49.478Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:53:51.480Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:53:53.491Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:53:55.481Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:53:57.483Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:53:59.483Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:01.484Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:03.487Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:11.668Z [info] Disconnected from camera FTYB492321INQAX at 192.168.1.1
2024-05-02T21:54:11.668Z [info] Camera FTYB492321INQAX disconnected
2024-05-02T21:54:11.668Z [info] Press CONTROL+C if you're done setting up your cameras
2024-05-02T21:54:17.492Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-02T21:54:17.788Z [info] Logging in to camera FTYB492321INQAX
2024-05-02T21:54:17.788Z [info] WiFi config for camera FTYB492321INQAX is done
2024-05-02T21:54:21.492Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:23.494Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:25.493Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:27.495Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:29.495Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:31.501Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:33.502Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:35.498Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:37.500Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T21:54:39.503Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring

The Wifi setup actually doesn't work, because the camera doesn't reboot and anyway it's still in AP mode even if I power cycle it.

DavidVentura commented 2 months ago

The "Camera ... already discovered" spam is "normal" - the server broadcasts a discovery packet every few seconds, and the camera answers, so we ignore it.

On the flakiness - there's definitely some potential for problems, as the whole protocol is UDP and I'm not currently checking which commands got acknowledged; when we see a camera for the first time, we send all the setup packets (log in, turn video on, etc) once, even though they may have been lost.

I see similar behavior on my cameras, but not often; the best way to trigger this issue for me is to start and stop the server many times, I think the camera exhaust some resources and no longer replies. A reboot usually fixes it for me.

adrcunha commented 2 months ago

Well, my "bad" camera has way more "already discovered" messages than my "good" camera, and it's also more finicky about login (and thus requires rebooting it more often to fix things), so I think there's still some differences in the protocol. And, of course, there's the Wifi setup not working. Hopefully you'll be able to figure it all out once I get the packet dumps.

DavidVentura commented 2 months ago

I've just pushed a commit sending a reboot command after pairing, though for my cameras is not necessary. I just ran through the pair flow 3 times and all three times I got a successful pair, though the events were

connect
send login packet
[timeout]
disconnect
connect
successful pair

All 3 times, the login packet was sent, but the camera didn't acknowledge it, and after ~8s we forcefully disconnect.

This is what I was alluding to before -- by not keeping track of which packets have gotten acknowledged, we can't resend, so if anything goes wrong, we need to force-reconnect. This is exacerbated by the fact that the camera sometimes continues to respond only to P2PAlive (heartbeats).. and as we see traffic, we never disconnect.

I'll think about how we can track pending ACKs and try to retransmit those packets

adrcunha commented 2 months ago

Indeed, I don't think the forced reboot is necessary, because it automatically happens with the "good" camera (and the "bad" camera with the app, but then we don't know yet if the app is the one asking for the reboot). Again, I think something is missing because even the latest code doesn't fix the Wifi setup with the "bad" camera, and it doesn't reboot also:

$ node dist/bin.cjs pair --ssid ...
2024-05-02T23:10:16.880Z [info] Will configure any devices found to join XXXX
2024-05-02T23:10:16.896Z [info] Searching for devices on 192.168.1.255
2024-05-02T23:10:47.016Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-02T23:10:48.943Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:10:50.917Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:10:52.909Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:10:54.911Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:10:56.913Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:10:58.913Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:00.913Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:03.008Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:04.914Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:06.986Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:09.012Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:10.918Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:12.919Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:14.917Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:16.917Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:18.918Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:20.921Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:22.917Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
[power off and on the camera]
2024-05-02T23:11:32.306Z [info] Disconnected from camera FTYB492321INQAX at 192.168.1.1
2024-05-02T23:11:32.307Z [info] Camera FTYB492321INQAX disconnected
2024-05-02T23:11:32.307Z [info] Press CONTROL+C if you're done setting up your cameras
2024-05-02T23:11:36.920Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-02T23:11:37.100Z [info] Logging in to camera FTYB492321INQAX
2024-05-02T23:11:37.100Z [info] WiFi config for camera FTYB492321INQAX is done, asking to reboot
2024-05-02T23:11:40.922Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:42.924Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:44.925Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:46.926Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:48.927Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:50.929Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:52.929Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:54.928Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:56.928Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:11:58.929Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:12:00.929Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-02T23:12:02.930Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
adrcunha commented 2 months ago

I got lucky and was able to capture what should have been a successful wifi setup interaction. Of course, it didn't happen and the camera didn't reboot. I hope the logs are useful.

tcpdump output: https://we.tl/t-ZkfoY2WwJs

$ node dist/bin.cjs pair --ssid ...
2024-05-03T00:11:16.159Z [info] Will configure any devices found to join XXXX
2024-05-03T00:11:16.169Z [info] Searching for devices on 192.168.1.255
2024-05-03T00:11:16.169Z [trace] >> LanSearch
2024-05-03T00:11:16.170Z [trace] >> LanSearchExt
2024-05-03T00:11:16.292Z [debug] Received a PunchPkt message
2024-05-03T00:11:16.292Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-03T00:11:16.293Z [trace] >> P2pRdy (62510)
2024-05-03T00:11:16.295Z [trace] << P2PAlive
2024-05-03T00:11:16.295Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:16.296Z [trace] << P2pRdy
2024-05-03T00:11:16.296Z [trace] >> Drw (62510)
2024-05-03T00:11:16.304Z [trace] << DrwAck
2024-05-03T00:11:16.305Z [trace] << P2PAlive
2024-05-03T00:11:16.305Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:16.469Z [trace] << Drw
2024-05-03T00:11:16.469Z [trace] >> DrwAck (62510)
2024-05-03T00:11:16.470Z [info] Logging in to camera FTYB492321INQAX
2024-05-03T00:11:16.471Z [trace] >> Drw (62510)
2024-05-03T00:11:16.471Z [info] WiFi config for camera FTYB492321INQAX is done, asking to reboot
2024-05-03T00:11:16.471Z [trace] >> Drw (62510)
2024-05-03T00:11:16.656Z [trace] << P2PAlive
2024-05-03T00:11:16.657Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:16.957Z [trace] << P2PAlive
2024-05-03T00:11:16.957Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:17.318Z [trace] << P2PAlive
2024-05-03T00:11:17.318Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:17.697Z [trace] << P2PAlive
2024-05-03T00:11:17.697Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:17.968Z [trace] << P2PAlive
2024-05-03T00:11:17.968Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:18.170Z [trace] >> LanSearch
2024-05-03T00:11:18.170Z [trace] >> LanSearchExt
2024-05-03T00:11:18.299Z [trace] << P2PAlive
2024-05-03T00:11:18.299Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:18.478Z [debug] Received a PunchPkt message
2024-05-03T00:11:18.478Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T00:11:18.626Z [trace] << P2PAlive
2024-05-03T00:11:18.626Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:18.858Z [trace] << P2PAlive
2024-05-03T00:11:18.858Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:19.157Z [trace] << P2PAlive
2024-05-03T00:11:19.158Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:19.515Z [trace] << P2PAlive
2024-05-03T00:11:19.515Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:19.859Z [trace] << P2PAlive
2024-05-03T00:11:19.860Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:20.171Z [trace] >> LanSearch
2024-05-03T00:11:20.171Z [trace] >> LanSearchExt
2024-05-03T00:11:20.174Z [debug] Received a PunchPkt message
2024-05-03T00:11:20.174Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T00:11:20.182Z [trace] << P2PAlive
2024-05-03T00:11:20.183Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:20.533Z [trace] << P2PAlive
2024-05-03T00:11:20.533Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:20.866Z [trace] << P2PAlive
2024-05-03T00:11:20.867Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:21.078Z [trace] << P2PAlive
2024-05-03T00:11:21.078Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:21.491Z [trace] << P2PAlive
2024-05-03T00:11:21.492Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:21.678Z [trace] << P2PAlive
2024-05-03T00:11:21.678Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:22.039Z [trace] << P2PAlive
2024-05-03T00:11:22.040Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:22.172Z [trace] >> LanSearch
2024-05-03T00:11:22.172Z [trace] >> LanSearchExt
2024-05-03T00:11:22.222Z [debug] Received a PunchPkt message
2024-05-03T00:11:22.223Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T00:11:22.404Z [trace] << P2PAlive
2024-05-03T00:11:22.404Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:22.588Z [trace] << P2PAlive
2024-05-03T00:11:22.588Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:22.954Z [trace] << P2PAlive
2024-05-03T00:11:22.954Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:23.178Z [trace] << P2PAlive
2024-05-03T00:11:23.178Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:23.503Z [trace] << P2PAlive
2024-05-03T00:11:23.503Z [trace] >> P2PAliveAck (62510)
2024-05-03T00:11:23.866Z [trace] << P2PAlive
2024-05-03T00:11:23.866Z [trace] >> P2PAliveAck (62510)
^C
anddag commented 2 months ago

Using the latest version, the camera show images for few seconds and then the script crashes. here the debug and .pcap. https://we.tl/t-KIRb7XjfEN

/root/a9.5/cam-reverse-master/dist/bin.cjs:17273 ret.setUint8(i, this.getUint8(i)); ^

RangeError: Offset is outside the bounds of the DataView at DataView.prototype.getUint8 () at DataView.readByteArray (/root/a9.5/cam-reverse-master/dist/bin.cjs:17273:26) at deal_with_data (/root/a9.5/cam-reverse-master/dist/bin.cjs:17714:27) at Object.handle_Drw [as Drw] (/root/a9.5/cam-reverse-master/dist/bin.cjs:17819:5) at handleIncoming (/root/a9.5/cam-reverse-master/dist/bin.cjs:17834:16) at Socket. (/root/a9.5/cam-reverse-master/dist/bin.cjs:17844:38) at Socket.emit (node:events:520:28) at UDP.onMessage [as onmessage] (node:dgram:943:8)

Il giorno ven 3 mag 2024 alle ore 02:15 Adriano Cunha < @.***> ha scritto:

I got lucky and was able to capture what should be a successful wifi setup. Of course, it didn't happen and the camera didn't reboot. I hope the logs are useful.

tcpdump output: https://we.tl/t-ZkfoY2WwJs

$ node dist/bin.cjs pair --ssid ... 2024-05-03T00:11:16.159Z [info] Will configure any devices found to join XXXX 2024-05-03T00:11:16.169Z [info] Searching for devices on 192.168.1.255 2024-05-03T00:11:16.169Z [trace] >> LanSearch 2024-05-03T00:11:16.170Z [trace] >> LanSearchExt 2024-05-03T00:11:16.292Z [debug] Received a PunchPkt message 2024-05-03T00:11:16.292Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1 2024-05-03T00:11:16.293Z [trace] >> P2pRdy (62510) 2024-05-03T00:11:16.295Z [trace] << P2PAlive 2024-05-03T00:11:16.295Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:16.296Z [trace] << P2pRdy 2024-05-03T00:11:16.296Z [trace] >> Drw (62510) 2024-05-03T00:11:16.304Z [trace] << DrwAck 2024-05-03T00:11:16.305Z [trace] << P2PAlive 2024-05-03T00:11:16.305Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:16.469Z [trace] << Drw 2024-05-03T00:11:16.469Z [trace] >> DrwAck (62510) 2024-05-03T00:11:16.470Z [info] Logging in to camera FTYB492321INQAX 2024-05-03T00:11:16.471Z [trace] >> Drw (62510) 2024-05-03T00:11:16.471Z [info] WiFi config for camera FTYB492321INQAX is done, asking to reboot 2024-05-03T00:11:16.471Z [trace] >> Drw (62510) 2024-05-03T00:11:16.656Z [trace] << P2PAlive 2024-05-03T00:11:16.657Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:16.957Z [trace] << P2PAlive 2024-05-03T00:11:16.957Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:17.318Z [trace] << P2PAlive 2024-05-03T00:11:17.318Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:17.697Z [trace] << P2PAlive 2024-05-03T00:11:17.697Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:17.968Z [trace] << P2PAlive 2024-05-03T00:11:17.968Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:18.170Z [trace] >> LanSearch 2024-05-03T00:11:18.170Z [trace] >> LanSearchExt 2024-05-03T00:11:18.299Z [trace] << P2PAlive 2024-05-03T00:11:18.299Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:18.478Z [debug] Received a PunchPkt message 2024-05-03T00:11:18.478Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring 2024-05-03T00:11:18.626Z [trace] << P2PAlive 2024-05-03T00:11:18.626Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:18.858Z [trace] << P2PAlive 2024-05-03T00:11:18.858Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:19.157Z [trace] << P2PAlive 2024-05-03T00:11:19.158Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:19.515Z [trace] << P2PAlive 2024-05-03T00:11:19.515Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:19.859Z [trace] << P2PAlive 2024-05-03T00:11:19.860Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:20.171Z [trace] >> LanSearch 2024-05-03T00:11:20.171Z [trace] >> LanSearchExt 2024-05-03T00:11:20.174Z [debug] Received a PunchPkt message 2024-05-03T00:11:20.174Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring 2024-05-03T00:11:20.182Z [trace] << P2PAlive 2024-05-03T00:11:20.183Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:20.533Z [trace] << P2PAlive 2024-05-03T00:11:20.533Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:20.866Z [trace] << P2PAlive 2024-05-03T00:11:20.867Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:21.078Z [trace] << P2PAlive 2024-05-03T00:11:21.078Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:21.491Z [trace] << P2PAlive 2024-05-03T00:11:21.492Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:21.678Z [trace] << P2PAlive 2024-05-03T00:11:21.678Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:22.039Z [trace] << P2PAlive 2024-05-03T00:11:22.040Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:22.172Z [trace] >> LanSearch 2024-05-03T00:11:22.172Z [trace] >> LanSearchExt 2024-05-03T00:11:22.222Z [debug] Received a PunchPkt message 2024-05-03T00:11:22.223Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring 2024-05-03T00:11:22.404Z [trace] << P2PAlive 2024-05-03T00:11:22.404Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:22.588Z [trace] << P2PAlive 2024-05-03T00:11:22.588Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:22.954Z [trace] << P2PAlive 2024-05-03T00:11:22.954Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:23.178Z [trace] << P2PAlive 2024-05-03T00:11:23.178Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:23.503Z [trace] << P2PAlive 2024-05-03T00:11:23.503Z [trace] >> P2PAliveAck (62510) 2024-05-03T00:11:23.866Z [trace] << P2PAlive 2024-05-03T00:11:23.866Z [trace] >> P2PAliveAck (62510) ^C

— Reply to this email directly, view it on GitHub https://github.com/DavidVentura/cam-reverse/issues/17#issuecomment-2091941025, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPC2M4CIVNLBT6LKECGHWTZALJKLAVCNFSM6AAAAABG6SARH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRHE2DCMBSGU . You are receiving this because you were mentioned.Message ID: @.***>

DavidVentura commented 2 months ago

I've just implemented a simple retransmission scheme, for cases where there's packet loss. In my testing though, most of the issues come from the camera hanging, here I tried to pair a camera:

Note that after we send Drw to pair, the camera never replies:

2024-05-03T10:28:50.872Z [info] Will configure any devices found to join cuevita
2024-05-03T10:28:50.879Z [info] Searching for devices on 192.168.1.255
2024-05-03T10:28:50.880Z [trace] >> LanSearch
2024-05-03T10:28:53.883Z [trace] >> LanSearch
2024-05-03T10:28:56.885Z [trace] >> LanSearch
2024-05-03T10:28:59.886Z [trace] >> LanSearch
2024-05-03T10:29:02.888Z [trace] >> LanSearch
2024-05-03T10:29:02.892Z [debug] Received a PunchPkt message
2024-05-03T10:29:02.893Z [info] Discovered camera FTYC477360FAWUK at 192.168.1.1
2024-05-03T10:29:02.894Z [trace] >> P2pRdy
2024-05-03T10:29:02.898Z [trace] << P2PAlive
2024-05-03T10:29:02.898Z [trace] >> P2PAliveAck
2024-05-03T10:29:02.898Z [trace] << P2pRdy
2024-05-03T10:29:02.899Z [trace] >> Drw
2024-05-03T10:29:03.394Z [debug] Resending packet 0 as 1
2024-05-03T10:29:03.394Z [trace] >> Drw
2024-05-03T10:29:03.695Z [trace] >> P2PAlive
2024-05-03T10:29:03.893Z [debug] Resending packet 1 as 2
2024-05-03T10:29:03.894Z [trace] >> Drw
2024-05-03T10:29:04.096Z [trace] >> P2PAlive
2024-05-03T10:29:04.394Z [debug] Resending packet 2 as 3
2024-05-03T10:29:04.394Z [trace] >> Drw
2024-05-03T10:29:04.496Z [trace] >> P2PAlive
2024-05-03T10:29:04.894Z [debug] Resending packet 3 as 4
2024-05-03T10:29:04.894Z [trace] >> Drw
2024-05-03T10:29:04.895Z [trace] >> P2PAlive
2024-05-03T10:29:05.296Z [trace] >> P2PAlive
2024-05-03T10:29:05.393Z [debug] Resending packet 4 as 5
2024-05-03T10:29:05.394Z [trace] >> Drw
2024-05-03T10:29:05.697Z [trace] >> P2PAlive
2024-05-03T10:29:05.888Z [trace] >> LanSearch
2024-05-03T10:29:05.894Z [debug] Resending packet 5 as 6
2024-05-03T10:29:05.894Z [trace] >> Drw
2024-05-03T10:29:06.097Z [trace] >> P2PAlive
2024-05-03T10:29:06.395Z [debug] Resending packet 6 as 7
2024-05-03T10:29:06.395Z [trace] >> Drw
2024-05-03T10:29:06.497Z [trace] >> P2PAlive
2024-05-03T10:29:06.894Z [debug] Resending packet 7 as 8
2024-05-03T10:29:06.895Z [trace] >> Drw
2024-05-03T10:29:06.896Z [trace] >> P2PAlive
2024-05-03T10:29:07.297Z [trace] >> P2PAlive
2024-05-03T10:29:07.395Z [debug] Resending packet 8 as 9
2024-05-03T10:29:07.395Z [trace] >> Drw
2024-05-03T10:29:07.698Z [trace] >> P2PAlive
2024-05-03T10:29:07.894Z [debug] Resending packet 9 as 10
2024-05-03T10:29:07.894Z [trace] >> Drw
2024-05-03T10:29:08.098Z [trace] >> P2PAlive
2024-05-03T10:29:08.395Z [debug] Resending packet 10 as 11
2024-05-03T10:29:08.395Z [trace] >> Drw
2024-05-03T10:29:08.498Z [trace] >> P2PAlive
2024-05-03T10:29:08.889Z [trace] >> LanSearch
2024-05-03T10:29:11.300Z [info] Disconnected from camera FTYC477360FAWUK at 192.168.1.1
2024-05-03T10:29:11.301Z [info] Camera FTYC477360FAWUK disconnected
2024-05-03T10:29:11.301Z [info] Press CONTROL+C if you're done setting up your cameras

Probably the camera reboot in those 5 seconds, then came back:

2024-05-03T10:29:11.890Z [trace] >> LanSearch
2024-05-03T10:29:11.892Z [debug] Received a PunchPkt message
2024-05-03T10:29:11.892Z [info] Discovered camera FTYC477360FAWUK at 192.168.1.1
2024-05-03T10:29:11.893Z [trace] >> P2pRdy
2024-05-03T10:29:11.895Z [trace] << P2PAlive
2024-05-03T10:29:11.895Z [trace] >> P2PAliveAck
2024-05-03T10:29:11.897Z [trace] << P2pRdy
2024-05-03T10:29:11.897Z [trace] >> Drw
2024-05-03T10:29:11.897Z [trace] << P2PAlive
2024-05-03T10:29:11.897Z [trace] >> P2PAliveAck
2024-05-03T10:29:11.913Z [trace] << DrwAck
2024-05-03T10:29:11.913Z [debug] Removing 0 from pending
2024-05-03T10:29:11.955Z [trace] << Drw
2024-05-03T10:29:11.955Z [trace] >> DrwAck
2024-05-03T10:29:11.956Z [info] Logging in to camera FTYC477360FAWUK
2024-05-03T10:29:11.956Z [info] Configuring camera FTYC477360FAWUK
2024-05-03T10:29:11.956Z [trace] >> Drw
2024-05-03T10:29:11.956Z [info] WiFi config for camera FTYC477360FAWUK is done
2024-05-03T10:29:11.956Z [info] Validating WiFi settings on FTYC477360FAWUK
2024-05-03T10:29:11.956Z [trace] >> Drw
2024-05-03T10:29:11.956Z [info] Asking FTYC477360FAWUK to reboot
2024-05-03T10:29:11.957Z [trace] >> Drw
2024-05-03T10:29:11.970Z [trace] << DrwAck
2024-05-03T10:29:11.971Z [debug] Removing 1 from pending
2024-05-03T10:29:11.971Z [debug] Removing 2 from pending
2024-05-03T10:29:11.971Z [debug] Removing 3 from pending
2024-05-03T10:29:20.299Z [info] Disconnected from camera FTYC477360FAWUK at 192.168.1.1
2024-05-03T10:29:20.299Z [info] Camera FTYC477360FAWUK disconnected
2024-05-03T10:29:20.299Z [info] Press CONTROL+C if you're done setting up your cameras

and replied to all messages (pairing worked)

adrcunha commented 2 months ago

I still don't think the reason for the failed pairing is packets being lost, as the behavior of the "bad" camera is still a bit different. In any case, the latest code still doesn't work. :( But now there's a new 0xff50 control command. Let me get a tcpdump...

$ node dist/bin.cjs pair --ssid ...
2024-05-03T13:20:48.397Z [info] Will configure any devices found to join XXXX
2024-05-03T13:20:48.413Z [info] Searching for devices on 192.168.1.255
2024-05-03T13:20:48.414Z [trace] >> LanSearch
2024-05-03T13:20:48.559Z [debug] Received a PunchPkt message
2024-05-03T13:20:48.560Z [info] Discovered camera FTYB492321INQAX at 192.168.1.1
2024-05-03T13:20:48.561Z [trace] >> P2pRdy
2024-05-03T13:20:48.563Z [trace] << P2PAlive
2024-05-03T13:20:48.563Z [trace] >> P2PAliveAck
2024-05-03T13:20:48.564Z [trace] << P2pRdy
2024-05-03T13:20:48.564Z [debug] Sending Drw Packet with id 0
2024-05-03T13:20:48.564Z [trace] >> Drw
2024-05-03T13:20:48.565Z [trace] << P2PAlive
2024-05-03T13:20:48.566Z [trace] >> P2PAliveAck
2024-05-03T13:20:48.576Z [trace] << DrwAck
2024-05-03T13:20:48.577Z [debug] Removing 0 from pending
2024-05-03T13:20:48.743Z [trace] << Drw
2024-05-03T13:20:48.743Z [trace] >> DrwAck
2024-05-03T13:20:48.744Z [info] Unhandled control command: 0xff50
2024-05-03T13:20:48.744Z [trace] << Drw
2024-05-03T13:20:48.744Z [trace] >> DrwAck
2024-05-03T13:20:48.745Z [info] Logging in to camera FTYB492321INQAX
2024-05-03T13:20:48.745Z [info] Configuring camera FTYB492321INQAX
2024-05-03T13:20:48.745Z [debug] Sending Drw Packet with id 1
2024-05-03T13:20:48.745Z [trace] >> Drw
2024-05-03T13:20:48.746Z [info] WiFi config for camera FTYB492321INQAX is done
2024-05-03T13:20:48.746Z [info] Validating WiFi settings on FTYB492321INQAX
2024-05-03T13:20:48.746Z [debug] Sending Drw Packet with id 2
2024-05-03T13:20:48.746Z [trace] >> Drw
2024-05-03T13:20:48.746Z [info] Asking FTYB492321INQAX to reboot
2024-05-03T13:20:48.746Z [debug] Sending Drw Packet with id 3
2024-05-03T13:20:48.746Z [trace] >> Drw
2024-05-03T13:20:48.755Z [trace] << DrwAck
2024-05-03T13:20:48.755Z [debug] Removing 2 from pending
2024-05-03T13:20:48.951Z [trace] << P2PAlive
2024-05-03T13:20:48.951Z [trace] >> P2PAliveAck
2024-05-03T13:20:49.062Z [debug] Resending packet 1 as 4
2024-05-03T13:20:49.062Z [debug] Sending Drw Packet with id 4
2024-05-03T13:20:49.062Z [trace] >> Drw
2024-05-03T13:20:49.062Z [debug] Resending packet 3 as 5
2024-05-03T13:20:49.063Z [debug] Sending Drw Packet with id 5
2024-05-03T13:20:49.063Z [trace] >> Drw
2024-05-03T13:20:49.070Z [trace] << DrwAck
2024-05-03T13:20:49.070Z [debug] Removing 4 from pending
2024-05-03T13:20:49.298Z [trace] << P2PAlive
2024-05-03T13:20:49.298Z [trace] >> P2PAliveAck
2024-05-03T13:20:49.563Z [debug] Resending packet 5 as 6
2024-05-03T13:20:49.563Z [debug] Sending Drw Packet with id 6
2024-05-03T13:20:49.563Z [trace] >> Drw
2024-05-03T13:20:49.565Z [trace] << DrwAck
2024-05-03T13:20:49.565Z [debug] Removing 6 from pending
2024-05-03T13:20:49.597Z [trace] << P2PAlive
2024-05-03T13:20:49.597Z [trace] >> P2PAliveAck
2024-05-03T13:20:49.898Z [trace] << P2PAlive
2024-05-03T13:20:49.898Z [trace] >> P2PAliveAck
2024-05-03T13:20:50.198Z [trace] << P2PAlive
2024-05-03T13:20:50.198Z [trace] >> P2PAliveAck
2024-05-03T13:20:50.498Z [trace] << P2PAlive
2024-05-03T13:20:50.498Z [trace] >> P2PAliveAck
2024-05-03T13:20:50.798Z [trace] << P2PAlive
2024-05-03T13:20:50.798Z [trace] >> P2PAliveAck
2024-05-03T13:20:51.098Z [trace] << P2PAlive
2024-05-03T13:20:51.098Z [trace] >> P2PAliveAck
2024-05-03T13:20:51.398Z [trace] << P2PAlive
2024-05-03T13:20:51.398Z [trace] >> P2PAliveAck
2024-05-03T13:20:51.414Z [trace] >> LanSearch
2024-05-03T13:20:51.416Z [debug] Received a PunchPkt message
2024-05-03T13:20:51.416Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:20:51.698Z [trace] << P2PAlive
2024-05-03T13:20:51.698Z [trace] >> P2PAliveAck
2024-05-03T13:20:51.998Z [trace] << P2PAlive
2024-05-03T13:20:51.998Z [trace] >> P2PAliveAck
2024-05-03T13:20:52.298Z [trace] << P2PAlive
2024-05-03T13:20:52.298Z [trace] >> P2PAliveAck
2024-05-03T13:20:52.597Z [trace] << P2PAlive
2024-05-03T13:20:52.598Z [trace] >> P2PAliveAck
2024-05-03T13:20:52.898Z [trace] << P2PAlive
2024-05-03T13:20:52.898Z [trace] >> P2PAliveAck
2024-05-03T13:20:53.198Z [trace] << P2PAlive
2024-05-03T13:20:53.198Z [trace] >> P2PAliveAck
2024-05-03T13:20:53.498Z [trace] << P2PAlive
2024-05-03T13:20:53.499Z [trace] >> P2PAliveAck
2024-05-03T13:20:53.799Z [trace] << P2PAlive
2024-05-03T13:20:53.799Z [trace] >> P2PAliveAck
2024-05-03T13:20:53.876Z [trace] << Drw
2024-05-03T13:20:53.876Z [trace] >> DrwAck
2024-05-03T13:20:53.876Z [info] Unhandled control command: 0xff50
2024-05-03T13:20:54.181Z [trace] << P2PAlive
2024-05-03T13:20:54.181Z [trace] >> P2PAliveAck
2024-05-03T13:20:54.415Z [trace] >> LanSearch
2024-05-03T13:20:54.421Z [debug] Received a PunchPkt message
2024-05-03T13:20:54.422Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:20:54.514Z [trace] << P2PAlive
2024-05-03T13:20:54.514Z [trace] >> P2PAliveAck
2024-05-03T13:20:54.815Z [trace] << P2PAlive
2024-05-03T13:20:54.815Z [trace] >> P2PAliveAck
2024-05-03T13:20:55.115Z [trace] << P2PAlive
2024-05-03T13:20:55.115Z [trace] >> P2PAliveAck
2024-05-03T13:20:55.415Z [trace] << P2PAlive
2024-05-03T13:20:55.415Z [trace] >> P2PAliveAck
2024-05-03T13:20:55.715Z [trace] << P2PAlive
2024-05-03T13:20:55.715Z [trace] >> P2PAliveAck
2024-05-03T13:20:56.015Z [trace] << P2PAlive
2024-05-03T13:20:56.015Z [trace] >> P2PAliveAck
2024-05-03T13:20:56.315Z [trace] << P2PAlive
2024-05-03T13:20:56.315Z [trace] >> P2PAliveAck
2024-05-03T13:20:56.615Z [trace] << P2PAlive
2024-05-03T13:20:56.615Z [trace] >> P2PAliveAck
2024-05-03T13:20:56.915Z [trace] << P2PAlive
2024-05-03T13:20:56.915Z [trace] >> P2PAliveAck
2024-05-03T13:20:57.215Z [trace] << P2PAlive
2024-05-03T13:20:57.215Z [trace] >> P2PAliveAck
2024-05-03T13:20:57.415Z [trace] >> LanSearch
2024-05-03T13:20:57.418Z [debug] Received a PunchPkt message
2024-05-03T13:20:57.418Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:20:57.516Z [trace] << P2PAlive
2024-05-03T13:20:57.516Z [trace] >> P2PAliveAck
2024-05-03T13:20:57.816Z [trace] << P2PAlive
2024-05-03T13:20:57.816Z [trace] >> P2PAliveAck
2024-05-03T13:20:58.116Z [trace] << P2PAlive
2024-05-03T13:20:58.116Z [trace] >> P2PAliveAck
2024-05-03T13:20:58.416Z [trace] << P2PAlive
2024-05-03T13:20:58.416Z [trace] >> P2PAliveAck
2024-05-03T13:20:58.716Z [trace] << P2PAlive
2024-05-03T13:20:58.716Z [trace] >> P2PAliveAck
2024-05-03T13:20:58.956Z [trace] << Drw
2024-05-03T13:20:58.956Z [trace] >> DrwAck
2024-05-03T13:20:58.956Z [info] Unhandled control command: 0xff50
2024-05-03T13:20:59.017Z [trace] << P2PAlive
2024-05-03T13:20:59.017Z [trace] >> P2PAliveAck
2024-05-03T13:20:59.364Z [trace] << P2PAlive
2024-05-03T13:20:59.364Z [trace] >> P2PAliveAck
2024-05-03T13:20:59.685Z [trace] << P2PAlive
2024-05-03T13:20:59.685Z [trace] >> P2PAliveAck
2024-05-03T13:20:59.985Z [trace] << P2PAlive
2024-05-03T13:20:59.985Z [trace] >> P2PAliveAck
2024-05-03T13:21:00.285Z [trace] << P2PAlive
2024-05-03T13:21:00.285Z [trace] >> P2PAliveAck
2024-05-03T13:21:00.416Z [trace] >> LanSearch
2024-05-03T13:21:00.419Z [debug] Received a PunchPkt message
2024-05-03T13:21:00.419Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:00.585Z [trace] << P2PAlive
2024-05-03T13:21:00.585Z [trace] >> P2PAliveAck
2024-05-03T13:21:00.886Z [trace] << P2PAlive
2024-05-03T13:21:00.886Z [trace] >> P2PAliveAck
2024-05-03T13:21:01.185Z [trace] << P2PAlive
2024-05-03T13:21:01.185Z [trace] >> P2PAliveAck
2024-05-03T13:21:01.485Z [trace] << P2PAlive
2024-05-03T13:21:01.485Z [trace] >> P2PAliveAck
2024-05-03T13:21:01.785Z [trace] << P2PAlive
2024-05-03T13:21:01.785Z [trace] >> P2PAliveAck
2024-05-03T13:21:02.086Z [trace] << P2PAlive
2024-05-03T13:21:02.086Z [trace] >> P2PAliveAck
2024-05-03T13:21:02.386Z [trace] << P2PAlive
2024-05-03T13:21:02.386Z [trace] >> P2PAliveAck
2024-05-03T13:21:02.686Z [trace] << P2PAlive
2024-05-03T13:21:02.686Z [trace] >> P2PAliveAck
2024-05-03T13:21:02.986Z [trace] << P2PAlive
2024-05-03T13:21:02.986Z [trace] >> P2PAliveAck
2024-05-03T13:21:03.286Z [trace] << P2PAlive
2024-05-03T13:21:03.286Z [trace] >> P2PAliveAck
2024-05-03T13:21:03.418Z [trace] >> LanSearch
2024-05-03T13:21:03.420Z [debug] Received a PunchPkt message
2024-05-03T13:21:03.420Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:03.586Z [trace] << P2PAlive
2024-05-03T13:21:03.586Z [trace] >> P2PAliveAck
2024-05-03T13:21:03.886Z [trace] << P2PAlive
2024-05-03T13:21:03.886Z [trace] >> P2PAliveAck
2024-05-03T13:21:04.086Z [trace] << Drw
2024-05-03T13:21:04.086Z [trace] >> DrwAck
2024-05-03T13:21:04.087Z [info] Unhandled control command: 0xff50
2024-05-03T13:21:04.264Z [trace] << P2PAlive
2024-05-03T13:21:04.264Z [trace] >> P2PAliveAck
2024-05-03T13:21:04.599Z [trace] << P2PAlive
2024-05-03T13:21:04.600Z [trace] >> P2PAliveAck
2024-05-03T13:21:04.911Z [trace] << P2PAlive
2024-05-03T13:21:04.912Z [trace] >> P2PAliveAck
2024-05-03T13:21:05.212Z [trace] << P2PAlive
2024-05-03T13:21:05.212Z [trace] >> P2PAliveAck
2024-05-03T13:21:05.513Z [trace] << P2PAlive
2024-05-03T13:21:05.513Z [trace] >> P2PAliveAck
2024-05-03T13:21:05.813Z [trace] << P2PAlive
2024-05-03T13:21:05.813Z [trace] >> P2PAliveAck
2024-05-03T13:21:06.119Z [trace] << P2PAlive
2024-05-03T13:21:06.119Z [trace] >> P2PAliveAck
2024-05-03T13:21:06.413Z [trace] << P2PAlive
2024-05-03T13:21:06.414Z [trace] >> P2PAliveAck
2024-05-03T13:21:06.418Z [trace] >> LanSearch
2024-05-03T13:21:06.420Z [debug] Received a PunchPkt message
2024-05-03T13:21:06.420Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:06.713Z [trace] << P2PAlive
2024-05-03T13:21:06.713Z [trace] >> P2PAliveAck
2024-05-03T13:21:07.013Z [trace] << P2PAlive
2024-05-03T13:21:07.013Z [trace] >> P2PAliveAck
2024-05-03T13:21:07.313Z [trace] << P2PAlive
2024-05-03T13:21:07.313Z [trace] >> P2PAliveAck
2024-05-03T13:21:07.613Z [trace] << P2PAlive
2024-05-03T13:21:07.613Z [trace] >> P2PAliveAck
2024-05-03T13:21:07.913Z [trace] << P2PAlive
2024-05-03T13:21:07.913Z [trace] >> P2PAliveAck
2024-05-03T13:21:08.213Z [trace] << P2PAlive
2024-05-03T13:21:08.213Z [trace] >> P2PAliveAck
2024-05-03T13:21:08.513Z [trace] << P2PAlive
2024-05-03T13:21:08.513Z [trace] >> P2PAliveAck
2024-05-03T13:21:08.807Z [trace] << P2PAlive
2024-05-03T13:21:08.807Z [trace] >> P2PAliveAck
2024-05-03T13:21:09.107Z [trace] << P2PAlive
2024-05-03T13:21:09.107Z [trace] >> P2PAliveAck
2024-05-03T13:21:09.177Z [trace] << Drw
2024-05-03T13:21:09.177Z [trace] >> DrwAck
2024-05-03T13:21:09.177Z [info] Unhandled control command: 0xff50
2024-05-03T13:21:09.420Z [trace] >> LanSearch
2024-05-03T13:21:09.422Z [debug] Received a PunchPkt message
2024-05-03T13:21:09.423Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:09.431Z [trace] << P2PAlive
2024-05-03T13:21:09.431Z [trace] >> P2PAliveAck
2024-05-03T13:21:09.778Z [trace] << P2PAlive
2024-05-03T13:21:09.778Z [trace] >> P2PAliveAck
2024-05-03T13:21:10.078Z [trace] << P2PAlive
2024-05-03T13:21:10.078Z [trace] >> P2PAliveAck
2024-05-03T13:21:10.381Z [trace] << P2PAlive
2024-05-03T13:21:10.381Z [trace] >> P2PAliveAck
2024-05-03T13:21:10.681Z [trace] << P2PAlive
2024-05-03T13:21:10.681Z [trace] >> P2PAliveAck
2024-05-03T13:21:10.981Z [trace] << P2PAlive
2024-05-03T13:21:10.981Z [trace] >> P2PAliveAck
2024-05-03T13:21:11.281Z [trace] << P2PAlive
2024-05-03T13:21:11.281Z [trace] >> P2PAliveAck
2024-05-03T13:21:11.581Z [trace] << P2PAlive
2024-05-03T13:21:11.581Z [trace] >> P2PAliveAck
2024-05-03T13:21:11.881Z [trace] << P2PAlive
2024-05-03T13:21:11.881Z [trace] >> P2PAliveAck
2024-05-03T13:21:12.181Z [trace] << P2PAlive
2024-05-03T13:21:12.181Z [trace] >> P2PAliveAck
2024-05-03T13:21:12.421Z [trace] >> LanSearch
2024-05-03T13:21:12.424Z [debug] Received a PunchPkt message
2024-05-03T13:21:12.424Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:12.481Z [trace] << P2PAlive
2024-05-03T13:21:12.481Z [trace] >> P2PAliveAck
2024-05-03T13:21:12.781Z [trace] << P2PAlive
2024-05-03T13:21:12.781Z [trace] >> P2PAliveAck
2024-05-03T13:21:13.081Z [trace] << P2PAlive
2024-05-03T13:21:13.081Z [trace] >> P2PAliveAck
2024-05-03T13:21:13.381Z [trace] << P2PAlive
2024-05-03T13:21:13.381Z [trace] >> P2PAliveAck
2024-05-03T13:21:13.681Z [trace] << P2PAlive
2024-05-03T13:21:13.682Z [trace] >> P2PAliveAck
2024-05-03T13:21:13.981Z [trace] << P2PAlive
2024-05-03T13:21:13.982Z [trace] >> P2PAliveAck
2024-05-03T13:21:14.313Z [trace] << Drw
2024-05-03T13:21:14.313Z [trace] >> DrwAck
2024-05-03T13:21:14.313Z [info] Unhandled control command: 0xff50
2024-05-03T13:21:14.335Z [trace] << P2PAlive
2024-05-03T13:21:14.335Z [trace] >> P2PAliveAck
2024-05-03T13:21:14.685Z [trace] << P2PAlive
2024-05-03T13:21:14.685Z [trace] >> P2PAliveAck
2024-05-03T13:21:15.010Z [trace] << P2PAlive
2024-05-03T13:21:15.010Z [trace] >> P2PAliveAck
2024-05-03T13:21:15.310Z [trace] << P2PAlive
2024-05-03T13:21:15.310Z [trace] >> P2PAliveAck
2024-05-03T13:21:15.422Z [trace] >> LanSearch
2024-05-03T13:21:15.424Z [debug] Received a PunchPkt message
2024-05-03T13:21:15.425Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:15.610Z [trace] << P2PAlive
2024-05-03T13:21:15.610Z [trace] >> P2PAliveAck
2024-05-03T13:21:15.910Z [trace] << P2PAlive
2024-05-03T13:21:15.910Z [trace] >> P2PAliveAck
2024-05-03T13:21:16.209Z [trace] << P2PAlive
2024-05-03T13:21:16.210Z [trace] >> P2PAliveAck
2024-05-03T13:21:16.509Z [trace] << P2PAlive
2024-05-03T13:21:16.510Z [trace] >> P2PAliveAck
2024-05-03T13:21:16.809Z [trace] << P2PAlive
2024-05-03T13:21:16.810Z [trace] >> P2PAliveAck
2024-05-03T13:21:17.110Z [trace] << P2PAlive
2024-05-03T13:21:17.110Z [trace] >> P2PAliveAck
2024-05-03T13:21:17.409Z [trace] << P2PAlive
2024-05-03T13:21:17.410Z [trace] >> P2PAliveAck
2024-05-03T13:21:17.709Z [trace] << P2PAlive
2024-05-03T13:21:17.710Z [trace] >> P2PAliveAck
2024-05-03T13:21:18.009Z [trace] << P2PAlive
2024-05-03T13:21:18.009Z [trace] >> P2PAliveAck
2024-05-03T13:21:18.309Z [trace] << P2PAlive
2024-05-03T13:21:18.309Z [trace] >> P2PAliveAck
2024-05-03T13:21:18.424Z [trace] >> LanSearch
2024-05-03T13:21:18.426Z [debug] Received a PunchPkt message
2024-05-03T13:21:18.426Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:18.609Z [trace] << P2PAlive
2024-05-03T13:21:18.610Z [trace] >> P2PAliveAck
2024-05-03T13:21:18.910Z [trace] << P2PAlive
2024-05-03T13:21:18.910Z [trace] >> P2PAliveAck
2024-05-03T13:21:19.209Z [trace] << P2PAlive
2024-05-03T13:21:19.210Z [trace] >> P2PAliveAck
2024-05-03T13:21:19.400Z [trace] << Drw
2024-05-03T13:21:19.400Z [trace] >> DrwAck
2024-05-03T13:21:19.400Z [info] Unhandled control command: 0xff50
2024-05-03T13:21:19.521Z [trace] << P2PAlive
2024-05-03T13:21:19.521Z [trace] >> P2PAliveAck
2024-05-03T13:21:19.860Z [trace] << P2PAlive
2024-05-03T13:21:19.861Z [trace] >> P2PAliveAck
2024-05-03T13:21:20.182Z [trace] << P2PAlive
2024-05-03T13:21:20.183Z [trace] >> P2PAliveAck
2024-05-03T13:21:20.482Z [trace] << P2PAlive
2024-05-03T13:21:20.482Z [trace] >> P2PAliveAck
2024-05-03T13:21:20.783Z [trace] << P2PAlive
2024-05-03T13:21:20.783Z [trace] >> P2PAliveAck
2024-05-03T13:21:21.082Z [trace] << P2PAlive
2024-05-03T13:21:21.082Z [trace] >> P2PAliveAck
2024-05-03T13:21:21.382Z [trace] << P2PAlive
2024-05-03T13:21:21.382Z [trace] >> P2PAliveAck
2024-05-03T13:21:21.424Z [trace] >> LanSearch
2024-05-03T13:21:21.425Z [debug] Received a PunchPkt message
2024-05-03T13:21:21.425Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:21.684Z [trace] << P2PAlive
2024-05-03T13:21:21.684Z [trace] >> P2PAliveAck
2024-05-03T13:21:21.984Z [trace] << P2PAlive
2024-05-03T13:21:21.984Z [trace] >> P2PAliveAck
2024-05-03T13:21:22.283Z [trace] << P2PAlive
2024-05-03T13:21:22.284Z [trace] >> P2PAliveAck
2024-05-03T13:21:22.583Z [trace] << P2PAlive
2024-05-03T13:21:22.584Z [trace] >> P2PAliveAck
2024-05-03T13:21:22.884Z [trace] << P2PAlive
2024-05-03T13:21:22.884Z [trace] >> P2PAliveAck
2024-05-03T13:21:23.184Z [trace] << P2PAlive
2024-05-03T13:21:23.184Z [trace] >> P2PAliveAck
2024-05-03T13:21:23.483Z [trace] << P2PAlive
2024-05-03T13:21:23.484Z [trace] >> P2PAliveAck
2024-05-03T13:21:23.784Z [trace] << P2PAlive
2024-05-03T13:21:23.784Z [trace] >> P2PAliveAck
2024-05-03T13:21:24.077Z [trace] << P2PAlive
2024-05-03T13:21:24.077Z [trace] >> P2PAliveAck
2024-05-03T13:21:24.377Z [trace] << P2PAlive
2024-05-03T13:21:24.377Z [trace] >> P2PAliveAck
2024-05-03T13:21:24.424Z [trace] >> LanSearch
2024-05-03T13:21:24.427Z [debug] Received a PunchPkt message
2024-05-03T13:21:24.427Z [info] Camera FTYB492321INQAX at 192.168.1.1 already discovered, ignoring
2024-05-03T13:21:24.531Z [trace] << Drw
2024-05-03T13:21:24.531Z [trace] >> DrwAck
2024-05-03T13:21:24.531Z [info] Unhandled control command: 0xff50
2024-05-03T13:21:24.750Z [trace] << P2PAlive
2024-05-03T13:21:24.751Z [trace] >> P2PAliveAck
2024-05-03T13:21:25.099Z [trace] << P2PAlive
2024-05-03T13:21:25.100Z [trace] >> P2PAliveAck
^C