[ESP-IDF SPP] How to read RTS/DTR modem control signals via Bluetooth SPP?

cvaldess
Posts: 1
Joined: Thu Feb 12, 2026 5:46 pm

[ESP-IDF SPP] How to read RTS/DTR modem control signals via Bluetooth SPP?

Postby cvaldess » Thu Feb 12, 2026 5:50 pm

## [ESP-IDF SPP] How to read RTS/DTR modem control signals via Bluetooth SPP?

### Context
I'm building a Bluetooth audio interface for amateur radio (similar to Digirig/Signalink but wireless), where:
- ESP32-S3 acts as a bridge between PC/smartphone and radio
- Bluetooth A2DP for audio streaming ✅ (working)
- Bluetooth SPP for serial control ✅ (working for data)
- **Problem:** Need to read RTS signal for PTT (Push-To-Talk) control

### Architecture
```
PC running Direwolf/ARDOP TNC software
├─ Bluetooth A2DP (audio) → ESP32 → ES8388 codec → Radio
└─ Bluetooth SPP (serial port)
└─ RTS line → should trigger PTT GPIO
```

### Technical Question
The RFCOMM protocol (underlying SPP) supports **Modem Status Command (MSC)**
which emulates RS-232 control signals (RTS, CTS, DTR, DSR, DCD, RI) according
to ETSI TS 07.10 and Bluetooth spec v1.0B section 9.5.2.1.

However, the ESP-IDF SPP API (`esp_spp_api.h`) only exposes:
- `esp_spp_write()` / `esp_spp_read()` for data
- No functions to read modem control signals

### What I've checked:
✅ UART peripheral has `uart_get_rts()` - but this is for physical UART, not Bluetooth SPP
✅ Looked at `components/bt/host/bluedroid/api/include/api/esp_spp_api.h` - no MSC functions
✅ Checked examples `bt_spp_acceptor` / `bt_spp_initiator` - only data transfer

### Questions:
1. **Does ESP-IDF's Bluedroid stack support RFCOMM MSC at lower layers?**
2. **Is there an undocumented way to access modem signals via SPP?**
3. **Would I need to modify Bluedroid stack to expose MSC?**
- If yes, which files? (`rfcomm/rfc_port_if.c`?)
4. **Any alternative approaches?**
- In-band signaling (send "PTT_ON" commands in data stream)?
- USB CDC instead (has native RTS support)?

### Why this matters:
Standard ham radio TNC software (Direwolf, ARDOP, VARA) expects to control
PTT via serial RTS line. This is the industry-standard interface.

### Environment:
- ESP-IDF: v5.x (latest)
- Chip: ESP32-S3
- Use case: Amateur radio digital modes

Any guidance would be greatly appreciated! 🙏

Who is online

Users browsing this forum: Applebot and 4 guests