Fixed packets to be sent in an interval



  • Hello,
    To best understand the loss rates for LoRa, i am keen on sending some packets of fixed data size and transmit to the receiver over an interval.

    I can get this done for TCP sockets using the time module but for some reason the utime.time() does not seem to work for me.
    Any suggestions on how to send packets for some time in equal intervals so that can calculate the packets received at the other end and calculate the loss rates?



  • @snehasg96 Can you try the same thing with utime.sleep() instead? I haven't tried it myself yet, but I plan to do so.



  • @bmarkus I am using 2 LoPy's. The receiving end is also a lopy device with an antenna.



  • @snehasg96 What is at the receiving end, is it a gateway with SX1301/1308 or a device?



  • @eric73 Hi ! I am using LoRA RAW. here is how i initialize it..

    lora = LoRa(mode=LoRa.LORA, region=LoRa.US915)
    s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)

    When i dont specify SF does it take a default value of 6/7 ?



  • @snehasg96 In fact LoraWAN-US915 is more restrictive than EU868, you can read it here

    In other point, please be more clear in your test setup. Do you use LoraRAW or LoraWAN ?

    Witch SF you use ?



  • @paul-thornton I tested sending out packets every 5 seconds using time.sleep(5) for 2 minutes using utime.time(). It is kind of weird why the code runs once and sometimes it doesnt until the next day morning I try. Also when it runs it keeps sending packets until 20 and freezes at that point. So i have to kill the application reset and run again but would freeze again.

    My thoughts

    1. Am i violating the fair policy? I am in the USA and I dont think there exists this duty cycle regulations( I see it for EU bands but not US ones)

    2. I am sending 5 bytes every 5 seconds for a period of 2 mins. Should i modify the time parameter or something.

    Your direction will be much helpful sir.



  • what issue are you having with utime.time() is it throwing errors or simply being inaccurate?



Pycom on Twitter