ROBOR receive-only Python starter / 수신 전용 예제 — 2026-10-02
© 2026 ROBOR Co., Ltd. All rights reserved.

한국어
1. Python 3 환경에서 python -m pip install -r requirements.txt
2. 공식 프로그램에서 현재 포트/통신 속도/스트리밍을 확인하고 프로그램을 닫습니다.
3. python receive_only.py --port COM3 --baud 115200 --seconds 30 --output capture.jsonl
   COM3와 속도는 예시입니다. 확인한 실제 값을 입력하세요. 프레임은 8N1입니다.
4. python -m unittest -v test_receive_only.py
   시험은 합성 바이트이며 실장치 시험이 아닙니다.

장치가 이미 송신 중이어야 기록됩니다. 예제는 송신·설정·보정·업데이트 명령이 없습니다.
포트를 여는 OS/드라이버가 DTR/RTS 신호를 바꿀 수 있으므로 연결 하드웨어의 동작을 먼저 확인하세요.
기존 출력 파일은 덮어쓰지 않습니다. 최대 수신량 기본 32 MiB, 기본 시간 30초.
JSONL의 hex를 순서대로 합치면 받은 원본 바이트가 됩니다. 한 행은 시리얼 수신 청크이지 센서 프레임이 아닙니다.
pc_utc/elapsed_s는 PC 수신 시각이며 센서 시각이나 정확한 샘플링 주기를 뜻하지 않습니다.
필드·단위·출력 마스크는 모델/펌웨어 프로토콜로 별도 확인하세요. CAN 어댑터용 예제가 아닙니다.
자료: https://pyserial.readthedocs.io/en/latest/pyserial_api.html

English
Install Python 3, then run: python -m pip install -r requirements.txt
Verify the current port, rate and stream with the official application, then close it.
Run: python receive_only.py --port COM3 --baud 115200 --seconds 30 --output capture.jsonl
Use your actual port and confirmed rate; COM3/115200 are examples. Framing is 8N1.
Run synthetic host tests: python -m unittest -v test_receive_only.py
No hardware validation is claimed. This example sends no sensor commands; the device must already stream.
Opening a port may change DTR/RTS through the OS/driver. Check the connected hardware first.
Existing output files are preserved. Defaults: 30 seconds / 32 MiB limit.
Each JSONL row is a receive chunk, not a sensor frame. Concatenate hex fields to recover raw bytes.
PC timestamps are not sensor sample times. Confirm model/firmware fields, units and output masks separately.
This is not a CAN-adapter example. Errors return nonzero; no data returns code 3.

오프라인 ASCII 동기 프레임 해석 / Offline ASCII sync decoding
python decode_sync.py --model v2 --input capture.jsonl --mask 0xDD --output decoded.csv
--mask는 장치에서 확인한 실제 sd 값이며 예제가 변경하지 않습니다. 출력 마스크가 로그 중간에 바뀌면 분리해서 처리하세요.
이 예제는 0x0001~0x0080 필드만 지원하고 다른 마스크는 거절합니다. 0xDD는 17필드이며 온도 제외,
롤/피치/요는 1부터 세어 11/12/13번째 열입니다. 0x41은 시간+롤+피치+요 4필드입니다.
Use the actual confirmed sd mask. Split logs if the mask changes. Unsupported masks, non-finite values,
wrong field counts, command echoes and incomplete trailing lines are rejected. A numeric line with the same
field count cannot independently prove its mask; never infer the mask from column count alone.
Units and order: time ms, temperature C, acceleration g, gyro deg/s, magnetic field uT, linear acceleration g,
Euler angles deg, quaternion w/x/y/z (unitless), only when the corresponding mask bits are selected.
Based on the model protocol and shared UI field order reviewed 2026-10-02. Host tests are synthetic:
python -m unittest -v test_receive_only.py test_decode_sync.py

Decoder scope: V2/V3 only; specify --model v2 or --model v3. Do not apply this decoder to V1.
디코더는 V2/V3 전용입니다. V1은 단위와 필드 정의가 달라 지원하지 않습니다.
