Specifically, the example is examples/ble_central/ble_app_uart_c
I want to first verify my understanding of this example. In this example, should I be able to type in my terminal to send characters back and forth over bluetooth? This is my understanding of this example:
Device 1 <--> UART <--> Bluetooth <--> UART <--> Device 2
If that is the case, I'm struggling to get the example to do anything other than print "BLE UART central example started." in my terminal, and I can't really debug using gdb to see what's wrong because of some soft device stuff making gdb get stuck.
If I type some characters and press enter, I get the following error from RTT:
ble_nus_c: Connection handle invalid.
Is there something else I'm supposed to configure?
Update: I see how per https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fuart_example.html that I should be using central on one device and peripheral on another. Done that and now I can send from my peripheral to my central device. I cannot talk from my central device to my peripheral device though. whenever I try this, I get the following errors from RTT:
app: Connecting to target 3E0D9D17F3CC
app: Disconnected.
app: Disconnected. conn_handle: 0x0, reason: 0x3E
app: Connecting to target 3E0D9D17F3CC
app: Disconnected.
app: Disconnected. conn_handle: 0x0, reason: 0x3E
app: Connecting to target 3E0D9D17F3CC
app: Disconnected.
app: Disconnected. conn_handle: 0x0, reason: 0x3E
app: Connecting to target 3E0D9D17F3CC
app: Disconnected.
app: Disconnected. conn_handle: 0x0, reason: 0x3E
app: Connecting to target 3E0D9D17F3CC
app: ATT MTU exchange completed.
app: Ble NUS max data length set to 0xF4(244)
app: Discovery complete.
app: Connected to device with Nordic UART Service.