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

    Sigfox message Query

    Scheduled Pinned Locked Moved SiPy
    3 Posts 2 Posters 30 Views 2 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.
    • P Offline
      pmulvey
      last edited by

      If I put a byte such as ascii 159 (hex 9F) into the message the system sends C29F. If the value corresponds to a printable acsii character such as "A" it sends 41 which is the hex value for "A". I have encoded a temperature value into a single byte but when this is above a certain value the systems sends two bytes. Any Ideas??

      J P 2 Replies Last reply Reply Quote 0
      • J Offline
        jcaron @pmulvey
        last edited by

        @pmulvey it looks like you have a conversion to UTF-8 encoding happening somewhere.

        Difficult to know exactly at which point this is happening without more details, though.

        1 Reply Last reply Reply Quote 1
        • P Offline
          pmulvey @pmulvey
          last edited by pmulvey

          @pmulvey Solved. I put my encoded bytes into a bytearray and passed this to socket. send. It was this method that was adding bytes to any value >127. So this method seems to be implementing utf-8. It obviously can distinguish between me passing chr(0x9f) and 'b/x9f'.

          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