Skip to content

data drop sending long strings #182

Open
@craiq

Description

@craiq

Hi,
according to several issues adressing data drop, my problem could not be solved by those fixes yet.

Setup:
Win10 x64
Arduino IDE 1.8.6
bleuart sketch in full debug mode
Android Bluefruit LE App

Sending string from Bluefruit LE App via Uart to the Board.

Example String to send:

{
    "id": 1,
    "name": "Leanne Graham",
    "username": "Bret",
    "email": "[email protected]",
    "address": {
      "street": "Kulas Light",
      "suite": "Apt. 556",
      "city": "Gwenborough",
      "zipcode": "92998-3874",
      "geo": {
        "lat": "-37.3159",
        "lng": "81.1496"
      }
    },
    "phone": "1-770-736-8031 x56442",
    "website": "hildegard.org",
    "company": {
      "name": "Romaguera-Crona",
      "catchPhrase": "Multi-layered client-server neural-net",
      "bs": "harness real-time e-markets"
    }
  }

What I reveived:

{ "id": 1, "name": "Leanne Graham", "use{ "lat": "-37.3159",na", "catchPhrase": t-server neural-net"l-time e-markets" } }

I tried the pull request #178 , but it could not solve this problem.

Is there any other boundry, why this might not work?

What I realised is that up to 20 bytes it's safe to send data. Bigger junks are very likely to drop data.

Full Serial Log:

Bluefruit52 BLEUART Example
---------------------------

[CFG   ] SoftDevice's RAM requires: 0x20002CE8
Please use Adafruit's Bluefruit LE app to connect in UART mode
Once connected, enter character(s) that you wish to send

BSP Library     : 0.8.5
Firmware        : S132 5.1.0, 5.1.0 dual banks
Serial No       : 6F3Fxxxxx

--------- SoftDevice Config ---------
Max UUID128     : 10
ATTR Table Size : 2048
Service Changed : 0
Peripheral Connect Setting
  - Max MTU         : 247
  - Event Length    : 6
  - HVN Queue Size  : 3
  - WrCmd Queue Size: 1

--------- BLE Settings ---------
Name            : Bluefruit52
Max Connections : Peripheral = 1, Central = 0 
Address         : FD:9D:0C:BA:D2:AF (Static)
TX Power        : 4 dBm
Conn Intervals  : min = 20.00 ms, max = 30.00 ms
Peripheral Paired Devices: 

Central Paired Devices: 


[BLE   ] BLE_GAP_EVT_CONNECTED : Conn Handle = 0
[GAP   ] Conn Interval= 48.750000
[BLE   ] BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP : Conn Handle = 0
[GATTS ] Confirm received handle = 0x0000
Connected to Galaxy S7
[BLE   ] BLE_GAP_EVT_CONN_PARAM_UPDATE : Conn Handle = 0
[GAP   ] Conn Interval= 30.000000
[BLE   ] BLE_GAP_EVT_CONN_PARAM_UPDATE : Conn Handle = 0
[GAP   ] Conn Interval= 7.500000
[BLE   ] BLE_GAP_EVT_CONN_PARAM_UPDATE : Conn Handle = 0
[GAP   ] Conn Interval= 30.000000
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's cccd
00:  01 00
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's cccd
00:  00 00
[BLE   ] BLE_GATTS_EVT_SYS_ATTR_MISSING : Conn Handle = 0
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's cccd
00:  01 00
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's value, uuid = 0x0002
00:  7B 20 22 69 64 22 3A 20 31 2C 20 22 6E 61 6D 65
10:  22 3A 20 22
[BLEUART] RX: 
data: 7b 20 22 69 64 22 3a 20 31 2c 20 22 6e 61 6d 65 22 3a 20 22 
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's value, uuid = 0x0002
00:  4C 65 61 6E 6E 65 20 47 72 61 68 61 6D 22 2C 20
10:  22 75 73 65
[BLEUART] RX: 
data: 4c 65 61 6e 6e 65 20 47 72 61 68 61 6d 22 2c 20 22 75 73 65 
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's value, uuid = 0x0002
00:  7B 20 22 6C 61 74 22 3A 20 22 2D 33 37 2E 33 31
10:  35 39 22 2C
[BLEUART] RX: 
data: 7b 20 22 6c 61 74 22 3a 20 22 2d 33 37 2e 33 31 35 39 22 2c 
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's value, uuid = 0x0002
00:  6E 61 22 2C 20 22 63 61 74 63 68 50 68 72 61 73
10:  65 22 3A 20
[BLEUART] RX: 
data: 6e 61 22 2c 20 22 63 61 74 63 68 50 68 72 61 73 65 22 3a 20 
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's value, uuid = 0x0002
00:  74 2D 73 65 72 76 65 72 20 6E 65 75 72 61 6C 2D
10:  6E 65 74 22
[BLEUART] RX: 
data: 74 2d 73 65 72 76 65 72 20 6e 65 75 72 61 6c 2d 6e 65 74 22 
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's value, uuid = 0x0002
00:  6C 2D 74 69 6D 65 20 65 2D 6D 61 72 6B 65 74 73
10:  22 20 7D 20
[BLEUART] RX: 
data: 6c 2d 74 69 6d 65 20 65 2d 6d 61 72 6b 65 74 73 22 20 7d 20 
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's value, uuid = 0x0002
00:  7D 0A
[BLEUART] RX: 
data: 7d 0a 
{ "id": 1, "name": "Leanne Graham", "use{ "lat": "-37.3159",na", "catchPhrase": t-server neural-net"l-time e-markets" } }
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's cccd
00:  01 00
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's cccd
00:  00 00
[BLE   ] BLE_GATTS_EVT_WRITE : Conn Handle = 0
[GATTS ] attr's cccd
00:  00 00
[BLE   ] BLE_GAP_EVT_DISCONNECTED : Conn Handle = 0
[GAP   ] Disconnect Reason 0x13

Disconnected
[BLE   ] BLE_GAP_EVT_TIMEOUT : Conn Handle = 65535

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions