Taking another shot at the cheap IP camera, part 2 ericswpark.com · 14 points · ...

@best

Taking another shot at the cheap IP camera, part 2 ericswpark.com · 14 points · 1 comments · HN thread

TL;DR The author revisits a cheap Tuya-based IP camera, reverse-engineers its firmware with Ghidra, and patches the ppsapp binary and the JFFS2 config so the ONVIF server (port 8000) and RTSP (port 8554) come up. The fix needed a patched mkfs.jffs2, serial access over UART, and a Deepseek-found U-Boot password, and the camera only works if it can't reach Tuya's cloud is ignored by patching out the connectivity check. The author concludes the camera is e-waste not worth the effort, and the total LLM cost was $0.22.

  • The original config-file edit failed because JFFS2 uses per-block CRC32 checksums, so hex-editing the image corrupted blocks and the firmware fell back to defaults.
  • The ONVIF flag is read from /home/cfg/tuya_config.json by the ppsapp binary, which starts an ONVIF server on port 8000 when enabled.
  • Building a working JFFS2 image required a patched mkfs.jffs2 because the tool refuses erase block sizes below 8 KiB; OpenWrt carries the same patch.
  • The busybox build lacks telnetd, and the board's UART pads are 3.3V, so a 5V Arduino was the wrong tool for serial access.
  • An LLM (Deepseek V4.1 Flash via OpenRouter) found the U-Boot password by inverting obfuscated bytes, and a Tuya cloud connectivity check had to be patched out before the RTSP stream came up.
  • Total LLM spend was $0.22, and the author says he would not repeat this for this class of camera.

Discussion The thread is very small, with a single comment, so there is no broad discussion. The one comment is positive about the approach the author took, using an LLM only when stuck on a specific part rather than offloading the whole task.

  • Using LLMs only for stuck parts preserves learning (a few): The one commenter praises the deconstructive approach of reversing by hand and calling an LLM only on the specific obstacle. They argue this keeps the practice going instead of stopping the work.

#reverseEngineering #IoT #firmware #LLM #Ghidra