Ebay UART camera (VC0703)

Default UART settings:

  • 115200 8N1
  • uses hex commands (use coolterm > connection > send string > hex)

Useful commands:

  • 56 00 11 00 - get FW version
  • 56 00 34 00 - get image size (last 4 bytes are size)
  • 56 00 32 0C 00 0A 00 00 MH ML 00 00 KH KL 00 0A - Read image at starting address MH ML with size KH KL. JPEG starts with FF D8 and ends with FF D9


xxd -r -p hex_string.txt > image.jpg

to convert to jpg image.


    • It's very late and I don't have time to post all the info now, but this should be enough to help others out.  The manual is a bit confusing but here are the main things you need to do:
      - change from RS232 to TTL levels (I found it easiest to remove the MAX3232 chip, and add solder to connect the pairs of pads underneath the chip).
      - I'm not using a mega, so for testing I used the NewSoftSerial library to read/write to the camera
      - send commands to the camara like this:
        where Reset is defined like so:
      static const uint8_t Reset[5] = {0x56, 0x00, 0x26, 0x00};
      - you don't need to know the size of the image, since the JPG image will end with the pair of bytes:  FF D9   So you can keep reading data until you see that pair, then stop.
      - to read data use the command given in the manual - MULTIPLE times (they're not really clear about that part).
      - for example the read command given in the manual is:
      56 00 32 0C 00 0A 00 00 MH ML 00 00 KH KL 00 0A
      the first time you send the command set MH and ML to 00 00 and KH and KL to 00 and 20 (this will read a chunk of 32 bytes) so it's:
      56 00 32 0C 00 0A 00 00 00 00 00 00 00 20 00 0A
      Then after you've read the returned data (42 bytes with the 5 header and 5 footer bytes) you then increment MH and ML (the starting portion of memory to read from) and leave KH and KL alone since you're keeping the chunk size the same.  So the next command is:
      56 00 32 0C 00 0A 00 00 00 20 00 00 00 20 00 0A
      and so on.
      I used a small chunk size because if it's too large you overflow the buffer on NewSoftSerial.
      I'll post more info if folks are interested when I get a chance.
      For now I have a working (but ugly) sketch that grabs the image and sends it out as hex over the serial line - I then wrote a small python script to take the hex data and save it to a binary JPG file.
      So summary - yes it works, more to come later.
  • ebay_uart_camera.txt
  • Last modified: 7 years ago
  • by sam