Hi everyone,
I wanted to share a finding regarding the JC261 Dashcameras when using the gt06 protocol. It seems some firmware versions of these devices are sensitive to the 4-byte padding currently implemented in Gt06ProtocolEncoder.java.
When sending short custom commands like STATUS or PARAM, the device returns a command header error. This is because the device expects the ASCII command to start immediately after the length byte, and the 4-byte zeros padding (buf.writeInt(0)) shifts the command string, causing a parsing error on the device side.
If you encounter this, you can fix it by adding white spaces to align the command manually in the "Custom Command" field.
For STATUS, use "STATUS " (two leading space).
For PARAM, use "PARAM " (two leading spaces).
Longer commands like "RTMP,ON,OUT" work fine as they seem to overflow the expected buffer correctly.
The behavior seems related to lines 49-51 in Gt06ProtocolEncoder.java:
buf.writeByte(4 + content.length());
buf.writeInt(0);
While this padding is standard for many GT06 clones, these specific dashcams (and potentially others using the Jimi video SDK) seem to require a version without the 4-byte offset.
I'm leaving this here as a reference for anyone struggling with "command header error" on similar video-telematics hardware.
Do you have the documentation?
Hi everyone,
I wanted to share a finding regarding the JC261 Dashcameras when using the gt06 protocol. It seems some firmware versions of these devices are sensitive to the 4-byte padding currently implemented in Gt06ProtocolEncoder.java.
When sending short custom commands like STATUS or PARAM, the device returns a command header error. This is because the device expects the ASCII command to start immediately after the length byte, and the 4-byte zeros padding (buf.writeInt(0)) shifts the command string, causing a parsing error on the device side.
If you encounter this, you can fix it by adding white spaces to align the command manually in the "Custom Command" field.
For STATUS, use "STATUS " (two leading space).
For PARAM, use "PARAM " (two leading spaces).
Longer commands like "RTMP,ON,OUT" work fine as they seem to overflow the expected buffer correctly.
The behavior seems related to lines 49-51 in Gt06ProtocolEncoder.java:
buf.writeByte(4 + content.length()); buf.writeInt(0);While this padding is standard for many GT06 clones, these specific dashcams (and potentially others using the Jimi video SDK) seem to require a version without the 4-byte offset.
I'm leaving this here as a reference for anyone struggling with "command header error" on similar video-telematics hardware.