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

    lopy received data into text conversion

    Scheduled Pinned Locked Moved LoPy
    lopy lora
    10 Posts 3 Posters 1.3k 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.
    • N Offline
      nilam
      last edited by

      how to convert lopy lora received data into text.

      1 Reply Last reply Reply Quote 0
      • sebS Offline
        seb
        last edited by

        We are going to need more details about the format of the incoming data before we can help you out

        N 1 Reply Last reply Reply Quote 0
        • N Offline
          nilam @seb
          last edited by nilam

          @seb Thank you for reply.
          I am receiving 'Hello mitcoe' message from USRP B200 in gnuradio by using matt gr lora transmitter with udp socket source.

          1 Reply Last reply Reply Quote 0
          • sebS Offline
            seb
            last edited by

            @nilam said in lopy received data into text conversion:

            matt gr lora

            Are you using LoRaWAN or raw LoRa?

            N 1 Reply Last reply Reply Quote 0
            • N Offline
              nilam @seb
              last edited by nilam

              @seb Raw LoRa

              @seb when i send using UDP socket, i dont receive anything.
              but when i send using file souce with 'Hello mitcoe' at hundreds of lines, it receives some things like this
              Received data:
              b'\xed\xe7\xe1\xfe\x00MB'

              sebS 1 Reply Last reply Reply Quote 0
              • N Offline
                nilam
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • sebS Offline
                  seb @nilam
                  last edited by

                  @nilam

                  Can you share your code so I can get a better understanding of what is going on

                  N 1 Reply Last reply Reply Quote 0
                  • J Offline
                    jcaron
                    last edited by

                    You may want to check if changing rx_iq helps.

                    N 1 Reply Last reply Reply Quote 0
                    • N Offline
                      nilam @seb
                      last edited by

                      @seb import ubinascii
                      from network import LoRa
                      from machine import Pin
                      import socket
                      import machine
                      import time

                      lora = LoRa(mode=LoRa.LORA, frequency=868000000, tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=8, preamble=8, coding_rate=LoRa.CODING_4_8, power_mode=LoRa.ALWAYS_ON, tx_iq=False, rx_iq=False, adr=True, public=True, tx_retries=1, device_class=LoRa.CLASS_A)

                      s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
                      s.setblocking(False)
                      while True:
                      data = s.recv(64)
                      if(data):
                      print("Received data: "+"\n1",data)
                      print ("2",data.decode('utf-8'))
                      print("3",ubinascii.hexlify(data))

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        nilam @jcaron
                        last edited by nilam

                        @jcaron Rx_iq set to False. if i set it True, lopy does not receive any data.
                        how can i set sampling rate?

                        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