| 1923 | ==== Telit FN980M PCIe Mode |
| 1924 | Many people want to use this modem with PCIe. This requires a new MHI driver only in latest kernels (5.15+) available on Venice SBCs. Contact Gateworks support for other board families. |
| 1925 | |
| 1926 | |
| 1927 | |
| 1928 | Install udhcpc |
| 1929 | {{{ |
| 1930 | apt-get update |
| 1931 | apt-get install udhcpc |
| 1932 | }}} |
| 1933 | |
| 1934 | You need to switch the modem into PCIe mode with the AT command: |
| 1935 | {{{ |
| 1936 | AT#USBPCISWITCH=1,5,0 |
| 1937 | AT#REBOOT |
| 1938 | }}} |
| 1939 | To issue the AT command without opening the serial console of the modem, use the code below (assuming modem AT port is ttyUSB2: |
| 1940 | {{{ |
| 1941 | echo -n -e "AT#USBPCISWITCH=1,5,0\r" > /dev/ttyUSB2 |
| 1942 | echo -n -e "AT#REBOOT\r" > /dev/ttyUSB2 |
| 1943 | }}} |
| 1944 | |
| 1945 | Check if modem shows up on PCI bus with a lspci: |
| 1946 | {{{ |
| 1947 | root@focal-venice:~# lspci |
| 1948 | 04:00.0 Unassigned class [ff00]: Qualcomm Device 0306 |
| 1949 | root@focal-venice:~# |
| 1950 | }}} |
| 1951 | |
| 1952 | |
| 1953 | Check if the modem is registering with qmi: |
| 1954 | {{{ |
| 1955 | root@focal-venice:~# qmicli -d /dev/wwan0qmi0 --nas-get-serving-system --device-open-qmi |
| 1956 | [10 Dec 2021, 00:11:07] -Warning ** [/dev/wwan0qmi0] couldn't detect transport type of port: couldn't detect device driver |
| 1957 | [10 Dec 2021, 00:11:07] -Warning ** [/dev/wwan0qmi0] requested QMI mode but unexpected transport type found |
| 1958 | [/dev/wwan0qmi0] Successfully got serving system: |
| 1959 | Registration state: 'registered' |
| 1960 | CS: 'attached' |
| 1961 | PS: 'attached' |
| 1962 | Selected network: '3gpp' |
| 1963 | Radio interfaces: '1' |
| 1964 | [0]: 'lte' |
| 1965 | Roaming status: 'on' |
| 1966 | Data service capabilities: '1' |
| 1967 | [0]: 'lte' |
| 1968 | Current PLMN: |
| 1969 | MCC: '310' |
| 1970 | MNC: '410' |
| 1971 | Description: 'AT&T' |
| 1972 | Roaming indicators: '1' |
| 1973 | [0]: 'on' (lte) |
| 1974 | 3GPP time zone offset: '-480' minutes |
| 1975 | 3GPP daylight saving time adjustment: '0' hours |
| 1976 | 3GPP cell ID: '192330761' |
| 1977 | Detailed status: |
| 1978 | Status: 'available' |
| 1979 | Capability: 'cs-ps' |
| 1980 | HDR Status: 'none' |
| 1981 | HDR Hybrid: 'no' |
| 1982 | Forbidden: 'no' |
| 1983 | LTE tracking area code: '34605' |
| 1984 | Full operator code info: |
| 1985 | MCC: '310' |
| 1986 | MNC: '410' |
| 1987 | MNC with PCS digit: 'yes' |
| 1988 | |
| 1989 | }}} |
| 1990 | |
| 1991 | Now connect to network (example with hologram sim) (forcing ipv4) |
| 1992 | {{{ |
| 1993 | root@focal-venice:~# qmicli --device-open-qmi -p -d /dev/wwan0qmi0 --wds-start-network="ip-type=4,apn=hologram" --client-no-release-cid --device-open-qmi |
| 1994 | [10 Dec 2021, 00:12:12] -Warning ** [/dev/wwan0qmi0] couldn't detect transport type of port: couldn't detect device driver |
| 1995 | [10 Dec 2021, 00:12:12] -Warning ** [/dev/wwan0qmi0] requested QMI mode but unexpected transport type found |
| 1996 | [/dev/wwan0qmi0] Network started |
| 1997 | Packet data handle: '3797963312' |
| 1998 | [/dev/wwan0qmi0] Client ID not released: |
| 1999 | Service: 'wds' |
| 2000 | CID: '16' |
| 2001 | root@focal-venice:~# |
| 2002 | |
| 2003 | }}} |
| 2004 | |
| 2005 | If you want to see your IP use the below, replacing the cid with what was issued above: |
| 2006 | {{{ |
| 2007 | qmicli --device /dev/wwan0qmi0 --client-no-release-cid --client-cid=16 --wds-get-current-settings --device-open-qmi |
| 2008 | }}} |
| 2009 | |
| 2010 | Lastly get IP address for modem interface mhi_hwip0: |
| 2011 | {{{ |
| 2012 | udhcpc -q -f -n -i mhi_hwip0 |
| 2013 | }}} |
| 2014 | |
| 2015 | |