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

    Receiving downlink packets (e.g join-accept) does not work

    Scheduled Pinned Locked Moved FiPy
    1 Posts 1 Posters 21 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.
    • D Offline
      dromero
      last edited by

      Hi all, I am trying to sniff downlink packets (e.g. join-accept) by using the FiPy device, but I am not able to receive any data.

      As it is detailed here: https://www.thethingsnetwork.org/docs/lorawan/frequency-plans.html#eu863-870 I am using the "869.525 - SF9BW125 (RX2 downlink only)" frequency, SF and BW. (In order to do the tests I have another FiPy device, which connects to the TTN network (OTAA) and sends some UP packets repeatedly) - I have also tried to send some downlink packets from the TTN console.

      Same tests were done with other UP frequencies such as 868100000 and it worked well. Do you know what I am doing wrong?

      Thanks!

      Code in use:

      from network import LoRa
      import binascii
      import socket
      import time
      
      _frequency   = 869525000 
      _tx_power    = 14
      _bandwidth   = LoRa.BW_125KHZ
      _sf          = 9
      _preamble    = 8
      _coding_rate = LoRa.CODING_4_5
      _power_mode  = LoRa.ALWAYS_ON
      
      lora = LoRa(mode=LoRa.LORA, frequency=_frequency, tx_power=_tx_power, bandwidth=_bandwidth,
          sf=_sf, preamble=_preamble, coding_rate=_coding_rate, power_mode=_power_mode)
      
      print("[*] fq:%d sf:%d bw:%d" % (_frequency, _sf, _bandwidth))
      
      s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
      s.setblocking(False)
      
      while True:
          response=s.recv(1024)
          if len(response) > 0:
              print("[*] Packet received: %s" % binascii.hexlify(response))
              response = ""
      
      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