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

    LoRa-Raw: Cannot transmit more than 64B

    Scheduled Pinned Locked Moved LoPy
    lopylorasocket
    5 Posts 3 Posters 1.7k Views 3 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.
    • S Offline
      stef
      last edited by

      Hi all ,
      I'm going for some test with two lopy and LoRa send/receive exemples.
      All is working well except that i can't send more than 64 bytes.

      my code is very basic:

      on each Lopy:
      lora.init(mode=LoRa.LORA, frequency=868000000, power_mode=LoRa.ALWAYS_ON , tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False)

      I have already changing BW(500-250-125) and sf(7-8-9) without any luck.

      when i try:
      string='123.....4' (64 char)
      s.send(string)
      -> Ok ( other side receive and print the string on the terminal)

      But when i try:
      string='123.....5' (65 char)
      s.send(string)
      -> nothing on the other side ( just 'b' )

      Don't saw anything about socket buffer or else .
      If someone got an idea ...

      Thanks in advance.
      Stéphane A.

      1 Reply Last reply Reply Quote 0
      • B Offline
        bucknall
        last edited by

        Hi @stef could you post you receiving code, please?

        I believe it has to do with the buffer that you are storing your incoming data.

        Thanks!

        Alex

        Developer Evangelist - Pycom

        1 Reply Last reply Reply Quote 0
        • S Offline
          stef
          last edited by

          Hi bucknall,
          The receive code was simplified to see what is coming .
          here it is:

          s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
          s.setblocking(False)

          while True:
          data=s.recv(256)
          print(data)
          time.sleep(2)

          1 Reply Last reply Reply Quote 0
          • C Offline
            Clemens
            last edited by

            Btw what is the maximum payload for the LoRa module? I've seen different numbers from 64 to 256. Is the physically maximum hardware payload also the maximum I can send or is there any abstraction in the software so a bigger dataset is automatically divided and send by multiple packages. I'm coming from the RFM69 world so I'm not too confident with your hardware setup. But based on rumors your LoRa hardware could be the same as in the RFM95 modules. ;-)

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              stef @Clemens
              last edited by

              @Clemens
              Thank you Clemens to pointing this out for me ,
              Actually the Maximum Payload is 64B for the Lopy .
              i was thinking that packets were cut internally but not.
              Nice to see that no one had this problem before.

              I have already bypassed the problem by cutting the packets.

              Thanks again .

              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