GPS setup inconsistent #gpsd #ft-817


Mihai M.
 

Hi,
I try to make my own image. I added the following to my /boot/config.txt
# Configure gpsd
START_DAEMON="true"
DEVICES="/dev/ttySC0 /dev/pps0"
GPSD_OPTIONS="-n"

Then I rebooted and I got my GPS working. Then I moved my setup to different room and since then the GPS is not working.
pi@w4mhi-shack:~ $ systemctl status gpsd.service
● gpsd.service - GPS (Global Positioning System) Daemon
   Loaded: loaded (/lib/systemd/system/gpsd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-07-30 20:12:24 PDT; 5s ago
  Process: 1575 ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $DEVICES (code=exited, status=0/SUCCESS)
 Main PID: 1576 (gpsd)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/gpsd.service
           └─1576 /usr/sbin/gpsd -n -b /dev/ttySC0 /dev/pps0
 
Jul 30 20:12:24 w4mhi-shack systemd[1]: Starting GPS (Global Positioning System) Daemon...
Jul 30 20:12:24 w4mhi-shack systemd[1]: Started GPS (Global Positioning System) Daemon.
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: SER: device open of /dev/ttySC0 failed: No such file or directory - retrying
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: SER: read-only device open of /dev/ttySC0 failed: No such file or directory
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: initial GPS device /dev/ttySC0 open failed

The /dev/ttySC0 disappeared. Any idea what's going on?

Thank you & 73,
Mihai (W4MHI)

 


Basil Gunn
 

I try to make my own image. I added the following to my
/boot/config.txt
1. I do not support making your own image. A LOT of time went into
making an image that works with the NWDR hats and there is NO compelling
reason for you to make your own image other than it might be fun. By all
means ask questions on the forum because others might be willing to
support you.

2. gpsd configuration is in file: /etc/default/gspd NOT /boot/config.txt

# Configure gpsd
START_DAEMON="true"
DEVICES="/dev/ttySC0 /dev/pps0"
GPSD_OPTIONS="-n"
3. Look at the kernel version on the image you started with.

The last RELEASED Linux kernel that worked with the audio codec that
NWDR DRAWS uses (TI tlv320aic 32x4) is 5.4.83. Kernel version 5.4.79
also works well with that codec. The currently released Raspberry Pi
Foundation kernel, 5.10.17, WILL NOT WORK with this codec. Hence the
hold on kernel updates on the currently released NWDR image.

Anna fixed the kernel problem in Feb 2021 and those patches were
accepted to the main line kernel in March 2021. The currently released
kernel by the Raspberry Pi Foundation, 5.10.17, does NOT have the
following fixes:

* [[https://www.spinics.net/lists/stable/msg455357.html | [PATCH v2 2/2] ASoC: tlv320aic32x4: Register clocks before registering component]]
* [[https://www.spinics.net/lists/stable/msg455356.html | [PATCH v2 1/2] ASoC: tlv320aic32x4: Increase maximum register in regmap]]
* [[https://www.spinics.net/lists/stable/msg455066.html | [PATCH v2] sc16is7xx: Defer probe if device read fails]]

To Summarize:
Kernel versions that work:
5.4.79, 5.4.83, 5.10.31 and above

Kernel versions that DO NOT work:
Any kernel after 5.4.83 and before 5.10.31

Note that Kernel 5.10.31 is not a kernel released by Raspberry Pi
Foundation. If the n7nix repository is installed you can run the
kernver.sh script which will display the currently released Raspberry
Pi foundation kernel and the kernel version you are currently running.

$ kernver.sh
Released kernel version: 5.10.17
Running kernel version: 5.4.79

Also run the following command to display your current kernel version:

uname -a
or
uname -r


Then I rebooted and I got my GPS working. Then I moved my setup to different room and since then the GPS is not working.
pi@w4mhi-shack:~ $ systemctl status gpsd.service
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: SER: device open of /dev/ttySC0 failed: No such file or directory - retrying
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: SER: read-only device open of /dev/ttySC0 failed: No such file or directory
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: initial GPS device /dev/ttySC0 open failed


John S Gruber
 

My system doesn't have the kernel pinned since it was already running
a broken kernel version.

Because of the breakage and the fact that's it doing what we need it
to do we have just kept it running without reboot for 173 days. It's
high, has Internet, and is hard for me to access.

Yesterday morning unattended upgrades updated the pi to version
1:1.20210727-1. From both the debian changelog and the name of the
directory it appears to contain linux 5.10.52.

kernver.sh:
Released kernel version: 5.10.17
Running kernel version: 5.10.11

The release notes used by kernver.sh don't include the 5/27 or 7/27
raspberrypi-kernel packages. (sadly 5/27 was 5.10.17).

Has the 7/27/21 kernel release been tested to be sure Anna's fixes are
on and that everything is working properly?


/etc/apt/sources.list.d/raspi.list:
deb http://archive.raspberrypi.org/debian/ buster main

Package location:
http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel_1.20210727-1_arm64.deb

On Sat, Jul 31, 2021 at 11:59 AM Basil Gunn <basil@pacabunga.com> wrote:


I try to make my own image. I added the following to my
/boot/config.txt
1. I do not support making your own image. A LOT of time went into
making an image that works with the NWDR hats and there is NO compelling
reason for you to make your own image other than it might be fun. By all
means ask questions on the forum because others might be willing to
support you.

2. gpsd configuration is in file: /etc/default/gspd NOT /boot/config.txt

# Configure gpsd
START_DAEMON="true"
DEVICES="/dev/ttySC0 /dev/pps0"
GPSD_OPTIONS="-n"
3. Look at the kernel version on the image you started with.

The last RELEASED Linux kernel that worked with the audio codec that
NWDR DRAWS uses (TI tlv320aic 32x4) is 5.4.83. Kernel version 5.4.79
also works well with that codec. The currently released Raspberry Pi
Foundation kernel, 5.10.17, WILL NOT WORK with this codec. Hence the
hold on kernel updates on the currently released NWDR image.

Anna fixed the kernel problem in Feb 2021 and those patches were
accepted to the main line kernel in March 2021. The currently released
kernel by the Raspberry Pi Foundation, 5.10.17, does NOT have the
following fixes:

* [[https://www.spinics.net/lists/stable/msg455357.html | [PATCH v2 2/2] ASoC: tlv320aic32x4: Register clocks before registering component]]
* [[https://www.spinics.net/lists/stable/msg455356.html | [PATCH v2 1/2] ASoC: tlv320aic32x4: Increase maximum register in regmap]]
* [[https://www.spinics.net/lists/stable/msg455066.html | [PATCH v2] sc16is7xx: Defer probe if device read fails]]

To Summarize:
Kernel versions that work:
5.4.79, 5.4.83, 5.10.31 and above

Kernel versions that DO NOT work:
Any kernel after 5.4.83 and before 5.10.31

Note that Kernel 5.10.31 is not a kernel released by Raspberry Pi
Foundation. If the n7nix repository is installed you can run the
kernver.sh script which will display the currently released Raspberry
Pi foundation kernel and the kernel version you are currently running.

$ kernver.sh
Released kernel version: 5.10.17
Running kernel version: 5.4.79

Also run the following command to display your current kernel version:

uname -a
or
uname -r


Then I rebooted and I got my GPS working. Then I moved my setup to different room and since then the GPS is not working.
pi@w4mhi-shack:~ $ systemctl status gpsd.service
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: SER: device open of /dev/ttySC0 failed: No such file or directory - retrying
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: SER: read-only device open of /dev/ttySC0 failed: No such file or directory
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: initial GPS device /dev/ttySC0 open failed




Mihai M.
 

Thank you Basil!
Couple of thoughts:
- the boot/config.txt doesn't have the snippet, true - copy&paste fault. I followed the documentation to include the drivers but I didn't copy that snippet
- in the gpsd I have the snippet
- will do a full kernel update to get the 5.10.31 (current is 5.10.17)

I understand you do not support custom images, but how would we learn to use something if we do not try to hack that thing? RaspberryPi is intended to be a platform where anyone can do fun things.
I have a big thanks to Anna for the fixes!

Much appreciate your help!
73,
Mihai (W4MHI)


Annaliese McDermond
 

Let me be very clear about this for others that may read this.  We do not recommend the following for anyone at all, and Basil, myself or anyone else associated with NWDR won't be here to help you if you wander off the trail.  This information is given for educational purposes to someone that's already decided to forgo any formal support from us, and what they do with the information is their own thing.  This is likely my last post on the subject, and probably Basil's as well.

The necessary patches were pushed both upstream and to the Pi Foundation's repository in hopes they'd get into the distro sooner.  They didn't upgrade the kernel in the May release, so it didn't make it in there.  One could use rpi-update to upgrade to the latest testing kernel, which should have the patches.  Again, DANGER WILL ROBINSON, THERE BE DRAGONS HERE.  Note all of the RPi Foundation's warnings on the linked page as well.

You have been warned.


Mihai M.
 

I totally agrre with you. I am developer and I want to use your HAT in a particular configuration. 
After Basil's reply, everything works like a charm, thank you again! 
I apologize for creating trouble on the forum. 
You guys rock, so much appreciation. 

73,
Mihai (W4MHI) 


-------- Original message --------
From: Annaliese McDermond <nh6z@...>
Date: 7/31/21 13:58 (GMT-08:00)
To: udrc@nw-digital-radio.groups.io
Subject: Re: [draws and udrc] GPS setup inconsistent #ft-817 #gpsd

Let me be very clear about this for others that may read this.  We do not recommend the following for anyone at all, and Basil, myself or anyone else associated with NWDR won't be here to help you if you wander off the trail.  This information is given for educational purposes to someone that's already decided to forgo any formal support from us, and what they do with the information is their own thing.  This is likely my last post on the subject, and probably Basil's as well.

The necessary patches were pushed both upstream and to the Pi Foundation's repository in hopes they'd get into the distro sooner.  They didn't upgrade the kernel in the May release, so it didn't make it in there.  One could use rpi-update to upgrade to the latest testing kernel, which should have the patches.  Again, DANGER WILL ROBINSON, THERE BE DRAGONS HERE.  Note all of the RPi Foundation's warnings on the linked page as well.

You have been warned.


Basil Gunn
 

My system doesn't have the kernel pinned since it was already running
a broken kernel version.
Read the following link. It will tell you how to down rev your kernel
AND place a hold on updating the kernel. The current kernel that
Raspberry Pi OS has in their repo (5.10.17) will NOT work with a DRAWS
hat.

https://github.com/nwdigitalradio/n7nix/blob/master/docs/DRAWS_CONFIG.md#placing-a-hold-on-kernel-upgrade


Because of the breakage and the fact that's it doing what we need it
to do we have just kept it running without reboot for 173 days. It's
high, has Internet, and is hard for me to access.

Yesterday morning unattended upgrades updated the pi
Huh? You are using automated upgrades? If you do that you really need to
put a hold on upgrading your kernel. Also NEVER use rpi-update unless
you know what you are doing as that will install a bleeding edge kernel.

to version 1:1.20210727-1. From both the debian changelog and the name
of the directory it appears to contain linux 5.10.52.

kernver.sh:
Released kernel version: 5.10.17
Running kernel version: 5.10.11

The release notes used by kernver.sh don't include the 5/27 or 7/27
raspberrypi-kernel packages. (sadly 5/27 was 5.10.17).
Correct, the release notes used are what is in the raspberrypi.org download
directory ie. what the Raspberry Pi Foundation actually supports.

Has the 7/27/21 kernel release been tested to be sure Anna's fixes are
on and that everything is working properly?
I do NOT test every bleeding edge kernel that is installed with
rpi-update. The last one I tested was 5.10.31 a few months ago and that
kernel had Anna's fixes and everything worked fine. I will test the
latest Raspberry Pi OS released kernel BUT that is 5.10.17 and that is
known NOT to work properly.

The following link is a directory of bleeding edge kernels, NOT released
kernels. I assume that is where you got the 7/27/2021 kernel from.

http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/



/etc/apt/sources.list.d/raspi.list:
deb http://archive.raspberrypi.org/debian/ buster main

Package location:
http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel_1.20210727-1_arm64.deb

On Sat, Jul 31, 2021 at 11:59 AM Basil Gunn <basil@pacabunga.com> wrote:


I try to make my own image. I added the following to my
/boot/config.txt
1. I do not support making your own image. A LOT of time went into
making an image that works with the NWDR hats and there is NO compelling
reason for you to make your own image other than it might be fun. By all
means ask questions on the forum because others might be willing to
support you.

2. gpsd configuration is in file: /etc/default/gspd NOT /boot/config.txt

# Configure gpsd
START_DAEMON="true"
DEVICES="/dev/ttySC0 /dev/pps0"
GPSD_OPTIONS="-n"
3. Look at the kernel version on the image you started with.

The last RELEASED Linux kernel that worked with the audio codec that
NWDR DRAWS uses (TI tlv320aic 32x4) is 5.4.83. Kernel version 5.4.79
also works well with that codec. The currently released Raspberry Pi
Foundation kernel, 5.10.17, WILL NOT WORK with this codec. Hence the
hold on kernel updates on the currently released NWDR image.

Anna fixed the kernel problem in Feb 2021 and those patches were
accepted to the main line kernel in March 2021. The currently released
kernel by the Raspberry Pi Foundation, 5.10.17, does NOT have the
following fixes:

* [[https://www.spinics.net/lists/stable/msg455357.html | [PATCH v2 2/2] ASoC: tlv320aic32x4: Register clocks before registering component]]
* [[https://www.spinics.net/lists/stable/msg455356.html | [PATCH v2 1/2] ASoC: tlv320aic32x4: Increase maximum register in regmap]]
* [[https://www.spinics.net/lists/stable/msg455066.html | [PATCH v2] sc16is7xx: Defer probe if device read fails]]

To Summarize:
Kernel versions that work:
5.4.79, 5.4.83, 5.10.31 and above

Kernel versions that DO NOT work:
Any kernel after 5.4.83 and before 5.10.31

Note that Kernel 5.10.31 is not a kernel released by Raspberry Pi
Foundation. If the n7nix repository is installed you can run the
kernver.sh script which will display the currently released Raspberry
Pi foundation kernel and the kernel version you are currently running.

$ kernver.sh
Released kernel version: 5.10.17
Running kernel version: 5.4.79

Also run the following command to display your current kernel version:

uname -a
or
uname -r


Then I rebooted and I got my GPS working. Then I moved my setup to different room and since then the GPS is not working.
pi@w4mhi-shack:~ $ systemctl status gpsd.service
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: SER: device open of /dev/ttySC0 failed: No such file or directory - retrying
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: SER: read-only device open of /dev/ttySC0 failed: No such file or directory
Jul 30 20:12:24 w4mhi-shack gpsd[1576]: gpsd:ERROR: initial GPS device /dev/ttySC0 open failed





Basil Gunn
 

John,

Yesterday morning unattended upgrades updated the pi to version
1:1.20210727-1. From both the debian changelog and the name of the
directory it appears to contain linux 5.10.52.

kernver.sh:
Released kernel version: 5.10.17
Running kernel version: 5.10.11
Thanks for that information.

I turned off my kernel hold and did an apt-get update/apt-get upgrade
and successfully installed kernel 5.10.52 which DOES HAVE Anna's kernel
patches. That kernel works fine with the DRAWS hat.

The kernel in the released version of Raspberry Pi OS image is still down rev (5.10.17)
and will NOT work. The kernel in http://archive.raspberrypi.org/debian/ buster main
repo is now 5.10.52 and will work just fine with DRAWS. Any kernel
version newer than 5.10.31 should be fine.

My previous point was that it is OK to use apt-get upgrade or apt upgrade
but I would stay away from rpi-update which I only use to down grade a
kernel version.

Thanks for pointing out the new kernel in the raspberry pi debian repo.
I will spin up a new NWDR image with this kernel in the next few weeks.

To test your tlv320aic driver after updating to a new kernel run:

aplay -l

and verify that udrc "bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0" is
enumerated in the displayed list.

/Basil


John S Gruber
 

Excellent! That's great news.

Thanks so much and good work, Anna.

I'll try to test it on our club pi this week.

Thanks, Basil.

John N8MSU

On Sun, Aug 1, 2021 at 12:31 PM Basil Gunn <basil@pacabunga.com> wrote:


John,

Yesterday morning unattended upgrades updated the pi to version
1:1.20210727-1. From both the debian changelog and the name of the
directory it appears to contain linux 5.10.52.

kernver.sh:
Released kernel version: 5.10.17
Running kernel version: 5.10.11
Thanks for that information.

I turned off my kernel hold and did an apt-get update/apt-get upgrade
and successfully installed kernel 5.10.52 which DOES HAVE Anna's kernel
patches. That kernel works fine with the DRAWS hat.

The kernel in the released version of Raspberry Pi OS image is still down rev (5.10.17)
and will NOT work. The kernel in http://archive.raspberrypi.org/debian/ buster main
repo is now 5.10.52 and will work just fine with DRAWS. Any kernel
version newer than 5.10.31 should be fine.

My previous point was that it is OK to use apt-get upgrade or apt upgrade
but I would stay away from rpi-update which I only use to down grade a
kernel version.

Thanks for pointing out the new kernel in the raspberry pi debian repo.
I will spin up a new NWDR image with this kernel in the next few weeks.

To test your tlv320aic driver after updating to a new kernel run:

aplay -l

and verify that udrc "bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0" is
enumerated in the displayed list.

/Basil





John S Gruber
 

Thanks Basil. I just tested it and it works great here, too.

On Sun, Aug 1, 2021 at 12:31 PM Basil Gunn <basil@pacabunga.com> wrote:


John,

Yesterday morning unattended upgrades updated the pi to version
1:1.20210727-1. From both the debian changelog and the name of the
directory it appears to contain linux 5.10.52.

kernver.sh:
Released kernel version: 5.10.17
Running kernel version: 5.10.11
Thanks for that information.

I turned off my kernel hold and did an apt-get update/apt-get upgrade
and successfully installed kernel 5.10.52 which DOES HAVE Anna's kernel
patches. That kernel works fine with the DRAWS hat.

The kernel in the released version of Raspberry Pi OS image is still down rev (5.10.17)
and will NOT work. The kernel in http://archive.raspberrypi.org/debian/ buster main
repo is now 5.10.52 and will work just fine with DRAWS. Any kernel
version newer than 5.10.31 should be fine.

My previous point was that it is OK to use apt-get upgrade or apt upgrade
but I would stay away from rpi-update which I only use to down grade a
kernel version.

Thanks for pointing out the new kernel in the raspberry pi debian repo.
I will spin up a new NWDR image with this kernel in the next few weeks.

To test your tlv320aic driver after updating to a new kernel run:

aplay -l

and verify that udrc "bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0" is
enumerated in the displayed list.

/Basil