2025年12月19日 星期五

FN920C04 auto-connected on Nvidia AGX Orin R36.3

Data structure
$ tree -L 1
.
├── apply_binaries.sh
├── bootloader
├── build_l4t_bup.sh
├── flash.sh
├── generate_capsule
├── ...
├── ...
├── kernel
├── l4t_generate_soc_bup.sh
├── l4t_sign_image.sh
├── l4t_uefi_sign_image.sh
├── ...
├── ...
├── rootfs
├── source
├── Tegra_Software_License_Agreement-Tegra-Linux.txt
└── tools

Copy the data to the rootfs, /etc/NetworkManager/system-connections/internet.nmconnection
[connection]

id=internet

uuid=996797c1-56eb-44aa-b7e2-d405ade10bdf

type=gsm

[gsm]

apn=internet

[serial]

[ppp]

[ipv4]

dns-priority=120

method=auto

route-metric=1050

[ipv6]

addr-gen-mode=stable-privacy

method=auto

[proxy]

Change root.


$ ls -alh /run/dbus/
srw-rw-rw-  1 root root    0 Dec 19 09:53 system_bus_socket

$ sudo mount -t proc /proc ./rootfs/proc
$ sudo mount -t sysfs /sys ./rootfs/sys
$ sudo mount -o bind /dev ./rootfs/dev
$ sudo mount -o bind /dev/pts ./rootfs/dev/pts
// for dbus
$ mkdir ./rootfs/run/dbus
$ sudo mount -o bind /run/dbus ./rootfs/run/dbus      //PC env: ubuntu 22.04, kernel: 6.8.0-65-generic 

$ sudo chroot ./rootfs

//enter simulator 
#nmcli connection reload

Rebuild BSP code
r363

FN920C04 should be auto-connected to the Internet
$ ifconfig wwan0
wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.231.60.110  netmask 255.255.255.252  destination 10.231.60.110
        inet6 2001:b400:e2ad:ab1:95f4:6e35:7e1a:4a5e  prefixlen 64  scopeid 0x0<global>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 379  bytes 67264 (67.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 453  bytes 39083 (39.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        

$ mmcli -m 0
  ----------------------------------
  General  |                   path: /org/freedesktop/ModemManager1/Modem/0
  ----------------------------------
  Hardware |           manufacturer: Telit Cinterion
           |                  model: FN920C04-WW
           |      firmware revision: M0V.060001
           |         carrier config: default
           |           h/w revision: 1.10
  ----------------------------------
  System   |                 device: /sys/devices/platform/bus@0/3610000.usb/usb1/1-4/1-4.2
           |                drivers: qmi_wwan, option
           |                 plugin: telit
           |           primary port: cdc-wdm0
           |                  ports: cdc-wdm0 (qmi), ttyUSB0 (ignored), ttyUSB1 (at),
           |                         ttyUSB2 (ignored), wwan0 (net)
  ----------------------------------
  ----------------------------------
  Status   |                   lock: sim-pin2
           |         unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                  state: connected
           |            power state: on
           |            access tech: lte
           |         signal quality: 100% (recent)
  ----------------------------------
  ----------------------------------
  3GPP EPS |   ue mode of operation: csps-2
           |    initial bearer path: /org/freedesktop/ModemManager1/Bearer/0
           | initial bearer ip type: ipv4v6
  ----------------------------------
  SIM      |       primary sim path: /org/freedesktop/ModemManager1/SIM/0
           |         sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
           |                         slot 2: none
  ----------------------------------
  Bearer   |                  paths: /org/freedesktop/ModemManager1/Bearer/1



$ mmcli -b 1
  ------------------------------------
  General            |           path: /org/freedesktop/ModemManager1/Bearer/1
                     |           type: default
  ------------------------------------
  Status             |      connected: yes
                     |      suspended: no
                     |    multiplexed: no
                     |      interface: wwan0
                     |     ip timeout: 20
  ------------------------------------
  Properties         |            apn: internet
                     |        roaming: allowed
                     |        ip type: ipv4v6
                     |   allowed-auth: none, pap, chap, mschap, mschapv2, eap
  ------------------------------------
  IPv4 configuration |         method: static
                     |        address: 10.231.60.110
                     |         prefix: 30
                     |        gateway: 10.231.60.109
                     |            dns: 168.95.1.1, 168.95.192.1
                     |            mtu: 1500
  ------------------------------------
  IPv6 configuration |         method: static
                     |        address: 2001:b400:e2ad:ab1:95f4:6e35:7e1a:4a5e
                     |         prefix: 64
                     |        gateway: 2001:b400:e2ad:ab1:f9db:c24f:25cc:9eb2
                     |            dns: 2001:b000:168::1, 2001:b000:168::2
                     |            mtu: 1500
  ------------------------------------
  Statistics         |     start date: 2025-12-19T07:08:00Z
                     |       duration: 7290
                     |       bytes rx: 71708
                     |       bytes tx: 40369
                     |       attempts: 1
                     | total-duration: 7290
                     | total-bytes rx: 71708
                     | total-bytes tx: 40369

2025年12月18日 星期四

System ID for GNSS L1+L5

NMEA 0183 Version 4.10 (or higher)


Simulators, ex:
  1. Spirent gss 7000
  2. GSP6 Series

GPS
L1 Data (System ID = 1):
$GPGSV,3,1,09,10,30,150,45,12,40,050,44,15,20,310,40,18,60,120,48,1*6A

L5Q Data (System ID = 8):
$GPGSV,2,1,05,10,30,150,38,12,40,050,35,18,60,120,42,,,,8*6F

BeiDou
B1C
$BDGSV,2,1,07,21,30,186,48,24,24,260,37,26,19,211,35,34,13,302,28,3*76


B1i
$BDGSV,7,3,26,08,58,213,36,04,39,116,29,03,58,204,35,01,51,135,,1*7A


$BDGSV,2,1,07,19,28,048,17,21,30,186,39,26,19,211,26,34,13,302,21,5*7


ref:
GPGSV
System ID

2025年12月2日 星期二

Compile ModemManager

Manual compilation

Install depends on the packages

$ sudo apt install meson ninja-build python3-jinja2 libudev-dev libpolkit-gobject-1-dev libmbim-glib-dev libqrtr-glib-dev xsltproc help2man gettext gperf libcap-dev libgirepository1.0-dev libdbus-1-dev

ARM64
$ sudo apt install meson ninja-build python3-jinja2 libudev-dev libpolkit-gobject-1-dev libmbim-glib-dev xsltproc help2man gettext gperf libcap-dev\
libgirepository1.0-dev libdbus-1-dev bash-completion libgudev-1.0-dev libudev-dev libsystemd-dev

elogind

$ pip3 install jinja2
$ git clone https://github.com/elogind/elogind.git
$ cd elogind
$ meson setup build
$ ninja -C build
$ cd build; ninja install

libqrtr
$ git clone https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git
$ cd libqrtr-glib
$ meson setup builddir --prefix=/usr -Dintrospection=true //for all project
$ ninja -C build
$ cd build; ninja install

$ cp /usr/local/share/gir-1.0/Qrtr-1.0.gir /usr/share/gir-1.0/
libqmi
$ git clone https://gitlab.freedesktop.org/mobile-broadband/libqmi.git
$ cd libqmi
$ meson setup build
$ ninja -C build

if encounter the issue...go back previous step, libqrtr
..
..
Couldn't find include 'Qrtr-1.0.gir' (search path: '['/usr/share/gir-1.0', '/usr/share', 'gir-1.0', '/usr/share/gir-1.0', '/usr/share/gir-1.0']')
..
..


ModemManager

$ git clone https://github.com/linux-mobile-broadband/ModemManager
$ cd ModemManager
$ meson setup build_x86 --prefix=/usr --sysconfdir=/etc
$ cd build_x86
$ ninja


RSSI

...
...
ModemManager[27171]: <debug> [1736232436.167606] [modem0] lte_rssi: -48
ModemManager[27171]: <debug> [1736232436.167632] [modem0] RSSI (LTE): -48 dBm
ModemManager[27171]: <debug> [1736232436.167647] [modem0] RSSI: -48 dBm --> 100%
ModemManager[27171]: <debug> [1736232436.167749] [modem0] signal quality updated (100)
ModemManager[27171]: <debug> [1736232436.167771] [modem0] periodic signal quality and access technology checks scheduled
ModemManager[27171]: <debug> [1736232436.199497] [/dev/cdc-wdm1] received message...
......



elogind Troubleshoot:
only show on Ubuntu 20.04, not 22.04
In file included from ../src/basic/socket-util.c:16:
../src/basic/linux/if.h:216:3: error: unknown type name ‘x25_hdlc_proto’
  216 |   x25_hdlc_proto  *x25;
      |   ^~~~~~~~~~~~~~
[172/543] Compiling C object src/basic/libbasic.a.p/terminal-util.c.o
ninja: build stopped: subcommand failed.


src/basic/linux/if.h
...
...
#include <linux/hdlc/ioctl.h>
...
...
struct if_settings {
        unsigned int type; /* Type of physical device or protocol */
        unsigned int size; /* Size of the data allocated by the caller */
        union {
                /* {atm/eth/dsl}_settings anyone ? */
                raw_hdlc_proto *raw_hdlc;
                cisco_proto *cisco;
                fr_proto *fr;
                fr_proto_pvc *fr_pvc;
                fr_proto_pvc_info *fr_pvc_info;
                x25_hdlc_proto		*x25;

                /* interface settings */
                sync_serial_settings *sync;
                te1_settings *te1;
        } ifs_ifsu;
};

only ubuntu 22.04 has it, not 20.04
/usr/include/linux/hdlc/ioctl.h
typedef struct {
      unsigned short dce; /* 1 for DCE (network side) operation */
      unsigned int modulo; /* modulo (8 = basic / 128 = extended) */
      unsigned int window; /* frame window size */
      unsigned int t1; /* timeout t1 */
      unsigned int t2; /* timeout t2 */
      unsigned int n2; /* frame retry counter */
  } x25_hdlc_proto;