[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1127dc09.55cb.1968040ac46.Coremail.slark_xiao@163.com>
Date: Tue, 29 Apr 2025 14:34:04 +0800 (CST)
From: "Slark Xiao" <slark_xiao@....com>
To: "Muhammad Nuzaihan Kamal Luddin" <zaihan@...ealasia.net>
Cc: "Sergey Ryazanov" <ryazanov.s.a@...il.com>,
"Loic Poulain" <loic.poulain@....qualcomm.com>,
"Johannes Berg" <johannes@...solutions.net>,
"Andrew Lunn" <andrew+netdev@...n.ch>,
"Eric Dumazet" <edumazet@...gle.com>,
"David S Miller" <davem@...emloft.net>,
"Jakub Kicinski" <kuba@...nel.org>,
"Abeni Paolo" <pabeni@...hat.com>, netdev@...r.kernel.org,
"Qiang Yu" <quic_qianyu@...cinc.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@...aro.org>,
"Johan Hovold" <johan@...nel.org>
Subject: Re:Re: [RFC PATCH 4/6] net: wwan: add NMEA port support
At 2025-04-28 21:23:53, "Muhammad Nuzaihan Kamal Luddin" <zaihan@...ealasia.net> wrote:
>Hi Slark,
>
>you cab add udev rules to set the permissions.
>
>Regards,
>Zaihan
>Sent from my iPhone
>
Hi Zaihan,
Thanks for your advice.
But I tried in my local, no matter the mode is 644 or 755, similar issue still exist.
BTW, this error only was reported when I call "gpsmon" or "cgps" command.
test reference as below:
jbd@jbd:~$ cat /etc/udev/rules.d/99-gps.rules
KERNEL=="gnss0", MODE="0755", GROUP="dialout"
4月 29 14:08:17 jbd gpsd[3544]: gpsd:ERROR: SER: device open of /dev/gnss0 failed: Permission denied - retrying read-only
4月 29 14:08:17 jbd gpsd[3544]: gpsd:ERROR: SER: read-only device open of /dev/gnss0 failed: Permission denied
4月 29 14:08:17 jbd gpsd[3544]: gpsd:ERROR: /dev/gnss0: device activation failed, freeing device.
jbd@jbd:~$
jbd@jbd:~$ ls -l /dev/gnss0
crwxr-xr-x 1 root dialout 237, 0 4月 29 14:05 /dev/gnss0
Thanks
>> On 28 Apr 2025, at 4:28 PM, Slark Xiao <slark_xiao@....com> wrote:
>>
>>
>> At 2025-04-09 18:42:59, "Sergey Ryazanov" <ryazanov.s.a@...il.com> wrote:
>>>> On April 9, 2025 11:30:58 AM GMT+03:00, Slark Xiao <slark_xiao@....com> wrote:
>>>>
>>>> Hi Sergey,
>>>> Device port /dev/gnss0 is enumerated . Does it be expected?
>>>> I can get the NMEA data from this port by cat or minicom command.
>>>> But the gpsd.service also can not be initialized normally. It reports:
>>>>
>>>> TriggeredBy: ● gpsd.socket
>>>> Process: 3824 ExecStartPre=/bin/stty speed 115200 -F $DEVICES (code=exited, status=1/FAILURE)
>>>> CPU: 7ms
>>>>
>>>> 4月 09 16:04:16 jbd systemd[1]: Starting GPS (Global Positioning System) Daemon...
>>>> 4月 09 16:04:17 jbd stty[3824]: /bin/stty: /dev/gnss0: Inappropriate ioctl for device
>>>> 4月 09 16:04:17 jbd systemd[1]: gpsd.service: Control process exited, code=exited, status=1/FAILURE
>>>> 4月 09 16:04:17 jbd systemd[1]: gpsd.service: Failed with result 'exit-code'.
>>>> 4月 09 16:04:17 jbd systemd[1]: Failed to start GPS (Global Positioning System) Daemon.
>>>>
>>>> Seems it's not a serial port.
>>>
>>> It is a char dev lacking some IOCTLs support. Yeah.
>>>
>>>> Any advice?
>>>
>>> Yep. Remove that stty invocation from the service definition. For me, gpsd works flawlessly. You can try to start it manually from a terminal.
>>>
>>> --
>>> Sergey
>> Hi Sergey,
>> My device could output the NMEA data by port /dev/gnss0. Something like below:
>>
>> $GPRMC,071634.00,A,2239.372067,N,11402.653048,E,,,280425,,,A,V*2D
>> $GARMC,071634.00,A,2239.372067,N,11402.653048,E,,,280425,,,A,V*3C
>> $GBRMC,071634.00,A,2239.372067,N,11402.653048,E,,,280425,,,A,V*3F
>> $GNRMC,071634.00,A,2239.372067,N,11402.653048,E,,,280425,,,A,V*33
>> $GNGNS,071634.00,2239.372067,N,11402.653048,E,NAANNN,02,500.0,,,,,V*15
>> $GPGGA,071634.00,2239.372067,N,11402.653048,E,1,00,500.0,,,,,,*59
>> $GAGGA,071634.00,2239.372067,N,11402.653048,E,1,01,500.0,,,,,,*49
>> $GBGGA,071634.00,2239.372067,N,11402.653048,E,1,00,500.0,,,,,,*4B
>> $GNGGA,071634.00,2239.372067,N,11402.653048,E,1,02,500.0,,,,,,*45
>> $GPGSV,4,1,13,04,00,038,,05,33,240,,06,41,033,,09,25,058,,1*6F
>> $GPGSV,4,2,13,11,47,344,,12,33,286,,13,09,185,,17,29,128,,1*6E
>> $GPGSV,4,3,13,19,54,113,,20,62,284,,22,15,174,,25,09,311,,1*68
>> $GPGSV,4,4,13,40,00,000,28,1*58
>> $GLGSV,3,1,09,10,19,245,,06,38,185,,09,06,203,,11,13,296,,1*79
>> $GLGSV,3,2,09,05,60,064,,20,39,013,,19,17,084,,21,15,321,,1*7E
>> $GLGSV,3,3,09,04,16,030,,1*41
>> $GAGSV,3,1,11,02,30,297,,04,32,076,,05,10,188,,06,41,107,,7*78
>> $GAGSV,3,2,11,09,39,140,,10,26,055,,11,42,027,,12,09,071,,7*7E
>> $GAGSV,3,3,11,16,36,198,,24,19,176,,36,39,317,,7*45
>> $GBGSV,4,1,15,01,47,122,,02,46,234,,03,63,189,,04,34,108,,1*7D
>> $GBGSV,4,2,15,05,23,253,,06,04,187,,07,86,194,,08,68,284,,1*75
>> $GBGSV,4,3,15,09,03,201,,10,78,299,,11,56,025,,12,29,094,,1*71
>>
>> But the gpsd progress were stuck with below errors:
>> ● gpsd.service - GPS (Global Positioning System) Daemon
>> Loaded: loaded (/lib/systemd/system/gpsd.service; enabled; vendor preset: enabled)
>> Active: active (running) since Mon 2025-04-28 23:16:47 CST; 20s ago
>> TriggeredBy: ● gpsd.socket
>> Process: 5281 ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $OPTIONS $DEVICES (code=exited, status=0/SUCCESS)
>> Main PID: 5283 (gpsd)
>> Tasks: 1 (limit: 37272)
>> Memory: 652.0K
>> CPU: 10ms
>> CGroup: /system.slice/gpsd.service
>> └─5283 /usr/sbin/gpsd -F /var/run/gpsd.sock /dev/gnss0
>>
>> 4月 28 23:16:47 jbd systemd[1]: Starting GPS (Global Positioning System) Daemon...
>> 4月 28 23:16:47 jbd systemd[1]: Started GPS (Global Positioning System) Daemon.
>> 4月 28 23:17:02 jbd gpsd[5283]: gpsd:ERROR: SER: device open of /dev/gnss0 failed: Permission denied - retrying read-only
>> 4月 28 23:17:02 jbd gpsd[5283]: gpsd:ERROR: SER: read-only device open of /dev/gnss0 failed: Permission denied
>> 4月 28 23:17:02 jbd gpsd[5283]: gpsd:ERROR: /dev/gnss0: device activation failed, freeing device.
>>
>> And I checked the gnss device attribute, it reports:
>> crw------- 1 root root 237, 0 4月 28 2025 /dev/gnss0
>>
>> May I know how do you fix this?
>>
>> Thanks
>>
>>
Powered by blists - more mailing lists