View Full Version : get GPS working with Ericsson f5521gw

4th April 2013, 07:48 PM
Hi All,
I've had no success on getting gpsd to work with Ericssons broadband module f5521gw in a Lenovo X220.

What I did was to see if there is any data:

gpsmon /dev/ttyACM2

gpsd -P /var/run/gpsd.pid -F /var/run/gpsd.sock -N -n /dev/ttyACM2
and checking on localhost:2947 with gpsmod. Unfortunately there was no data.

When I start it daemonized by:

service gpsd start

I get:

[root@trips ~]# service gpsd status
Redirecting to /bin/systemctl status gpsd.service
gpsd.service - GPS Service Daemon
Loaded: loaded (/usr/lib/systemd/system/gpsd.service; disabled)
Active: active (running) since Thu 2013-04-04 13:56:57 CEST; 2s ago
Main PID: 4309 (gpsd)
CGroup: name=systemd:/system/gpsd.service
└─4309 /usr/sbin/gpsd -P /var/run/gpsd.pid -F /var/run/gpsd.sock -N -n /dev/ttyACM2

Apr 04 13:56:57 trips systemd[1]: Started GPS Service Daemon.
Apr 04 13:56:57 trips gpsd[4309]: gpsd:ERROR: PPS ioctl(TIOCMIWAIT) failed: 25 Inappropriate ioctl for device

So, the last line might give a hint...

I appreciate any help on getting gpsd up and running. Oh, I am on F18.


---------- Post added at 06:48 PM ---------- Previous post was at 12:30 PM ----------

Hello again,
when I use picocom to connect to /dev/ttyACM2 (or to ttyACM0 or to ttyACM1) an send the Hayes AT command AT*E2GPSNPD, GPS data is being dumped to the terminal:

[root@trips ~]# picocom /dev/ttyACM2
picocom v1.6

port is : /dev/ttyACM2
flowcontrol : none
baudrate is : 9600
parity is : none
databits are : 8
escape is : C-a
local echo is : no
noinit is : no
noreset is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv
imap is :
omap is :
emap is : crcrlf,delbs,

Terminal ready





So it seems that the only step that I am missing when using gpsd is to switch on the gps using that Hayes command.

Does anybody have an idea on how that activation can be achieved? Is it possible to use /etc/gpsd/device-hook for that purpose? (see http://www.catb.org/gpsd/gpsd.html)

Thanks, Slimhering

26th June 2014, 06:51 PM
Hello (sorry for my english)
i have a Thinkpad T430 with a Ericsson H5321gw with integrated GPS and i have found a solution for my case, i don't know if this solution works for you, it's a workaround with some imperfections:

you need to create/modify 4 files: (I post the location of files and the content)

in this file you must sobstitute the numbers "0bdb" and "1926" with your Vendor and Product id (you can find them with lsusb looking for Ericsson device)
this file sets correctly the permissions to tty terminals of GPS

SUBSYSTEM=="tty", ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1926", OWNER="nobody", GROUP="dialout"


now you must create a directory /etc/gpsd and file below with owner nobody and group dialout and set execute bit on the file. The script injects activation commands in GPS terminals and create a "dummy device" /tmp/gps0 from which gpsd daemon extracts data.


if [ "$1" = "/tmp/gps0" ] && [ "$2" = "ACTIVATE" ];
chat -V "" "AT*E2GPSCTL=1,5,1" "OK" > /dev/ttyACM1 < /dev/ttyACM1
socat /dev/ttyACM2,raw,echo=0,b9600 pty,link=/tmp/gps0,raw,waitslave,echo=0,b9600 > /dev/null &
chat -V "" "AT*E2GPSNPD" > /dev/ttyACM2 < /dev/ttyACM2
if [ "$1" = "/dev/ttyACM2" ] && [ "$2" = "DEACTIVATE" ];
killall -e socat /dev/ttyACM2,raw,echo=0,b9600 pty,link=/tmp/gps0,raw,waitslave,echo=0,b9600
chat -V "" "AT*E2GPSCTL=0,0,0" "OK" > /dev/ttyACM1 < /dev/ttyACM1

next file already exists you must only modify it (THERE IS A BUG HERE.... I don't know why gpsd doesn't connect to /tmp/gps0 if I don't insert also in OPTIONS variable the DEVICE name...)




and the last one for suspend/resume, you must set on it the execution bit for owner


case $1 in
/etc/gpsd/device-hook /tmp/gps0 DEACTIVATE
systemctl stop gpsd.service
/etc/gpsd/device-hook /tmp/gps0 DEACTIVATE
systemctl stop gpsd.service
systemctl restart gpsd.service

ok i hope this functions for you :)