Acabei de tentar usar meu dispositivo GPS USB. cgps mostra N/A para todas as medições. lsusb mostra meu dispositivo GPS. Eu alterei /etc/default/gpsd
para ter DEVICES="/dev/ttyS0"
como eu não tenho ttyUSB0
.
john@desktop:~$ cat /etc/default/gpsd
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyS0"
# Other options you want to
john@desktop:~/Temporary$ sudo systemctl status gpsd
[sudo] password for john:
● gpsd.service - GPS (Global Positioning System) Daemon
Loaded: loaded (/lib/systemd/system/gpsd.service; enabled; vendor>
Active: active (running) since Sun 2022-06-12 09:05:53 BST; 6h ago
TriggeredBy: ● gpsd.socket
Main PID: 65983 (gpsd)
Tasks: 1 (limit: 19050)
Memory: 588.0K
CGroup: /system.slice/gpsd.service
└─65983 /usr/sbin/gpsd /dev/ttyS0
Jun 12 09:05:53 desktop systemd[1]: Starting GPS (Global Positioning S>
Jun 12 09:05:53 desktop systemd[1]: Started GPS (Global Positioning Sy>
autofs
block
bsg
btrfs-control
bus
cdrom
cdrw
char
console
core
cpu
cpu_dma_latency
cuse
disk
dma_heap
dri
dvd
dvdrw
ecryptfs
fb0
fd
full
fuse
gpiochip0
gpiochip1
gps0
hidraw0
hidraw1
hidraw2
hidraw3
hidraw4
hidraw5
hpet
hugepages
hwrng
i2c-0
i2c-1
i2c-2
initctl
input
kmsg
kvm
lightnvm
log
loop0
loop1
loop10
loop11
loop12
loop13
loop14
loop15
loop16
loop17
loop18
loop19
loop2
loop20
loop21
loop22
loop23
loop24
loop25
loop26
loop27
loop28
loop29
loop3
loop30
loop4
loop5
loop6
loop7
loop8
loop9
loop-control
mapper
mcelog
media0
mem
mqueue
net
null
nvidia0
nvidiactl
nvidia-modeset
nvidia-uvm
nvidia-uvm-tools
nvram
port
ppp
pps0
psaux
ptmx
ptp0
pts
random
rfkill
rtc
rtc0
sda
sda1
sda2
serial
sg0
sg1
shm
snapshot
snd
sr0
stderr
stdin
stdout
tty
tty0
tty1
tty10
tty11
tty12
tty13
tty14
tty15
tty16
tty17
tty18
tty19
tty2
tty20
tty21
tty22
tty23
tty24
tty25
tty26
tty27
tty28
tty29
tty3
tty30
tty31
tty32
tty33
tty34
tty35
tty36
tty37
tty38
tty39
tty4
tty40
tty41
tty42
tty43
tty44
tty45
tty46
tty47
tty48
tty49
tty5
tty50
tty51
tty52
tty53
tty54
tty55
tty56
tty57
tty58
tty59
tty6
tty60
tty61
tty62
tty63
tty7
tty8
tty9
ttyACM0
ttyprintk
ttyS0
ttyS1
ttyS10
ttyS11
ttyS12
ttyS13
ttyS14
ttyS15
ttyS16
ttyS17
ttyS18
ttyS19
ttyS2
ttyS20
ttyS21
ttyS22
ttyS23
ttyS24
ttyS25
ttyS26
ttyS27
ttyS28
ttyS29
ttyS3
ttyS30
ttyS31
ttyS4
ttyS5
ttyS6
ttyS7
ttyS8
ttyS9
udmabuf
uhid
uinput
urandom
usb
userio
v4l
vboxdrv
vboxdrvu
vboxnetctl
vboxusb
vcs
vcs1
vcs2
vcs3
vcs4
vcs5
vcs6
vcsa
vcsa1
vcsa2
vcsa3
vcsa4
vcsa5
vcsa6
vcsu
vcsu1
vcsu2
vcsu3
vcsu4
vcsu5
vcsu6
vfio
vga_arbiter
vhci
vhost-net
vhost-vsock
video0
video1
video2
zero
zfs
john@desktop:~/Temporary$ usb-devices | awk '/1546/' RS=
T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=04 Dev#= 6 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1546 ProdID=01a7 Rev=01.00
S: Manufacturer=u-blox AG - www.u-blox.com
S: Product=u-blox 7 - GPS/GNSS Receiver
C: #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=100mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 Driver=cdc_acm
I: If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=ff Driver=cdc_acm
O dispositivo correto não é
/dev/ttyS0
, mas/dev/ttyACM0
.Altere a configuração.
Cuidado, você deve adicionar o usuário ao
dialout
grupo para obter acesso à porta.