Initial: ContinuousTransponder wrapper for Kogger USBL
High-level Python wrapper around the upstream cosma-tech/kogger_acousticAntenna
driver. Configures a Kogger acoustic antenna as a permanent slave transponder
in a single start() call: address filter, echo filter, optional TDMA sync slot,
permanent response window, and Python callbacks for each ping received.
No modification to the upstream driver — only composes existing public methods
in the right order. Snapshot of upstream driver included read-only under driver/
for reference.
Includes:
- transponder_continu.py (302 lines): the wrapper class + CLI
- examples/auv_slave.py (79 lines): usage example with logging
- README.md: design rationale, usage, multi-AUV TDMA, watchdog, hardware wiring
- driver/: snapshot of cosma-tech/kogger_acousticAntenna at commit 1b539f9
('Add index slot for multi pinger', 2025-03-11)
Built for Cosma context (USV master + N AUVs slaves) following the design
conversation in Discord #ping-pong-ping (2026-04-27). See poulpe/ping-pong-ping
on Gitea for the interactive demo of the protocol.
This commit is contained in:
204
driver/README.md
Normal file
204
driver/README.md
Normal file
@@ -0,0 +1,204 @@
|
||||
# Driver for Acoustic Antenna from Kogger
|
||||
|
||||
## Installations request
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt install python3-serial python3-loguru
|
||||
```
|
||||
|
||||
# Kogger wires
|
||||
|
||||
Brown : supply (+)
|
||||
Blue : ground (-)
|
||||
Green : UART_RX (USBL side)
|
||||
Yellow : UART_TX (USBL side)
|
||||
Pink : ground (-), connected to the blue wire inside USBL
|
||||
Gray : TRIGGER_IN (USBL side)
|
||||
White : TRIGGER_OUT (USBL side)
|
||||
|
||||
## Files description
|
||||
|
||||
```
|
||||
.
|
||||
├── communication.py
|
||||
├── interface.py
|
||||
├── kogger_protocol_driver.py
|
||||
└── test
|
||||
├── test_kogger_driver.py
|
||||
└── test_messages.bin
|
||||
```
|
||||
|
||||
### communication.py
|
||||
|
||||
Test all functions from kogger\_protocol\_driver.py
|
||||
|
||||
### interface.py
|
||||
|
||||
Open a tkinter interface with all kogger\_protocol\_driver functions.
|
||||
|
||||
### kogger\_protocol\_driver.py
|
||||
|
||||
Driver for kogger device
|
||||
|
||||
### test folder
|
||||
|
||||
Contains tests function for kogger\_protocol\_driver.
|
||||
|
||||
#### Raspberry connection to Kogger
|
||||
|
||||
+-----------------+ +---------------+ +------------+
|
||||
| | | | | |
|
||||
| RASPBERRY PI 4 o---USB---o Convertisseur o---UART--o Antenne |
|
||||
| | | USB-vers-UART | (TX,RX, | Kogger |
|
||||
| | | | GND) | |
|
||||
+-----------------+ +---------------+ +------------+
|
||||
|
||||
#### USV / Boat side
|
||||
|
||||
Launch :
|
||||
|
||||
```
|
||||
cd test
|
||||
./test_usv.py
|
||||
```
|
||||
|
||||
#### AUV / Sub side
|
||||
|
||||
Launch :
|
||||
|
||||
```
|
||||
cd test
|
||||
./test_auv.py
|
||||
```
|
||||
|
||||
|
||||
# Analyze koggerApp
|
||||
|
||||
bb55 00 8b 11 00 xx 9cc3
|
||||
Header Route Mode ID Length Payload Check
|
||||
|
||||
On boot :
|
||||
A TX payload […]:
|
||||
- bb55008b11009cc3
|
||||
- bb5500931100a4db
|
||||
- bb550083100100943e
|
||||
- bb550083130096af
|
||||
- bb550083120095ad
|
||||
- bb550083150098b3
|
||||
- bb550083140097b1
|
||||
- bb5500832000a3c9
|
||||
- bb55008b2000abe1
|
||||
- bb5500932000b3f9
|
||||
- bb55008318054a5d6bc9017c98
|
||||
- bb55008b18054a5d6bc90184d8
|
||||
- bb550
|
||||
|
||||
A RX payload:
|
||||
- bb5500c91103049cc3401e
|
||||
- bb5500d1110304a4db6876
|
||||
- bb5500c1100304943eaa54
|
||||
- bb5500c113030496af20d8
|
||||
- bb5500c112030495ad1ccf
|
||||
- bb5500c1150304 98b328ea
|
||||
- bb5500c114030497b124e1
|
||||
- bb5500412022000f00000000000078fe6b94000203000000000000000000000000000000000000000c32
|
||||
- bb5500c120 0301a3c95144
|
||||
- bb5500c9200305abe17da8
|
||||
- bb550051200900000f0002000003018f00
|
||||
- bb5500d1200305b3f9a500
|
||||
- bb5500c11803047c98f4a6
|
||||
- bb5500c91803 0484d84426
|
||||
- bb5500d11803048a870111
|
||||
|
||||
## Conclusion :
|
||||
|
||||
Host : read 0x10, 0x11, 0x12, x13, x14, x15, x18, x20
|
||||
0x10 : ID_DATASET
|
||||
- bb550083100100943e
|
||||
- bb5500c1100304943eaa54
|
||||
0x11 : ID_DIST_SETU
|
||||
0x12 : ID_CHART_SETUP
|
||||
0x14 : ID_TRANSC
|
||||
0x15 : ID_SND_SPD
|
||||
0x18 : ID_UART
|
||||
0x20 : ID_VERSION
|
||||
|
||||
# Kogger number
|
||||
|
||||
## USV to AUV
|
||||
|
||||
0 : DISARM Set AUV to DISARM
|
||||
1 : DEPTH_HOLD Set AUV to fixed DEPTH
|
||||
2 : Pause?
|
||||
3 : MISSION_DEPTH Go to mission on DEPTH_HOLD
|
||||
4 : MISSION Go to mission on ALT_HOLD
|
||||
5 : SURFACE Go to SURFACE
|
||||
6 : USBL_MODE_RESP Set USBL AUV as response
|
||||
7 : USBL_MODE_TRAN Set USBL AUV as transponder
|
||||
8 :
|
||||
|
||||
## AUV to USV
|
||||
|
||||
0 : DISARM AUV is DISARMED
|
||||
1 : DEPTH_HOLD AUV is at fixed DEPTH
|
||||
2 : Pause?
|
||||
3 : MISSION_DEPTH AUV is in mission on DEPTH_HOLD
|
||||
4 : MISSION AUV is in mission on ALT_HOLD
|
||||
5 : SURFACE AUV is going to to SURFACE
|
||||
6 : RECOVER_STUCK AUV is in recover_stuck or recover_stuck_random
|
||||
7 : HARDWARE_FAIL AUV is in emergency and is going to surface
|
||||
8 : EMERGENCY_STUCK AUV is stuck
|
||||
|
||||
## Kogger transfer in the air
|
||||
|
||||
-------------------------------------
|
||||
Pinger sending | Responder receiving
|
||||
0 | 5
|
||||
1 | 2
|
||||
2 | 1
|
||||
3 | 4
|
||||
4 | 3
|
||||
5 | 0
|
||||
6 | 6
|
||||
7 | 7 OR 3 OR 5
|
||||
8 | 8 OR 255
|
||||
-------------------------------------
|
||||
|
||||
# Python info
|
||||
|
||||
## struct.unpack
|
||||
|
||||
- ? : bool (1B)
|
||||
- b : int8 (1B)
|
||||
- B : uint8 (1B)
|
||||
- h : int16
|
||||
- H : uint16
|
||||
- i : int32
|
||||
- I : uint32
|
||||
- f : float (4B)
|
||||
- d : double(8B)
|
||||
- q : int64
|
||||
- Q : uint64
|
||||
|
||||
# Test multi-antenna
|
||||
|
||||
From test/test_multi_antenna.py we can try a multi-antenna with time syncho.
|
||||
|
||||
## In spiral mode
|
||||
|
||||
### From USV/Slave
|
||||
|
||||
```
|
||||
./test_multi_antenna.py /dev/ttyUSB0 0 2
|
||||
```
|
||||
|
||||
### From AUV/Master
|
||||
|
||||
Where every lines is an AUV :
|
||||
```
|
||||
./test_multi_antenna.py /dev/ttyUSB1 1 2
|
||||
./test_multi_antenna.py /dev/ttyUSB2 2 2
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user