User Tools

Site Tools


doc:appunti:hardware:sjcam-8pro-ambarella-wifi-api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
doc:appunti:hardware:sjcam-8pro-ambarella-wifi-api [2022/06/17 13:54] – [Using Python to call the API] niccolodoc:appunti:hardware:sjcam-8pro-ambarella-wifi-api [2023/06/14 14:17] – [Ambarella msg_id Codes] niccolo
Line 150: Line 150:
 SEND: {"msg_id":2,"type":"camera_clock","param":"2022-05-06 17:02:43","token":2} SEND: {"msg_id":2,"type":"camera_clock","param":"2022-05-06 17:02:43","token":2}
 RECV: {"rval":0,"msg_id":2,"type":"camera_clock"} RECV: {"rval":0,"msg_id":2,"type":"camera_clock"}
 +</code>
 +
 +Set the video mode:
 +
 +<code>
 +SEND: {"msg_id": 2, "type": "Resolution", "param": "1080(1920x1080) 30FPS", "token":1}
 +RECV: {"rval":0,"msg_id":2,"type":"camera_mode"}
 +</code>
 +
 +Set the camera mode to normal record:
 +
 +<code>
 +SEND: {"msg_id": 2, "type": "camera_mode", "param": "normal_record", "token":1}
 +RECV: {"rval":0,"msg_id":2,"type":"camera_mode"}{"msg_id":7,"type":"normal_record"}
 </code> </code>
  
Line 259: Line 273:
  
 On Android I installed also the **Termux:Widget** app which allows to add shortcut icons over the desktop which will launch the scripts. I have scripts to start and stop recording, to change white balance, to turn ON and OFF the front display and to power OFF the camera. Each launcher was customized with its own **icon** (se the screenshot to the left). When a script is launched, the output is printed into the text console; to have a more visible feedback I used the **figlet** program to print large ASCII-art messages (se the screenshot to the right). On Android I installed also the **Termux:Widget** app which allows to add shortcut icons over the desktop which will launch the scripts. I have scripts to start and stop recording, to change white balance, to turn ON and OFF the front display and to power OFF the camera. Each launcher was customized with its own **icon** (se the screenshot to the left). When a script is launched, the output is printed into the text console; to have a more visible feedback I used the **figlet** program to print large ASCII-art messages (se the screenshot to the right).
 +
 +In this **[[https://github.com/RigacciOrg/ambarella-api-pytools|GitHub repository]]** you can find a Python module which contains basic functions to send and receive the JSON messages, plus some handy scripts to do basic operations, like **REC Start**, **REC Stop**, set **White Balance**, etc.
  
  
doc/appunti/hardware/sjcam-8pro-ambarella-wifi-api.txt · Last modified: 2023/06/16 10:18 by niccolo