Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

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

    Scheduled Pinned Locked Moved WiPy 2&3
    bluetoothcharacteristic
    1 Posts 1 Posters 808 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      lcgeldenhuys
      last edited by

      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 =================
      EC0AABAAAABsAQAA
      GHX/P+Bw/z8Mdf8/
      EHT/P6B0/z+lpaWlNDr8PzQ6/D8Ydf8/LDr8PwUAAABEaP8/RGj/Pxh1/z8AAAAA
      FAAAABBp/z9CdGNfdGFzawClpaWlpaUAAAAAAAx1/z8AAAAAIA0GABQAAAAAAAAA

      Lourens

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • 1 / 1
      • First post
        Last post

      Pycom on Twitter

      Pycom