User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

Lora Gateway, Frequency and Antenna

Tue Jun 14, 2016 9:11 pm

Hi;

Just trying out my 2 x Lora boards, one mounted on a PiZero with PITS and the other in a shiny new RPi B 3 (just arrived from Mr DHL).

I am following Dave Akerman's guide, can anyone confirm the install process on this guide - is this for the receiving end? If so do I need to do anything on the Pi attached to the PITS which has the other Lora Board on or will the tracking software already installed on it star using the Lora board when it is attached? I installed it following the PITS manual.

1. When setting the frequency should it be set to something different than the PITS?
2. Does the LORA transmit / receive on USB?
3. What antenna would you recommend on the payload, I have a 434MHz stubby - this one: https://store.uputronics.com/index.php? ... duct_id=86,
4. What antenna should I use for receiving end (1./4 groundplane?).

That's all for now :-)

Many thanks
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

Re: Lora Gateway, Frequency and Antenna

Tue Jun 14, 2016 10:39 pm

Ok I have figured some (but not all) of this myself.

I have hopefully enabled Lora 0 on both boards and commented out Lora 1.
I have the frequency for Lora 0 set to 434.500 and my PITS to 434.250.
I have an antenna connected to the Lora antenna connector on both the transmitter and the receiver.

When I run lora gateway on the receiving end attached to my Pi 3 Channel 0 (LH side) is populated in the terminal window with info such as Channel 0 434.5000MHz etc but it is not receiving anything? Telem pkts and image pkts = 0. The receiving Lora Pi is NOT yet connected to the internet so curl is failing.

This is the console readout from the tracker:

Code: Select all

RASPBERRY PI-IN-THE-SKY FLIGHT COMPUTER
=======================================

RPi Hardware	: BCM2708
RPi Revision	: 900092
RPi Zero
PITS+ Board
Device Tree is disabled

RTTY Payload ID = 'CAEN_CP1'
Radio baud rate = 300
GPS Logging enabled
Telemetry Logging enabled
Camera (USB - fswebcam) Enabled
Adding custom camera parameters '' to raspistill calls
Image size changes at 2000m
RTTY Low image size 320 x 240 pixels
RTTY High image size 640 x 480 pixels
RTTY: 1 Telemetry packet every 4 image packets
RTTY: 60 seconds between photographs
Full Low image size 640 x 480 pixels
Full High image size 2592 x 1944 pixels
Full size: 60 seconds between photographs
GPS Power Saving = OFF
Switching GPS to flight mode above 1000 metres
LORA0 frequency set to 434.500
LORA0 Payload ID = 'CAEN_LORA_SKY'
LORA0 SSDV mode
LORA0 DIO0=6 DIO5=5
LORA0 Low image size 640 x 480 pixels
LORA0 High image size 1280 x 960 pixels
LORA0: 1 Telemetry packet every 20 image packets
LORA0: 30 seconds between photographs
LORA0 cycle time 15
LORA0 Slot 2
LORA0 Repeat Slot 6
LORA0 Uplink Slot 10
LORA0 Set To ASCII
LORA0 power set to 88h
LoRa channel 0 will Tx on calling frequency 434.475 every 20 packets
Frequency 434.250
MTX2 Frequency to be set to 434.2500MHz
MTX2 command  is @PRG_410E76A0
Frequency 434.250
MTX2 Frequency to be set to 434.2500MHz
MTX2 command  is @PRG_410E76A0
V2.4 or later board with I2C ADC
Interface eth0 has IP Address: 192.168.1.111
Channel 0 DIO0=6 DIO5=5
Setting LoRa Mode
Channel 0 frequency 434.500000 FrequencyValue = 6CA000h
Mode = 0
SDA/SCL = 2/3
Found file /home/pi/pits/tracker/images/RTTY/22_25_13.jpg to convert
Listening on channel 0
Setting flight mode
Free SD space = 27984.8MB
Interface eth0 has IP Address: 192.168.1.111
Free SD space = 27984.7MB
File ssdv_done_0 found
File ssdv_0_1.bin opened
>>>> Switching to SSDV file ssdv_0_1.bin
RTTY: SSDV record 0 of 32
RTTY: $$CAEN_CP1,1,00:00:00,0.00000,0.00000,00000,0,0,0,25.9,0.0,0*68C0
RTTY: SSDV record 1 of 32
RTTY: $$CAEN_CP1,2,00:00:00,0.00000,0.00000,00000,0,0,0,25.9,0.0,0*BF4D
RTTY: SSDV record 2 of 32
RTTY: $$CAEN_CP1,3,00:00:00,0.00000,0.00000,00000,0,0,0,25.9,0.0,0*0229
RTTY: SSDV record 3 of 32
RTTY: $$CAEN_CP1,4,00:00:00,0.00000,0.00000,00000,0,0,0,25.9,0.0,0*0076
RTTY: SSDV record 4 of 32
RTTY: $$CAEN_CP1,5,00:00:00,0.00000,0.00000,00000,0,0,0,25.9,0.0,0*BD12
RTTY: SSDV record 5 of 32
RTTY: $$CAEN_CP1,6,00:00:00,0.00000,0.00000,00000,0,0,0,25.9,0.0,0*6A9F
RTTY: SSDV record 6 of 32
RTTY: $$CAEN_CP1,7,00:00:00,0.00000,0.00000,00000,0,0,0,25.9,0.0,0*D7FB
RTTY: SSDV record 7 of 32
RTTY: $$CAEN_CP1,8,00:00:00,0.00000,0.00000,00000,0,0,0,25.9,0.0,0*6E21
RTTY: SSDV record 8 of 32
RTTY: $$CAEN_CP1,9,00:00:00,0.00000,0.00000,00000,0,0,0,25.8,0.0,0*6B24
RTTY: SSDV record 9 of 32
RTTY: $$CAEN_CP1,10,00:00:00,0.00000,0.00000,00000,0,0,0,25.8,0.0,0*8235
RTTY: SSDV record 10 of 32
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

Re: Lora Gateway, Frequency and Antenna

Tue Jun 14, 2016 10:44 pm

And here is the pisky.txt

i noticed that the LORA_Calling_Frequency_0=434.475 so I changed it to 434.250

Code: Select all

payload=CAEN_CP1
disable_monitor=N
frequency=434.250
baud=300
camera=U
low_width=320
low_height=240
high=2000
high_width=640
high_height=480
image_packets=4
enable_bmp085=N
external_temperature=1
logging=GPS,Telemetry
Disable_RTTY=N
info_messages=2

full_low_width=640
full_low_height=480
full_high_width=2592
full_high_height=1944
full_image_period=60

landing_prediction=N
cd_area=0.66
payload_weight=1.0
prediction_id=XX

#APRS_Callsign=CHANGE
APRS_ID=11
APRS_Period=1
APRS_Random=5

LORA_Frequency_0=434.500
LORA_Payload_0=CAEN_LORA_SKY
LORA_Mode_0=1
LORA_low_width_0=640
LORA_low_height_0=480
LORA_high_width_0=1280
LORA_high_height_0=960
LORA_image_period_0=30
LORA_image_packets_0=20
LORA_Cycle_0=15
LORA_Slot_0=2
LORA_Repeat_0=6
LORA_Uplink_0=10
LORA_Binary_0=N
LORA_Calling_Frequency_0=434.500
LORA_Calling_Count_0=20
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

Re: Lora Gateway, Frequency and Antenna

Tue Jun 14, 2016 10:53 pm

I have just connected the Pi 3 and Lora base setup to the Internet and I the Pi 3 Lora has appeared as a listener on HabHub but no SSDV details are being transmitted?

Any help would be great

Thanks
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

Re: Lora Gateway, Frequency and Antenna

Sun Jun 19, 2016 7:11 pm

Think I may have found the problem, whilst assembling the new Pi Zero / PITS / Lora setup, I noticed that on the Lora board CE1 is populated not CE0. So while I have been setting up the config files I have been configuring Lora0 which I guess relates to CE0??

So to wrap this up i'll set my PITS to 434.250MHz and the Lora to 434.500MHz (on both the Rx and Tx) and we should be good to go?
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

zanco
Posts: 24
Joined: Fri Dec 07, 2012 1:38 pm

Re: Lora Gateway, Frequency and Antenna

Sun Jun 19, 2016 7:20 pm

Hi Johnny,

I do not get it completely what you are trying to do. I do notice that on the pisky.txt you did not disable the RTTY settings for the NTX1 board.

Code: Select all

payload=PE2BZ
disable_monitor=N
#frequency=434.250
#baud=300
camera=Y
camera_settings=-rot 180
#camera=N
#low_width=960
#low_height=720
high=1000
#high_width=960
#high_height=720
#image_packets=1
#enable_bmp085=N
#external_temperature=1
logging=GPS,Telemetry
Disable_RTTY=Y
info_messages=2

#full_low_width=640
#full_low_height=480
#full_high_width=2592
#full_high_height=1944
#full_image_period=60

landing_prediction=N
cd_area=0.66
payload_weight=1.0
prediction_id=XX

#APRS_Callsign=PE2BZ
#APRS_ID=11
#APRS_Period=1
#APRS_Random=5

#LORA_Frequency_0=434.450
#LORA_Payload_0=CHANGEME
#LORA_Mode_0=0
#LORA_low_width_0=640
#LORA_low_height_0=480
#LORA_high_width_0=1280
#LORA_high_height_0=960
#LORA_image_period_0=30
#LORA_image_packets_0=20
#LORA_Cycle_0=15
#LORA_Slot_0=2
#LORA_Repeat_0=6
#LORA_Uplink_0=10
#LORA_Binary_0=N
#LORA_Calling_Frequency_0=434.475
#LORA_Calling_Count_0=20

LORA_Frequency_1=432.625
LORA_Payload_1=PE2BZ-test
LORA_Mode_1=1
LORA_low_width_1=640
LORA_low_height_1=480
LORA_high_width_1=1280
LORA_high_height_1=960
LORA_image_period_1=240
LORA_image_packets_1=20
LORA_Power_1=143
#LORA_Cycle_1=15
#LORA_Slot_1=2
#LORA_Repeat_1=6
#LORA_Uplink_1=10
#LORA_Binary_1=N
#LORA_Calling_Frequency_1=434.475
#LORA_Calling_Count_1=20


That is my pisky.txt I am transmitting SSDV from the Picam on 432.625 MHz with the module CE1

On the same board I have the CE0 mounted and running with LoRa

Code: Select all

tracker=PE2BZ
EnableHabitat=Y
EnableSSDV=Y
JPGFolder=ssdv
LogTelemetry=Y
CallingTimeout=60
ServerPort=6004
Latitude=51.991509
Longitude=4.198967
SMSFolder=tweets/

#NetworkLED=22
#InternetLED=23
#ActivityLED_0=21
#ActivityLED_1=29

frequency_0=432.625
mode_0=1
DIO0_0=6
DIO5_0=5
AFC_0=Y



#frequency_1=434.750
#DIO0_1=27
#DIO5_1=26
#AFC_1=Y
#MODE_1=1

#frequency_1=432.625
#DIO0_1=27
#DIO5_1=26
#AFC_1=N
#MODE_1=1
#MODE_1=1
#CODING_1=8
#BANDWIDTH_1=20K8
#SF_1=11
#LowDataRateOptimize Enabled_1

This is my gateway.txt

All the lines starting with # are commented, I can switch to other settings by removing the # and add the # to the lines I do not want to be active at that moment.

Does this make sense ?

If you have both CE1 enabled on both Pits boards you have to use the same frequency for RX and TX if you want to receive / upload yourself.

For the gateway.txt it is important to check the DIO0 and DIO5 settings, they have to be the same as the values printed on the PCB near the slot you want to use.

Let me know if this helps you any further. Tomorrow I will review my comment and your question but for now it's to late for me ;-)

Good luck,

Ben - PE2BZ

User avatar
daveake
Posts: 188
Joined: Thu Jul 12, 2012 12:07 am

Re: Lora Gateway, Frequency and Antenna

Mon Jun 20, 2016 12:41 pm

JonnyAlpha wrote:Hi;

Just trying out my 2 x Lora boards, one mounted on a PiZero with PITS and the other in a shiny new RPi B 3 (just arrived from Mr DHL).

I am following Dave Akerman's guide, can anyone confirm the install process on this guide - is this for the receiving end? If so do I need to do anything on the Pi attached to the PITS which has the other Lora Board on or will the tracking software already installed on it star using the Lora board when it is attached? I installed it following the PITS manual.

1. When setting the frequency should it be set to something different than the PITS?
2. Does the LORA transmit / receive on USB?
3. What antenna would you recommend on the payload, I have a 434MHz stubby - this one: https://store.uputronics.com/index.php? ... duct_id=86,
4. What antenna should I use for receiving end (1./4 groundplane?).

That's all for now :-)

Many thanks
1 - Frequency on receiver and transmitter should be the same as each other.
2 - I don't even understand the question.
3 - Same as for RTTY - the type of modulation makes absolutely no difference to the choice of antenna.
4 - As above.

Dave

User avatar
daveake
Posts: 188
Joined: Thu Jul 12, 2012 12:07 am

Re: Lora Gateway, Frequency and Antenna

Mon Jun 20, 2016 1:08 pm

JonnyAlpha wrote:Think I may have found the problem, whilst assembling the new Pi Zero / PITS / Lora setup, I noticed that on the Lora board CE1 is populated not CE0. So while I have been setting up the config files I have been configuring Lora0 which I guess relates to CE0??

So to wrap this up i'll set my PITS to 434.250MHz and the Lora to 434.500MHz (on both the Rx and Tx) and we should be good to go?
Whether you're configuring PITS in pisky.txt, or the gateway in gateway.txt, the simple rule applies to LoRa settings on either: _0 refers to CE0 (unsurprisingly) and _1 to CE1. Obviously, you should configure for the devices you have, and disable whatever you don't have.

Transmitters and receivers should be set to the same nominal frequency as each other. Remember though that all transmitters and all receivers have component tolerances that mean that they will not be tuned to exactly the frequency you set. For RTTY, as I'm sure you know, once you see/hear the signal then you need to tune up/down to get the 2 bands somewhere in the middle of the decoder's audio bandwidth. For LoRa, the receiver software will show the difference in kHz between transmitter and receiver, and this needs to be 4kHz or below otherwise the receiver will miss packets. The gateway software has an AFC (Automatic Frequency Control) to help here.

Dave

User avatar
daveake
Posts: 188
Joined: Thu Jul 12, 2012 12:07 am

Re: Lora Gateway, Frequency and Antenna

Mon Jun 20, 2016 1:27 pm

JonnyAlpha wrote:2. Does the LORA transmit / receive on USB?
OK, I've figured out what you've asked, though I still don't understand why you've asked. You're probably thinking of how RTTY works but if so, you've misunderstood that.

In RTTY we modulate the frequency of the transmissions, moving the frequency higher to represent a "1" or lower to represent a "0". To do this we send a high or low voltage to the transmitter which, as an FM (frequency modulated) device, responds by increasing or reducing the transmitted UHF frequency.

We do not however use an FM receiver - doing so would mean that the receiver would just produce clicks as it tries to reproduce the high and low voltages. Instead, we use an SSB (single sideband) receiver set to USB (Upper SideBand) mode. This does not mean that the transmission is SSB/USB; it's just a convenient way of converting the low/high UHF frequencies to low/high audio frequencies. Essentially, the receiver in SSB mode downshifts the UHF radio frequencies to audio frequencies. When people say that they are using USB or LSB for this, they are just saying whether the high/low frequencies are 1's and 0's (USB) or 0's and 1's; so you know whether to use USB or LSB on the receiver; they are not saying that the transmissions are USB/LSB (they aren't).

LoRa transmissions are also frequency modulated, but instead of having 2 different frequencies they have many more - maybe 64 for example (depends on the mode). Algorithms control how the transmitted data is converted into brief "chirps" of one or more of those frequencies at different times. To receive and decode LoRa transmissions you need a LoRa receiver - a regular radio scanner/radio doesn't have the bandwidth, and currently no independent software exists to decode the chirps.

So, short answer "No LoRa doesn't use USB, and neither does RTTY"

Dave

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

Re: Lora Gateway, Frequency and Antenna

Mon Jun 20, 2016 7:55 pm

Gents;

Thanks for the response, I think I have been a little confused (nothing new there then) regarding Lora boards.

I thought Lora was just for transmitting ssdv image data but faster than RTTY and you still needed the RTTY transmit the telemetry string.

Looking at your pisky.txt line three, you have commented out the frequency for the Radio transmitter, presumably to disable it and only use Lora for transmitting ssdv and telemetry.

So having now seen the light, in simple terms Lora replace the pits onboard radio module, so telemetry and images are transmitted over Lora? As opposed to RTTY, The difference being that Lora is faster and can transmit and receive?

For this first flight I may remove the Lora board as all of our testing has been done using the Tx on the pits. Or can I use both. Dave responded to another post of mine regarding antenna and I seem to recall to keep the RTTY and Lora antenna away from each other? Pits 1/4 wave ground plane on the bottom, Lora on top (May just use one of the HARVEST Dual Bands that I bought for testing from UPU Tronics and mount it vertically out of the top of the Payload? Assuming we can use the pits Tx and Lora)

The other bonus when using Lora is that you do not need any other radio gear? Just another Lora board mounted on a Raspberry Pi (and suitable antenna) or am I off track again?
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

User avatar
daveake
Posts: 188
Joined: Thu Jul 12, 2012 12:07 am

Re: Lora Gateway, Frequency and Antenna

Tue Jun 21, 2016 8:02 am

Aerials don't like being very close to each other. The rule-of-thumb for aerials that are adjacent (e.g. hanging below a payload, which is where they should be) is to keep them at least 1/4 wave from each other. 1/4 wave is of course the length of a 1/4 wave aerial, so 164mm on 434MHz.

I have on occassion avoided this by putting one of the aerials on the top, however this compromises the efficiency of the top aerial. For that flight I was mainly interested in the signal from the lower aerial, so that was a good solution.

For your flight though it isn't.

I strongly suggest you just do RTTY so you only have one aerial. Keep things simple.

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

Re: Lora Gateway, Frequency and Antenna

Fri Jul 01, 2016 1:02 pm

Dave;

Sorry only just seen this reply.
As you know we had a successful flight using RTTY only.

Thanks for all of your help, only wish I could make the Sky Academy but I'll be away walking :|
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

DavidGMX
Posts: 9
Joined: Sun Jun 19, 2016 2:30 pm

Re: Lora Gateway, Frequency and Antenna

Wed Jul 06, 2016 10:00 am

Hi,guys,

The Dragino Lora/GPS_HAT is a expension module for LoRaWan for ues with the Raspberry Pi.This product is intended for those interested in developing LoRaWAN solutions.

Image

You can get more info about the Lora/GPS_HAT from http://wiki.dragino.com/index.php?title=Lora/GPS_HAT
Hope it help to the people who need it.

fruitoftheloom
Posts: 23132
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Lora Gateway, Frequency and Antenna

Wed Jul 06, 2016 10:15 am

Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
daveake
Posts: 188
Joined: Thu Jul 12, 2012 12:07 am

Re: Lora Gateway, Frequency and Antenna

Wed Jul 13, 2016 11:25 am

Just to clear up some possible confusion here ...

LoRaWAN is not the same as LoRa (see http://www.link-labs.com/what-is-lorawan/ for more information); it's a datalink layer built with LoRa hardware.

High altitude ballooning uses raw LoRa transceivers with our own protocols that are not compatible with LoRaWAN. So the LoRa gateway used for HAB does not work with LoRaWAN (if I had a penny for every email I get that confuses the two ...), and if you want to receive data from a LoRa balloon you only need the basic LoRa transceiver and not the full multi-channel (i.e. with conecentrator) LoRaWAN hardware.

Those building their own HAB trackers and/or ground receivers can buy LoRa modules and Pi boards online e.g. from https://store.uputronics.com/index.php? ... ry&path=61. The boards on that site work directly with my PITS software and my LoRa gateway; other products will probably need some settings changed in the software configuration.

Also, the Pi board linked to a couple of messages up is fine for a LoRa gateway (with whatever settings it needs) but is not usable as a balloon tracker because it's GPS receiver will stop working above 18km.

Dave

User avatar
Gavinmc42
Posts: 4508
Joined: Wed Aug 28, 2013 3:31 am

Re: Lora Gateway, Frequency and Antenna

Sat Oct 01, 2016 4:16 am

Just got Adafruit LoRa M0 feathers talking.
https://learn.adafruit.com/adafruit-fea ... m-9x-radio

Compiled and programmed on a Pi3 with Arduino 1.6.12.
Had trouble programming in Linux Mint, but no trouble with a Pi3.
Arduino IDE works with Pi2 as well but you could make a cup of tea and drink it while waiting for the compile/upload cycle ;)

Next step is to make a gateway with a Pi.
Use Radiohead's library on a Pi Zero to talk to SPI LoRa module.
The Feathers are a bit smaller/lighter than a Zero.

Plenty of code space left in the M0, add LCD on RX to show balloon GPS, Handheld tracking etc.

Nice to use a Pi3 as a real development tool :P
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “High Altitude Balloon”