Pi gateway help

90 views
Skip to first unread message

Gavin Gill

unread,
Jul 7, 2024, 12:47:56 PMJul 7
to UKHAS
H all, 
first of all, thank you for the great resource.
Although I’m a complete novice at this, I have learnt a tremendous amount in the last few months. I’ve been determined to get myself a home station set up to help contribute to the tracking.

So far I have successfully managed to get cube sat and my sonde hub elements going nicely with Auto_rx…. Whoop wood, but today I’ve been working on getting my Laura gateway up and running.. I am using a Pi 5 with the lora hat (both chips running 433)

I’ve followed all the instructions listed on Dave’s site as well as the git hub page.
I seem to be getting a wiringpi error on both modules, can anyone maybe point me in the right direction? I have used the PIN numbers listed on the lora hat. As far as I can tell, I’ve done it correctly. I have attached images of my configuration text, the lora hat, general setup. (I am waiting to get blasted at my general setup lol, it’s work in progress as I learn more, so I’m open to feedback)
IMG_4410.jpeg
IMG_4415.jpeg
IMG_0337.jpeg

John Laidler

unread,
Jul 7, 2024, 12:57:08 PMJul 7
to uk...@googlegroups.com

On the github page for WiringPi there is a note it doesn't currently work with Pi5.

https://github.com/WiringPi/WiringPi

John
M0WIV


--
You received this message because you are subscribed to the Google Groups "UKHAS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhas+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ukhas/95427b90-0fc2-4a97-84d8-79aeb1869b63n%40googlegroups.com.

Sasha Tim

unread,
Jul 7, 2024, 1:06:21 PMJul 7
to uk...@googlegroups.com
"There's motion at your Front Door!"

Yes, it's likely the Pi 5 issue.

--VE3SVF

--

Tom Wardill

unread,
Jul 7, 2024, 1:19:25 PMJul 7
to uk...@googlegroups.com
I ported lora-gateway to the kernel gpio interfaces, using lgpio.
This means it works on Pi5, and 64 bit latest raspian releases for previous Pis.

Code is here: https://github.com/teamtoadprojects/lora-gateway/tree/lgpio-port
My PR is here: https://github.com/PiInTheSky/lora-gateway/pull/78

I've not tested all the features, but it worked for our balloon
release and has been running quite happily in my testing environment.

Hope that helps!
> To view this discussion on the web visit https://groups.google.com/d/msgid/ukhas/CAJn3SCpYEv4PFTeqzQg1tGxZa1jiBya0sTgBrCUgnXhzGCsC9w%40mail.gmail.com.



--
Tom Wardill

Gavin Gill

unread,
Jul 7, 2024, 2:29:29 PMJul 7
to uk...@googlegroups.com
Doh! The one place I didn’t google! 

Thank you!

Kind Regards,

Gavin



Sent from my iPhone

On 7 Jul 2024, at 17:57, John Laidler <rjohnl...@gmail.com> wrote:



Gavin Gill

unread,
Jul 7, 2024, 2:30:07 PMJul 7
to uk...@googlegroups.com
Interesting, might try this, thank you!
Kind Regards,

Gavin


Sent from my iPhone

> On 7 Jul 2024, at 18:19, Tom Wardill <t...@howrandom.net> wrote:
>
> I ported lora-gateway to the kernel gpio interfaces, using lgpio.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ukhas/CAEf38Qgwf%2BJN8504%2BmGRLUca1vzTvo66sqFeECv0q-oAz6ib8A%40mail.gmail.com.

David Akerman

unread,
Jul 8, 2024, 5:13:34 AMJul 8
to UKHAS
Cheers Tom, that saves me doing it!  I'll sort out merging the PR later this week (I'm busy for a couple of days).

Dave

Gavin Gill

unread,
Jul 8, 2024, 11:50:51 AMJul 8
to uk...@googlegroups.com
Thank you for this,

I thought before I try new versions( as I’m inexperienced), let’s get a tried and trusted version working, so I dug out an old pi4 first…
I tried with a fresh new 64bit installation.

And im getting the exact same errors. Any clues what I’m doing wrong?

Could it be that it needs a 32 bit os?

I’ve used the pin headers printed on the Lora gateway board , pin 27,26. And pin 6,5

image0.jpeg
image2.jpeg
image3.jpeg
image1.jpeg

Ben Z en de rest

unread,
Jul 8, 2024, 12:10:50 PMJul 8
to uk...@googlegroups.com

In my old memory there was a command to have wiringpi show the available pins and layout.  Does that still exist and can it be of any help here? You use wiring pi pins for the led too and that appears to work?


Op ma 8 jul 2024 17:50 schreef Gavin Gill <gav...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "UKHAS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhas+un...@googlegroups.com.



--
You received this message because you are subscribed to the Google Groups "UKHAS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhas+un...@googlegroups.com.



--
You received this message because you are subscribed to the Google Groups "UKHAS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhas+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ukhas/1D7DD451-A929-4092-8FF8-15ADCA25E0E8%40gmail.com.
Kind Regards,

Gavin Gill



Sent from my iPhone

> On 7 Jul 2024, at 18:19, Tom Wardill <t...@howrandom.net> wrote:
> I ported lora-gateway to the kernel gpio interfaces, using lgpio.


--
You received this message because you are subscribed to the Google Groups "UKHAS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhas+un...@googlegroups.com.

David Brooke

unread,
Jul 8, 2024, 12:26:23 PMJul 8
to uk...@googlegroups.com
On Mon, Jul 08, 2024 at 04:50:26PM +0100, Gavin Gill wrote:
>
> I’ve used the pin headers printed on the Lora gateway board , pin 27,26. And pin 6,5

I think you have the DIO pins assigned to the wrong channels i.e. CE0
should be 6,5 and CE1 27,26

These are the defaults amyway so you can comment out those settings.

However the reported error looks more like a general SPI problem so
check that SPI is enabled in raspi-config.

David G6GZH

David Brooke

unread,
Jul 8, 2024, 12:39:01 PMJul 8
to uk...@googlegroups.com
I just noticed that your config file has other uncommented entries for
the channels. Unless you're doing something unusual you only need to
specify frequency, mode and AFC for the CE0 and CE1 sections.

David G6GZH

Mika Köching

unread,
Jul 9, 2024, 1:37:38 AMJul 9
to UKHAS
I had some SPI related problems too. After switching to an up to date 64-bit image an using the lgpio-port everything seems to work all right though I didn't try decoding yet. I would try to set everything up with that.

Mika, DL8MIK

Tom Wardill

unread,
Jul 9, 2024, 2:52:29 AMJul 9
to uk...@googlegroups.com
It's worth noting that the pin numbering changes from wiringpi to lgpio.
I believe I updated the defaults in the code, but if anyone has
overridden them via gateway.txt, then they'll need to change them.
Lookup table and diagram is here: https://pinout.xyz/pinout/wiringpi

The LED pins have also changed, I believe this is a working config:

NetworkLED=6
InternetLED=13
ActivityLED_0=5
ActivityLED_1=21


Also of interest is that wiringpi appears to be maintained again (and
now claims at least partial Pi5 support), but no idea if/when it'll
make it back into the raspbian repos.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ukhas/3801f3eb-9d55-407a-9d62-bf1d2d57c8a9n%40googlegroups.com.



--
Tom Wardill

Gavin Gill

unread,
Jul 9, 2024, 4:44:52 PM (14 days ago) Jul 9
to uk...@googlegroups.com

Hi all, 

sorry if I have spammed the group with my issues, so I have tried to condense all my replies into one message. thank you to everyone for the help. Much appreciated. There have been some great advice, I tried commenting back all the unnecessary lines, played with PIN numbers but no joy, I even tried a 32bit installation. I just keep getting the same error.


Tom, I am a very technical person, but new to Linux /pi environment.

I have tried to use some initiative but sadly I have failed. 

I have done the following:

On my current 32bit Sd card with old installation on…

  • I wanted to install lgpio so i…
  • sudo apt install swig python-dev python3-dev
  • sudo apt install python-setuptools python3-setuptools

And then:

wget http://abyz.me.uk/lg/lg.zip

unzip lg.zip

cd lg

make

sudo make install


I then renamed my lora-gateway folder to lora-gateway-old


I then did:

Git clone  https://github.com/teamtoadprojects/lora-gateway.git

Make


I then edited my gateway.txt to the attached image. I believe my pins should be correct.

I get the error as seen in the attached.


Any suggestions? I’ve learnt loads from this project!


Do I need to uninstall wiringpi?


Manny Thanks,

image0.jpegimage1.jpeg

Gavin 

Kind Regards,

Sent from my iPhone

On 9 Jul 2024, at 07:52, Tom Wardill <t...@howrandom.net> wrote:

It's worth noting that the pin numbering changes from wiringpi to lgpio.
Message has been deleted

Gavin Gill

unread,
Jul 10, 2024, 11:28:44 AM (13 days ago) Jul 10
to UKHAS
Hi All,

I seem to get the error message "wiringPiSPI: Invalid SPI number/channel (need wiringPiSPIxSetupMode before read/write"

ive been doing some digging, and found the error message in wiring pi code: (Line 124)

does anyone know what that  could mean?

As per my previous message, Tom do I have to wait for your Pull request to get approved before I can use your code? still wrapping my head around github

Manny Thanks,
Gavin 

Mika Köching

unread,
Jul 11, 2024, 7:07:26 AM (12 days ago) Jul 11
to UKHAS
You don't have to wait for his PR to get through. just use git clone -b lgpio-port https://github.com/teamtoadprojects/lora-gateway.git instead of the normal git clone with the pits repository.

Gavin Gill

unread,
Jul 11, 2024, 12:30:28 PM (12 days ago) Jul 11
to UKHAS
Thank you Mika,

So I have done everything, and I no longer get the errors, however it no longer connects to sondehub,  and appears that its not recognising the pins.
I tied a fresh installation, and on the part where I install Lgpio, to install the python elements it seems to suggest the files are depreciated.

sudo apt install swig python-dev python3-dev
sudo apt install python-setuptools python3-setuptools

I tried  sudo apt-get install python3-pip
I tried  sudo apt-get install  swig python-dev-is-python3 (online resource suggested this)

I installed a few files, rebooted, even tried  sudo make install in the lg directory again to see if it would force it to see the new python setuptools but no joy...

So back to the drawing board...

(I've managed to get CubeSat, autorx and hondurus working easily, this one is making me work hard! :) I love a challenge

Mika Köching

unread,
Jul 11, 2024, 2:43:04 PM (12 days ago) Jul 11
to uk...@googlegroups.com
I honestly can't remember having to install lgpio. I just installed a new 64bit image and that seems to work fine.

Gavin Gill

unread,
Jul 11, 2024, 4:22:49 PM (12 days ago) Jul 11
to UKHAS
Wowa wee wah, think I finally got it working.

Thank you all for the help, and sorry if I spammed the inbox

I did fresh 64Bit install, and tried Mika method without installing Lgpio.
It didn’t like that, error stating couldn’t find lgpio.h 

So I went here https://github.com/joan2937/lg/tree/master and tried to install the dependency’s but ther all out of date.
I installed swig, by seraching git hub. 
I then installed python 3 which it said already had. I then installed Lg and miraculously everything worked this time… what a journey but I learned tons!

Reply all
Reply to author
Forward
0 new messages