nRF UART central data send error

I'm trying to connect a nRF52832 DK to a secondary device (BLUETOOTH LOW ENERGY TINYSHIELD (ST)) where the nRF is the central. The example correctly connects to the board when it starts advertising but when I enter data over UART via PuTTY, I'm faced with an error (128).

I've tried to connect to a nRF52840 dongle with nRF connect and an Android phone setup with the UART service UUID and UART TX / UART RX characteristics. This behaves the same.

My second thought was that it has to do with security/bonding. However, since this is initiated from the Central, this would've been included in the NUS service included in the example so this doesn't seem correct. 

Since the error (128) means socket not connected, I figured there must be something wrong with the connection. I've tried to modify &nus_client in bt_nus_client_send() to NULL so it would be sent to any connection available. However, this results in an 'Operation already in progress' error (120). 

Any idea what I'm missing?

Parents
  • Hi Simon,

    I've included the content of the .ncs file I use in nRF connect in the code block below. 

    The PuTTY window shows the characters I've entered in to the nRF52 DK which result in the error messages shown by the same nRF52 DK over RTT.

    I'm not able to send data any direction. When I enter data in nRF Connect to be sent via nRF Dongle I see nothing on the nRF52 DK (RTT nor UART). When I enter data via UART to be sent to the nRF Dongle / nRF Connect I get the error message highlighted in yellow via RTT.

    {"selectedComponent":"local.server.4.6","showingDeleteDialog":false,"showingApplyDialog":false,"showingClearDialog":false,"children":{"local.server.1":{"instanceId":"local.server.1","uuid":"1800","name":"Generic Access","expanded":false,"discoveringChildren":false,"children":{"local.server.1.1":{"instanceId":"local.server.1.1","uuid":"2A00","name":"Device Name","value":[110,82,70,53,117],"properties":{"read":true,"write":true},"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":false,"discoveringChildren":false,"children":{},"errorMessage":null},"local.server.1.2":{"instanceId":"local.server.1.2","uuid":"2A01","name":"Appearance","value":[0,0],"properties":{"read":true},"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":false,"discoveringChildren":false,"children":{},"errorMessage":null},"local.server.1.3":{"instanceId":"local.server.1.3","uuid":"2A04","name":"Peripheral Preferred Connection Parameters","value":[255,255,255,255,0,0,255,255],"properties":{"read":true},"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":false,"discoveringChildren":false,"children":{},"errorMessage":null}}},"local.server.2":{"instanceId":"local.server.2","uuid":"1801","name":"Generic Attribute","expanded":false,"discoveringChildren":false,"children":{}},"local.server.4":{"instanceId":"local.server.4","uuid":"6E400001B5A3F393E0A9E50E24DCCA9E","name":"UART over BLE2","expanded":true,"discoveringChildren":false,"children":{"local.server.4.5":{"instanceId":"local.server.4.5","uuid":"6E400002B5A3F393E0A9E50E24DCCA9E","name":"UART RX","value":[],"properties":{"broadcast":false,"read":false,"writeWoResp":true,"write":true,"notify":false,"indicate":false},"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":true,"discoveringChildren":false,"children":{},"errorMessage":null},"local.server.4.6":{"instanceId":"local.server.4.6","uuid":"6E400003B5A3F393E0A9E50E24DCCA9E","name":"UART TX","value":[],"properties":{"broadcast":false,"read":false,"write":false,"notify":true,"indicate":false},"readPerm":"encrypt","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":true,"discoveringChildren":false,"children":{"local.server.4.6.7":{"instanceId":"local.server.4.6.7","uuid":"2902","name":"Client Characteristic Configuration","value":[0,0],"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"errorMessage":null}},"errorMessage":null}}}}}

Reply
  • Hi Simon,

    I've included the content of the .ncs file I use in nRF connect in the code block below. 

    The PuTTY window shows the characters I've entered in to the nRF52 DK which result in the error messages shown by the same nRF52 DK over RTT.

    I'm not able to send data any direction. When I enter data in nRF Connect to be sent via nRF Dongle I see nothing on the nRF52 DK (RTT nor UART). When I enter data via UART to be sent to the nRF Dongle / nRF Connect I get the error message highlighted in yellow via RTT.

    {"selectedComponent":"local.server.4.6","showingDeleteDialog":false,"showingApplyDialog":false,"showingClearDialog":false,"children":{"local.server.1":{"instanceId":"local.server.1","uuid":"1800","name":"Generic Access","expanded":false,"discoveringChildren":false,"children":{"local.server.1.1":{"instanceId":"local.server.1.1","uuid":"2A00","name":"Device Name","value":[110,82,70,53,117],"properties":{"read":true,"write":true},"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":false,"discoveringChildren":false,"children":{},"errorMessage":null},"local.server.1.2":{"instanceId":"local.server.1.2","uuid":"2A01","name":"Appearance","value":[0,0],"properties":{"read":true},"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":false,"discoveringChildren":false,"children":{},"errorMessage":null},"local.server.1.3":{"instanceId":"local.server.1.3","uuid":"2A04","name":"Peripheral Preferred Connection Parameters","value":[255,255,255,255,0,0,255,255],"properties":{"read":true},"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":false,"discoveringChildren":false,"children":{},"errorMessage":null}}},"local.server.2":{"instanceId":"local.server.2","uuid":"1801","name":"Generic Attribute","expanded":false,"discoveringChildren":false,"children":{}},"local.server.4":{"instanceId":"local.server.4","uuid":"6E400001B5A3F393E0A9E50E24DCCA9E","name":"UART over BLE2","expanded":true,"discoveringChildren":false,"children":{"local.server.4.5":{"instanceId":"local.server.4.5","uuid":"6E400002B5A3F393E0A9E50E24DCCA9E","name":"UART RX","value":[],"properties":{"broadcast":false,"read":false,"writeWoResp":true,"write":true,"notify":false,"indicate":false},"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":true,"discoveringChildren":false,"children":{},"errorMessage":null},"local.server.4.6":{"instanceId":"local.server.4.6","uuid":"6E400003B5A3F393E0A9E50E24DCCA9E","name":"UART TX","value":[],"properties":{"broadcast":false,"read":false,"write":false,"notify":true,"indicate":false},"readPerm":"encrypt","writePerm":"open","fixedLength":false,"maxLength":20,"expanded":true,"discoveringChildren":false,"children":{"local.server.4.6.7":{"instanceId":"local.server.4.6.7","uuid":"2902","name":"Client Characteristic Configuration","value":[0,0],"readPerm":"open","writePerm":"open","fixedLength":false,"maxLength":20,"errorMessage":null}},"errorMessage":null}}}}}

Children
No Data
Related