Long time before transmitting a packet.
For some reason, some times lopy boards (Tx and Rx) takes almost up to 5 minutes before one packet gets sent to the receiver. Other times, it immediately starts sending when powered up.
What could be the reason?
@robert-hh Thanks alot for your insight. That was so helpful. I had forgot to mention that I had uploaded both these codes permanently using Filezilla and use the VSC to just connect and it automatically starts to send packets.
May I ask what command u use in putty to run these scripts? I would login using the address : 192.168.4.1. and how do i go about running the main.py code in the receiver?
Regarding the SF, I have not used any of that now which I assume will take the default value 6 in the initialization : lora = LoRa(mode=LoRa.LORA, region=LoRa.US915) ? Correct me if I am wrong.
Also Thanks for your comments. I will be certain of what I am doing right now.
@snehasg96 you have to permantly upload the files. If for instance you call them send.py and recv.py, you can start them from main.py yb including the statement:
So do not use Run by pymaker but upload. Personally i do not use pymakr. It hides to much what it doing. I use something like Putty (Windows) or screen (OS X) or picocom (Linux) for the REPL prompt and Filezilla for file transfer. That is less comfortable but it is always obvious in which state the board is.
Lora is pretty sensitive and designed for longer distances. Depending on the set-up, you should see some packet loss at a distance of 500m and more. In my tests in a normal living area reception was OK up to 3km distance, and some packets were picked up by gateways 7 km away.
You could force worse reception, e.g. by not aligning the antennas (one upright, one horizontal) or use lower SF values. But still you need some distance between the units to get receive error.
@robert-hh Thanks for your prompt message.
I am using the PyMAKR pluggin for VSC. Also I am using an expansion board. I am quite not sure how to execute this script in Putty.
But please do let me know if its okay to position my boards at some distance and then go and manually press the reset button and record the loss rates?
Also I have tested it up to 65 meters. Any idea up till what distance I should be testing this to see some packet loss?
And, with regards to the initialization does it seem right to you?
Connecting on the port(COM 5) forever
So this message comes from Pymakr with Atom or VSC? What happens if you connect to the board with more simple tools like Putty, which, when connected stay that way?
What kind of interface board are you using? Expansion Board or another one? I'm trying to sort out other problems, because your scripts look fine.
This post is deleted!
@snehasg96 I do not understand your finding. Since the socket you use at the receiver side is blocking, it means that anytime your script prints "received" then you received something.
Do these "Received" message start immediately of after 5 minutes?
jcaron last edited by
@snehasg96 Can you add time information in your logs, and provide the source code for the sending side?
This post is deleted!
Paul Thornton last edited by
@snehasg96 Could you post your code.
Is it actually 5 minuites before any attempts to send are made. or is it actually 5 minuites before the receiving node gets the data but its been trying to send all along?
@bmarkus LoRA RAW socket
lora = LoRa(mode=LoRa.LORA, region=LoRa.US915)
s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
bmarkus last edited by
@snehasg96 Which mode, protocol?