PyGate - different spreading factors for each channel possible?



  • Hi all, I'm undertaking a LoRa research project. I need to know whether it is possible to configure the PyGate so that it is possible to transmit and receive on different SFs simultaneously. I do not currently have a PyGate so have only the online resources. I notice in the getting started tutorial for the PyGate there is an item in the config.json:

    		"chan_Lora_std": {
    			"enable": true,
    			"radio": 1,
    			"if": -200000,
    			"bandwidth": 250000,
    			"spread_factor": 7
    		},
    

    I am assuming the above sets the SF of the second transceiver, is it possible to set the SF of the first transceiver differently?

    Many thanks!
    Rupert



  • @jcaron Right okay. Ah yes I saw the RAK wireless - shame about the price or I feel it would be perfect for my needs. Hopefully the pygate will provide enough functionality for some prototyping and testing - otherwise I'll shift my focus on to standard LoRa nodes.



  • @Rupert-Smith In that price range there's TTN's indoor gateway, though I have no idea if you can easily get it to do something different from its intended gateway role. And you'll probably lack all sorts of I/O you may need.

    A bit more expensive is the new RAK Wireless RAK2247 (but like the Pygate, it needs to be paired with another board with a controller).

    However in all cases you're probably up for quite some hands-in-the-engine time for anything that isn't a regular LoRaWAN gateway.



  • @jcaron I thought that might be the case! Haha yes you're right and it's just another thing I can write about in the risk assessment. Because the funds aren't coming out of my pocket its definitely worth a try - from what I can see there are no other products anywhere near this price range that would allow such functionality.



  • @Rupert-Smith I’m pretty sure the Pygate hardware is capable of doing raw LoRa, but I’m not sure at all the firmware allows it, though I haven’t looked into it at all. You’re probably in for a wild ride. But that’s where all the fun is :-)



  • @jcaron I appreciate your time responding to my queries thank you - my ideas and ramblings are quite vague because at this moment I'm not entirely sure what's possible and what's not (which I suppose is the purpose of this university project).

    I don’t know if you plan the devices to talk to each other directly or through a gateway?

    I should probably clarify - I do not need robots to send directly to each other. E.g. if I have 3 robots, I do not require 1 to be able to send a message with 2 as the only intended recipient - they simply broadcast to any in range. The communication shouldn't be going via a gateway. In fact I'm not really using the gateways as gateways insofar as I just want them for their ability to listen on lots of channels at once. But lets say I have 3 gateways A, B and C that are all within close proximity. If A broadcasts a message, B and C should receive this message directly. Then B may broadcast a message and A and C should receive it. I am very new to LoRa however my basic understanding is that for this project I won't be using LoRaWAN - the Pygate is a node and is not relaying information or connected to the internet.

    So I guess my question is - can I use the Pygate for raw LoRa alone? I.e. can I just make use of the radio hardware (i.e. it's multiple channels) as if it is a standard LoRa sensor node but with the ability to listen to multiple channels?

    Also, even though this is a minor issue on your case, if you want the devices to receive information from others at any time, that means they need to be constantly receiving, which means a higher power draw.
    I understand this - however the devices will be powered by robots with considerable battery capacity - i.e. sometimes the motors will be drawing tens of amps to clear obstacles so I'm assuming in comparison the radio will be drawing very little current.



  • @Rupert-Smith there are a few things which may raise issues in your description.

    I don’t know if you plan the devices to talk to each other directly or through a gateway?

    If the former, then you would probably use raw LoRa for inter-device communication but LoRaWAN with the gateway. But switching from one to the other is not quite supported. If you wish to use raw LoRa for everything, I’m not sure the Pygate supports this.

    If the latter, then if the gateway needs to relay everything, this may quickly exceed duty cycle limits.

    Also, even though this is a minor issue on your case, if you want the devices to receive information from others at any time, that means they need to be constantly receiving, which means a higher power draw.



  • @jcaron Yes of course, the purpose of the communication here is not real-time coordination. I'm talking about sparse swarms here where you could have say 3 robots working in a forest over a large area to monitor environmental conditions. They may wish to send their current location every 10 minutes or so that they have a general awareness of where others are.

    Sorry I should have been more clear what I meant; by nature of the transmission, I mean what's the context under which the data is being sent. Is it for example like the example above where a robot wants to send it's location to as many robots in the vicinity possible (e.g. perhaps it is stuck or has run out of battery) - in this case a higher SF should be used to maximise the range and the low data rate isn't an issue since it is a small payload and sent very infrequently. But another context could be there are two robots now in close proximity, and one wants to learn information from the other about the terrain (e.g. where are avoid locations such as bogs and water), clearly this is going to be a larger payload and may require multiple transmissions so a lower SF would be desirable (because as you mentioned, due to the 1% duty cycle restriction it would take an age to send via SF12).



  • @Rupert-Smith make sure you correctly read through the limitations of LoRa (or, more precisely, the limitations on the use of the frequency bands set by national/supranational authorities). They vary from region to region, but in most regions you shouldn’t expect to be able to transmit real-time data anywhere near continuously. And of course much much less for the gateway.

    Also I’m not sure I understand why you would change the SF based on “the nature of the transmission”? The SF has an influence on the minimum signal level detectable by the receiver, so in theory on the range, and is usually more a factor of the distance (and/or obstacles) rather the data sent. Slower data rates also seem to have more issues with mobile nodes.



  • @jcaron Thank you that's very helpful! A complete misunderstanding on my part I should have read the docs. Sounds like the PyGate is perfect for my needs - I'm researching the use of gateways for swarm robotics to create a decentralised network. The idea by using a gateway the robots can utilise different spreading factors depending on the nature of the transmission required but there be no need for all robots in the vicinity to agree on these parameters. I just needed to know whether multiple SFs and frequencies could be listened to simultaneously and clearly this is the case :)



  • @Rupert-Smith chan_Lora_std and chan_FSK are additional channels. chan_Lora_std only listens on a single frequency+SF+BW.

    Most of the channels are defined with the chan_multiSF_X entries, and can receive on any SF on that channel with BW125.

    From the Pygate spec sheet (but this is mostly from the Semtech documentation, I believe):

    IF0 to IF7 LoRa Channels

    Those channels can be connected individually to Radio A or B. The channel bandwidth is 125 kHz and cannot be modified or configured. Each channel IF frequency can be individually configured. On each of those channels any data rate can be received without prior configuration. Several packet using different data rates may be demodulated simultaneously even on the same channel.

    (...)

    The SX1308/ SX1301 digital baseband chip scans the 8 channels (IF0 to IF7) for preambles of all data rates at all times. The chip is able to demodulate simultaneously up to 8 packets. Any combination of up to 8 packets is possible (e.g. one SF7 packet on IF0, one SF12 packet on IF7 and one SF9 packet on IF1 simultaneously). The SX1308/ SX1301 can detect simultaneously preambles corresponding to all data rates on all IF0 to IF7 channels. However it cannot demodulate more than 8 packets simultaneously.

    IF8 LoRa Channel

    This channel can be connected to Radio A or B using any arbitrary intermediate frequency within the allowed range. This channel is LoRa only. The demodulation bandwidth can be configured to be 125, 250 or 500 kHz. The data rate can be configured to any of the LoRa available data rates (SF7 to SF12) but, as opposed to IF0 to 7, ONLY the configured data rate will be demodulated.

    IIRC there's however something which prevents some combinations of RX and TX at the same time. What's the exact use case you're considering?


Log in to reply
 

Pycom on Twitter