| | 2110 | == Telit FN920 PCIe Mode |
| | 2111 | |
| | 2112 | The Telit FN920C04 supports PCIe, which is new for modems. PCIe is valuable for faster bus speeds compared to USB. This requires a new MHI driver only in latest kernels (6.12+) available on Venice SBCs. Contact Gateworks support for other board families. |
| | 2113 | |
| | 2114 | Requirements: |
| | 2115 | * M.2 Slot on Venice GW7400 / GW82xx / Catalina GW9xxx / or M.2 Adapter |
| | 2116 | * Latest 6.12 kernel or newer from Gateworks |
| | 2117 | * Pull pin 20 low to enable PCIe mode (via adapter or GPIO) |
| | 2118 | |
| | 2119 | Kernel Requirements: |
| | 2120 | {{{ |
| | 2121 | MHI_BUS |
| | 2122 | MHI_BUS_PCI_GENERIC |
| | 2123 | MHI_NET |
| | 2124 | RMNET |
| | 2125 | WWAN |
| | 2126 | WWAN_CORE |
| | 2127 | MHI_WWAN_CTRL |
| | 2128 | }}} |
| | 2129 | |
| | 2130 | These can be found on a live running system with the following example: |
| | 2131 | {{{ |
| | 2132 | root@noble-venice:~# zcat /proc/config.gz | grep MHI |
| | 2133 | CONFIG_QRTR_MHI=m |
| | 2134 | CONFIG_MHI_BUS=m |
| | 2135 | # CONFIG_MHI_BUS_DEBUG is not set |
| | 2136 | CONFIG_MHI_BUS_PCI_GENERIC=m |
| | 2137 | # CONFIG_MHI_BUS_EP is not set |
| | 2138 | CONFIG_MHI_NET=m |
| | 2139 | CONFIG_MHI_WWAN_CTRL=m |
| | 2140 | CONFIG_MHI_WWAN_MBIM=m |
| | 2141 | }}} |
| | 2142 | |
| | 2143 | Check if modem shows up on PCI bus with a lspci: |
| | 2144 | {{{ |
| | 2145 | root@noble-venice:~# lspci |
| | 2146 | 03:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc Device 011a |
| | 2147 | }}} |
| | 2148 | |
| | 2149 | Confirm the mhi_hwip0 interface is seen in /sys/class/net and there are wwan0 devices: |
| | 2150 | {{{ |
| | 2151 | root@noble-venice:~# ls /sys/class/net/ |
| | 2152 | can0 can1 eth0 eth1 lan1 lan2 lan3 lan4 lan5 lo mhi_hwip0 |
| | 2153 | |
| | 2154 | root@noble-venice:~# ls /dev/wwan0* |
| | 2155 | /dev/wwan0at0 /dev/wwan0at1 /dev/wwan0qcdm0 /dev/wwan0qmi0 |
| | 2156 | } |
| | 2157 | }} |
| | 2158 | |
| | 2159 | Create a file /etc/qmi-network.conf and enter in the APN: |
| | 2160 | {{{ |
| | 2161 | root@noble-venice:~# cat /etc/qmi-network.conf |
| | 2162 | APN=HOLOGRAM |
| | 2163 | APN_USER= |
| | 2164 | APN_PASS= |
| | 2165 | PROXY=yes |
| | 2166 | }}} |
| | 2167 | |
| | 2168 | Now connect to network (example with Hologram sim) |
| | 2169 | {{{ |
| | 2170 | root@noble-venice:~# qmi-network /dev/wwan0qmi0 start |
| | 2171 | Loading profile at /etc/qmi-network.conf... |
| | 2172 | APN: HOLOGRAM |
| | 2173 | APN user: unset |
| | 2174 | APN password: unset |
| | 2175 | qmi-proxy: yes |
| | 2176 | IP_TYPE: unset |
| | 2177 | PROFILE: unset |
| | 2178 | Checking data format with 'qmicli -d /dev/wwan0qmi0 --wda-get-data-format --device-open-proxy'... |
| | 2179 | Device link layer protocol retrieved: raw-ip |
| | 2180 | Getting expected data format with 'qmicli -d /dev/wwan0qmi0 --get-expected-data-format'... |
| | 2181 | error: cannot get expected data format: Setting expected data format management is unsupported by the driver |
| | 2182 | Expected link layer protocol not retrieved: kernel unsupported |
| | 2183 | Updating device link layer protocol with 'qmicli -d /dev/wwan0qmi0 --wda-set-data-format=802-3 --device-open-proxy'... |
| | 2184 | New device link layer protocol retrieved: raw-ip |
| | 2185 | Starting network with 'qmicli -d /dev/wwan0qmi0 --wds-start-network=apn='HOLOGRAM' --client-no-release-cid --device-open-proxy'... |
| | 2186 | Saving state at /tmp/qmi-network-state-wwan0qmi0... (CID: 14) |
| | 2187 | Saving state at /tmp/qmi-network-state-wwan0qmi0... (PDH: 3767202208) |
| | 2188 | Network started successfully |
| | 2189 | }}} |
| | 2190 | |
| | 2191 | Get IP address for modem interface mhi_hwip0: |
| | 2192 | {{{ |
| | 2193 | root@noble-venice:~# qmicli -d /dev/wwan0qmi0 --wds-get-current-settings |
| | 2194 | [/dev/wwan0qmi0] Current settings retrieved: |
| | 2195 | IP Family: IPv4 |
| | 2196 | IPv4 address: 10.200.181.105 |
| | 2197 | IPv4 subnet mask: 255.255.255.252 |
| | 2198 | IPv4 gateway address: 10.200.181.106 |
| | 2199 | IPv4 primary DNS: 8.8.8.8 |
| | 2200 | IPv4 secondary DNS: 8.8.4.4 |
| | 2201 | MTU: 1500 |
| | 2202 | Domains: none |
| | 2203 | |
| | 2204 | }}} |
| | 2205 | |
| | 2206 | Manually bring up mhi_hwip0 and assign it the IP from above: |
| | 2207 | {{{ |
| | 2208 | root@noble-venice:~# ifconfig mhi_hwip0 up |
| | 2209 | root@noble-venice:~# ifconfig mhi_hwip0 10.200.181.105 netmask 255.255.255.252 |
| | 2210 | root@noble-venice:~# route add default gw 10.200.181.106 mhi_hwip0 |
| | 2211 | root@noble-venice:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf |
| | 2212 | root@noble-venice:~# echo "nameserver 8.8.4.4" >> /etc/resolv.conf |
| | 2213 | root@noble-venice:~# ping www.google.com |
| | 2214 | }}} |
| | 2215 | |
| | 2216 | === Troubleshooting |
| | 2217 | * Be sure the modem PCIe ID is included the the MHI PCIe driver (kernel commit by Telit in 6.16 kernel [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/bus/mhi/host/pci_generic.c?id=6348f62ef7ecc5855b710a7d4ea682425c38bb80 here]) |
| | 2218 | * Be sure pin 20 is pulled low for Mini-PCIe mode |
| | 2219 | * Be sure all MHI related drivers are turned on in the kernel |
| | 2220 | {{{ |
| | 2221 | root@noble-venice:~# dmesg | grep elit |
| | 2222 | [ 6.426205] mhi-pci-generic 0000:03:00.0: MHI PCI device found: telit-fn920c04 |
| | 2223 | [ 25.232512] usb 1-1.1: Manufacturer: Telit Cinterion |
| | 2224 | |
| | 2225 | }}} |
| | 2226 | |
| | 2227 | |
| | 2228 | |