class GATTSCharacteristic - constraints of characteristic.value([value])

  • Hi,

    I understand that characteristic.value() can take an integer, a string or a bytes object. What are the bounds / size constraints?

    It looks like when the bytes object has more than 3 bytes, the WiPy does a core dump when the client attempts a read of the characteristic. See below - the characteristic value auto increments, and can be read successfully. However, as soon as the value is carrying 4 bytes, the read from the client causes a core dump.

    Read request, returning value = b'228'
    Read request, returning value = b'235'
    Client disconnected
    Client connected
    Read request, returning value = b'755'
    Client disconnected
    Client connected
    Guru Meditation Error of type LoadProhibited occurred on core 0. Exception was unhandled.
    Register dump:
    PC : 0x400dfc17 PS : 0x00060b30 A0 : 0x8016169c A1 : 0x3fff71a0
    A2 : 0x00000001 A3 : 0x00000005 A4 : 0x3fff7430 A5 : 0x00000b27
    A6 : 0x0000002b A7 : 0x00000097 A8 : 0x3ffe2034 A9 : 0x3fff7400
    A10 : 0x00000003 A11 : 0x3ffc410c A12 : 0x00060d20 A13 : 0x3fff7478
    A14 : 0x01010001 A15 : 0x3fffb4a8 SAR : 0x00000008 EXCCAUSE: 0x0000001c
    EXCVADDR: 0x00000b41 LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0xffffffff

    Backtrace: 0x400dfc17:0x3fff71a0 0x4016169c:0x3fff7430 0x4015ea17:0x3fff7470

    ================= CORE DUMP START =================


Pycom on Twitter