Difference between revisions of "DESK-MX8M-L/Peripherals/WiFI"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- !style="border-le...")
 
(Additional information)
 
(4 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
|-
 
|-
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |2024/04/08
+
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |{{oldid|20320|2024/04/08}}
 
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MX8M-L-4.1.0 release
 
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MX8M-L-4.1.0 release
 +
|-
 +
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |2024/05/31
 +
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK-MX8M-L-4.x.x configuration for SBC ORCA
 
|-
 
|-
 
|}
 
|}
Line 17: Line 20:
 
=== Device tree configuration ===
 
=== Device tree configuration ===
  
Here below an example of device tree configuration used on standard DAVE's kit for the MITO 8M Mini:
+
==== ORCA SOM ====
 +
 
 +
Here below an example of device tree configuration used on standard DAVE's kit for the ORCA SOM:
  
From <code>imx8mm-mito8mmini.dts</code>:
+
From <code>imx8mp-mito8mplus-cb1001.dts</code>:
  
 
<pre>
 
<pre>
...
+
/* DWS */
...
+
&usdhc1 {
pcie0_refclk: pcie0-refclk {
 
compatible = "fixed-clock";
 
#clock-cells = <0>;
 
clock-frequency = <100000000>;
 
};
 
...
 
...
 
regulators {
 
...
 
reg_pcie_pwr: pcie_pwr {
 
compatible = "regulator-fixed";
 
regulator-name = "PCIe_PWREN";
 
regulator-min-microvolt = <3300000>;
 
regulator-max-microvolt = <3300000>;
 
regulator-always-on;
 
gpio = <&gpio2 20 GPIO_ACTIVE_HIGH>;
 
enable-active-high;
 
};
 
...
 
...
 
&pcie0 {
 
 
pinctrl-names = "default";
 
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcie0>;
+
pinctrl-0 = <&pinctrl_usdhc1>;
disable-gpio = <&gpio5 20 GPIO_ACTIVE_LOW>;
+
vmmc-supply = <&reg_wlan_en>;
reset-gpio = <&gpio5 21 GPIO_ACTIVE_LOW>;
+
bus-width = <4>;
wake-gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>;
+
non-removable;
clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>,
 
<&clk IMX8MM_CLK_PCIE1_AUX>,
 
<&clk IMX8MM_CLK_PCIE1_PHY>,
 
<&pcie0_refclk>;
 
clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
 
assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
 
  <&clk IMX8MM_CLK_PCIE1_PHY>,
 
  <&clk IMX8MM_CLK_PCIE1_CTRL>;
 
assigned-clock-rates = <10000000>, <100000000>, <250000000>;
 
assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
 
<&clk IMX8MM_SYS_PLL2_100M>,
 
<&clk IMX8MM_SYS_PLL2_250M>;
 
ext_osc = <0>;
 
 
status = "okay";
 
status = "okay";
 
};
 
};
 +
</pre>
 +
 +
and from <code>imx8mp-mito8mplus.dtsi</code>:
 +
 +
<pre>
 +
pinctrl_usdhc1: usdhc1grp {
 +
fsl,pins = <
 +
MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190
 +
MX8MP_IOMUXC_SD1_CMD__USDHC1_CMD 0x1d0
 +
MX8MP_IOMUXC_SD1_DATA0__USDHC1_DATA0 0x1d0
 +
MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d0
 +
MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d0
 +
MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d0
 +
>;
 +
};
 +
</pre>
 +
 +
==== MITO 8M Mini  ====
 +
 +
For device-tree configuration, please take a look to [[DESK-MX8M-L/Peripherals/PCI_express | PCIe]] page for DESK-MX8M-L
 +
 +
===Accessing the peripheral SBC ORCA===
 +
 +
====Linux messages at boot time====
 +
<pre class="workstation-terminal">
 +
[    8.307124] [TELIT] Using WE866C6 board data.
 +
[    8.374212] ol_download_firmware: chip_id:0x5020001 board_id:0x0
 +
[    8.374448] __ol_transfer_bin_file: Failed to get bdwlan30_c6.b00:-2
 +
[    8.374455] __ol_transfer_bin_file: Trying to load default bdwlan30_c6.bin
 +
[    8.376904] Board extended Data download address: 0x0
 +
[    8.394418] __ol_transfer_bin_file: Loading setup file qsetup30.bin
 +
[    8.394497] __ol_transfer_bin_file: Failed to get qsetup30.bin:-2
 +
[    9.008083] R0: wlan: [244:E :SAP] dfs_init_radar_filters[217]: Unknown dfs domain 0
 +
[    9.023752] Target Ready! : transmit resources : 3 size:1792, MaxMsgsPerHTCBundle = 32
 +
[    9.111014] target uses HTT version 3.60; host uses 3.28
 +
[    9.112979] DEBUGFS PEER MAC = 0x2:0x21:0x7e:0x2:0x47:0xe7
 +
[    9.116337] *** Warning: host/target HTT versions are different, though compatible!
 +
[    9.133715] Host SW:4.5.25.46, FW:0.0.0.111, HW:QCA93x7_REV1_1
 +
[    9.140159] ENTER sme_set_btc_coex_dutycycle = 30
 +
[    9.140170] ENTER sme_set_btc_coex_dutycycle =30
 +
[    9.145422] ath_hif_sdio: HIF (Atheros/multi-bss)
 +
[    9.154899] wlan: driver loaded in 1060000
 +
</pre>
 +
 +
====Enable the interface and check status====
 +
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mp:~# rfkill list
 +
0: phy0: Wireless LAN
 +
        Soft blocked: yes
 +
        Hard blocked: no
 +
root@desk-mx8mp:~# rfkill unblock 0
 +
root@desk-mx8mp:~# ifconfig wlan0 up
 +
root@desk-mx8mp:~# ifconfig wlan0
 +
wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
 +
        ether 00:21:7e:81:47:e7  txqueuelen 3000  (Ethernet)
 +
        RX packets 0  bytes 0 (0.0 B)
 +
        RX errors 0  dropped 0  overruns 0  frame 0
 +
        TX packets 0  bytes 0 (0.0 B)
 +
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 +
 +
root@desk-mx8mp:~#
 +
</pre>
 +
 +
==== Usage with [https://wireless.wiki.kernel.org/en/users/documentation/iw iw] tool ====
 +
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mp:~# iw wlan0 scan
 +
BSS d6:21:f9:35:8e:88(on wlan0)
 +
        last seen: 399.264s [boottime]
 +
        TSF: 6117312270692 usec (70d, 19:15:12)
 +
        freq: 5180
 +
        beacon interval: 100 TUs
 +
        capability: ESS Privacy SpectrumMgmt ShortSlotTime RadioMeasure (0x1511)
 +
        signal: -51.00 dBm
 +
        last seen: 0 ms ago
 +
        Information elements from Probe Response frame:
 +
        SSID: davesrl
 +
        Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0
 
...
 
...
 
...
 
...
&iomuxc {
 
 
...
 
...
...
+
        Transmit Power Envelope:
pinctrl_pcie0: pcie0grp {
+
                * Local Maximum Transmit Power For 20 MHz: 23 dBm
fsl,pins = <
+
                * Local Maximum Transmit Power For 40 MHz: 23 dBm
MX8MM_IOMUXC_I2C4_SCL_GPIO5_IO20   0x19
+
                * Local Maximum Transmit Power For 80 MHz: 23 dBm
MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21   0x19
+
        WMM:    * Parameter version 1
MX8MM_IOMUXC_SD2_WP_GPIO2_IO20   0x19
+
                * BE: CW 15-1023, AIFSN 3
MX8MM_IOMUXC_SAI5_RXC_GPIO3_IO20 0x19
+
                * BK: CW 15-1023, AIFSN 7
>;
+
                * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
};
+
                * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
 +
root@desk-mx8mp:~#
 +
</pre>
 +
 
 +
====Setup for DHCP connection====
 +
 
 +
Add the network configuration for <code>systemd-networkd</code>, disable the <code>connman</code> service and enable the <code>resolv.conf</code> via <code>systemd-resolved</code>:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mp:~# cat /etc/systemd/network/21-wlan0.network
 +
[Match]
 +
Name=wlan0
 +
 
 +
# Prevent the interface loading if the kernel boots from nfs
 +
KernelCommandLine=!nfsroot
 +
 
 +
[Network]
 +
DHCP=yes
 +
root@desk-mx8mp:~# systemctl disable connman.service
 +
Removed /etc/systemd/system/multi-user.target.wants/connman.service.
 
...
 
...
 
...
 
...
 +
root@desk-mx8mp:~# ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
 +
</pre>
 +
 +
Setup your <code>wpa_supplicant.conf</code> configuration file for handle WiFi connection:
 +
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mp:~# cat /etc/wpa_supplicant.conf
 +
ctrl_interface=/var/run/wpa_supplicant
 +
ctrl_interface_group=0
 +
update_config=1
 +
 +
network={
 +
        ssid="daveguest"
 +
        psk="********"
 +
}
 +
</pre>
 +
 +
Reboot the system and manually start the <code>wpa_supplicant</code> using the <code>wlan0</code> interface and the <code>wpa_supplicant.conf</code> configuration file:
 +
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mp:~# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
 +
Successfully initialized wpa_supplicant
 +
root@desk-mx8mp:~# [  132.978188] DEBUGFS PEER MAC = 0xd0:0x21:0xf9:0x35:0x8e:0x88
 +
[  133.070518] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
 +
 +
root@desk-mx8mp:~#
 +
</pre>
 +
 +
Then the interface will be properly configured (see the IP address configured) and the network access is enabled:
 +
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mp:~# ifconfig wlan0
 +
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
 +
        inet 10.203.1.186  netmask 255.255.255.0  broadcast 10.203.1.255
 +
        inet6 fe80::221:7eff:fe81:47e7  prefixlen 64  scopeid 0x20<link>
 +
        ether 00:21:7e:81:47:e7  txqueuelen 3000  (Ethernet)
 +
        RX packets 6  bytes 1012 (1012.0 B)
 +
        RX errors 0  dropped 0  overruns 0  frame 0
 +
        TX packets 22  bytes 3101 (3.0 KiB)
 +
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 +
 +
root@desk-mx8mp:~# ping www.dave.eu
 +
PING www.dave.eu (51.91.120.202) 56(84) bytes of data.
 +
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=1 ttl=48 time=40.1 ms
 +
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=2 ttl=48 time=46.8 ms
 +
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=3 ttl=48 time=46.0 ms
 +
^C
 +
--- www.dave.eu ping statistics ---
 +
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
 +
rtt min/avg/max/mdev = 40.124/44.331/46.821/2.991 ms
 +
root@desk-mx8mp:~#
 
</pre>
 
</pre>
  
===Accessing the peripheral ===
+
===Accessing the peripheral MITO 8M Mini ===
  
 
====Linux messages at boot time====
 
====Linux messages at boot time====
  
PCIe driver initialized:
+
Check that AzureWave driver for PCIe was initialized:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
 
...
 
...
 
...                                                                                   
 
...                                                                                   
[    1.131579] ehci-pci: EHCI PCI platform driver
+
[    6.519674] mwifiex_pcie 0000:01:00.0: no quirks enabled
[    1.147680] ohci-pci: OHCI PCI platform driver                                                                     
+
[    6.525230] mwifiex_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[    3.234024] imx6q-pcie 33800000.pcie: supply epdev_on not found, using dummy regulator
+
[    6.593357] mwifiex_pcie: PCI memory map Virt0: (____ptrval____) PCI memory map Virt2: (____ptrval____)
[    3.242348] imx6q-pcie 33800000.pcie: PLL REF_CLK is used!.             
+
...
[    3.276463] imx6q-pcie 33800000.pcie: PCIe PLL is locked.      
+
[    7.638822] mwifiex_pcie 0000:01:00.0: info: FW download over, size 632240 bytes
[    3.284714] imx6q-pcie 33800000.pcie: iATU unroll: enabled             
+
...
[    3.295015] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
+
[    8.509865] mwifiex_pcie 0000:01:00.0: WLAN FW is active
[    3.309648] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
+
[    8.562243] mwifiex_pcie 0000:01:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (16.68.1.p179)
[    3.316925] imx6q-pcie 33800000.pcie:       IO 0x001ff80000..0x001ff8ffff -> 0x0000000000
+
[    8.570473] mwifiex_pcie 0000:01:00.0: driver_version = mwifiex 1.0 (16.68.1.p179)
[    3.330476] imx6q-pcie 33800000.pcie:      MEM 0x0018000000..0x001fefffff -> 0x0018000000
 
[    3.342505] imx6q-pcie 33800000.pcie: iATU unroll: enabled             
 
[    3.351821] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
 
[    3.444200] imx6q-pcie 33800000.pcie: Link up
 
 
...
 
...
 
...
 
...
 
</pre>
 
</pre>
  
Check which are the devices connected to the PCIe.
+
and the WiFi module is available as PCIe device:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
 
root@desk-mx8mm:~# lspci
 
root@desk-mx8mm:~# lspci
 
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
 
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb)
+
01:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 2b42 (rev 11)
 +
root@desk-mx8mm:~#
 +
</pre>
 +
 
 +
====Setup for static connection====
 +
 
 +
Check that the interface is properly intialized:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# ifconfig mlan0
 +
mlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
 +
        ether e8:fb:1c:e1:80:65  txqueuelen 1000  (Ethernet)
 +
        RX packets 0  bytes 0 (0.0 B)
 +
        RX errors 0  dropped 0  overruns 0  frame 0
 +
        TX packets 0  bytes 0 (0.0 B)
 +
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 +
</pre>
 +
 
 +
Setup the <code>wpa_supplicant.conf</code> configuration file for handling the WiFi connection, for example:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# cat /etc/wpa_supplicant.conf
 +
network={
 +
    ssid="ZyXEL"
 +
    key_mgmt=NONE
 +
}
 +
</pre>
 +
 
 +
Apply the <code>wpa_supplicant.conf</code> configuration file manually starting the <code>wpa_supplicant</code>:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# wpa_supplicant -i mlan0 -c /etc/wpa_supplicant.conf -B
 +
Successfully initialized wpa_supplicant
 +
...
 +
root@desk-mx8mm:~#
 +
</pre>
 +
 
 +
Add the <code>mlan0</code> IP address:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# ip addr add 192.168.11.165/255.255.255.0 dev mlan0
 +
</pre>
 +
 
 +
Then the network access is enabled:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# ping 192.168.11.243 -c 4
 +
PING 192.168.11.243 (192.168.11.243) 56(84) bytes of data.
 +
64 bytes from 192.168.11.243: icmp_seq=1 ttl=64 time=2.93 ms
 +
64 bytes from 192.168.11.243: icmp_seq=2 ttl=64 time=2.96 ms
 +
64 bytes from 192.168.11.243: icmp_seq=3 ttl=64 time=1.97 ms
 +
64 bytes from 192.168.11.243: icmp_seq=4 ttl=64 time=2.77 ms
 +
 
 +
--- 192.168.11.243 ping statistics ---
 +
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
 +
rtt min/avg/max/mdev = 1.969/2.657/2.962/0.404 ms
 +
root@desk-mx8mm:~#
 +
</pre>
 +
 
 +
====Setup for DHCP connection====
 +
 
 +
Check that the interface is properly recognized:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# ifconfig mlan0
 +
mlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
 +
        ether e8:fb:1c:e1:80:65  txqueuelen 1000  (Ethernet)
 +
        RX packets 0  bytes 0 (0.0 B)
 +
        RX errors 0  dropped 0  overruns 0  frame 0
 +
        TX packets 0  bytes 0 (0.0 B)
 +
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 +
</pre>
 +
 
 +
Add the network configuration for <code>systemd-networkd</code>
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# cat /etc/systemd/network/21-mlan0.network
 +
[Match]
 +
Name=mlan0
 +
 
 +
# Prevent the interface loading if the kernel boots from nfs
 +
KernelCommandLine=!nfsroot
 +
 
 +
[Network]
 +
DHCP=yes
 +
</pre>
 +
 
 +
Setup your <code>wpa_supplicant.conf</code> configuration file for handle WiFi connection:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# cat /etc/wpa_supplicant.conf
 +
network={
 +
        ssid="daveguest"
 +
        psk="******"
 +
}
 +
</pre>
 +
 
 +
Reboot the system and manually start the <code>wpa_supplicant</code> using the <code>mlan0</code> interface and the <code>wpa_supplicant.conf</code> configuration file:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# wpa_supplicant -i mlan0 -c /etc/wpa_supplicant.conf -B
 +
Successfully initialized wpa_supplicant
 +
...
 +
[  131.877506] ieee80211 phy0: mwifiex_cfg80211_sched_scan_start : Invalid Sched_scan parameters
 +
root@desk-mx8mm:~# [  134.728825] mwifiex_pcie 0000:01:00.0: info: trying to associate to bssid d0:21:f9:35:87:e8
 +
[  134.754118] mwifiex_pcie 0000:01:00.0: info: associated to bssid d0:21:f9:35:87:e8 successfully
 +
[  134.778115] IPv6: ADDRCONF(NETDEV_CHANGE): mlan0: link becomes ready
 +
</pre>
 +
 
 +
Then the interface will be properly configured and the network access is enabled:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# ping www.dave.eu -c 4
 +
PING www.dave.eu (51.91.120.202) 56(84) bytes of data.
 +
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=1 ttl=48 time=332 ms
 +
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=2 ttl=48 time=254 ms
 +
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=3 ttl=48 time=174 ms
 +
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=4 ttl=48 time=94.2 ms
 +
 
 +
--- www.dave.eu ping statistics ---
 +
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
 +
rtt min/avg/max/mdev = 94.197/213.585/332.136/88.720 ms
 
root@desk-mx8mm:~#
 
root@desk-mx8mm:~#
 
</pre>
 
</pre>
Line 119: Line 355:
 
=== Additional information ===
 
=== Additional information ===
  
[[Category:MITO 8M Mini]]
+
* [https://wireless.wiki.kernel.org/en/users/documentation/rfkill rfkill]
 +
* [https://wireless.wiki.kernel.org/en/users/documentation/iw iw tool]
 +
* [https://wireless.wiki.kernel.org/en/users/documentation/wpa_supplicant wpa_supplicant]
 +
 
 +
[[Category:ORCA]] [[Category:MITO 8M Mini]]

Latest revision as of 10:44, 31 May 2024

History
Issue Date Notes

2024/04/08

DESK-MX8M-L-4.1.0 release
2024/05/31 DESK-MX8M-L-4.x.x configuration for SBC ORCA


Peripheral WiFi[edit | edit source]

Device tree configuration[edit | edit source]

ORCA SOM[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the ORCA SOM:

From imx8mp-mito8mplus-cb1001.dts:

/* DWS */
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1>;
	vmmc-supply = <&reg_wlan_en>;
	bus-width = <4>;
	non-removable;
	status = "okay";
};

and from imx8mp-mito8mplus.dtsi:

	pinctrl_usdhc1: usdhc1grp {
		fsl,pins = <
			MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK	0x190
			MX8MP_IOMUXC_SD1_CMD__USDHC1_CMD	0x1d0
			MX8MP_IOMUXC_SD1_DATA0__USDHC1_DATA0	0x1d0
			MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1	0x1d0
			MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2	0x1d0
			MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3	0x1d0
		>;
	};

MITO 8M Mini[edit | edit source]

For device-tree configuration, please take a look to PCIe page for DESK-MX8M-L

Accessing the peripheral SBC ORCA[edit | edit source]

Linux messages at boot time[edit | edit source]

[    8.307124] [TELIT] Using WE866C6 board data.
[    8.374212] ol_download_firmware: chip_id:0x5020001 board_id:0x0
[    8.374448] __ol_transfer_bin_file: Failed to get bdwlan30_c6.b00:-2
[    8.374455] __ol_transfer_bin_file: Trying to load default bdwlan30_c6.bin
[    8.376904] Board extended Data download address: 0x0
[    8.394418] __ol_transfer_bin_file: Loading setup file qsetup30.bin
[    8.394497] __ol_transfer_bin_file: Failed to get qsetup30.bin:-2
[    9.008083] R0: wlan: [244:E :SAP] dfs_init_radar_filters[217]: Unknown dfs domain 0
[    9.023752] Target Ready! : transmit resources : 3 size:1792, MaxMsgsPerHTCBundle = 32
[    9.111014] target uses HTT version 3.60; host uses 3.28
[    9.112979] DEBUGFS PEER MAC = 0x2:0x21:0x7e:0x2:0x47:0xe7
[    9.116337] *** Warning: host/target HTT versions are different, though compatible!
[    9.133715] Host SW:4.5.25.46, FW:0.0.0.111, HW:QCA93x7_REV1_1
[    9.140159] ENTER sme_set_btc_coex_dutycycle = 30
[    9.140170] ENTER sme_set_btc_coex_dutycycle =30
[    9.145422] ath_hif_sdio: HIF (Atheros/multi-bss)
[    9.154899] wlan: driver loaded in 1060000

Enable the interface and check status[edit | edit source]

root@desk-mx8mp:~# rfkill list
0: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
root@desk-mx8mp:~# rfkill unblock 0
root@desk-mx8mp:~# ifconfig wlan0 up
root@desk-mx8mp:~# ifconfig wlan0
wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:21:7e:81:47:e7  txqueuelen 3000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@desk-mx8mp:~# 

Usage with iw tool[edit | edit source]

root@desk-mx8mp:~# iw wlan0 scan
BSS d6:21:f9:35:8e:88(on wlan0)
        last seen: 399.264s [boottime]
        TSF: 6117312270692 usec (70d, 19:15:12)
        freq: 5180
        beacon interval: 100 TUs
        capability: ESS Privacy SpectrumMgmt ShortSlotTime RadioMeasure (0x1511)
        signal: -51.00 dBm
        last seen: 0 ms ago
        Information elements from Probe Response frame:
        SSID: davesrl
        Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0
...
...
...
        Transmit Power Envelope:
                 * Local Maximum Transmit Power For 20 MHz: 23 dBm
                 * Local Maximum Transmit Power For 40 MHz: 23 dBm
                 * Local Maximum Transmit Power For 80 MHz: 23 dBm
        WMM:     * Parameter version 1
                 * BE: CW 15-1023, AIFSN 3
                 * BK: CW 15-1023, AIFSN 7
                 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
                 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
root@desk-mx8mp:~#

Setup for DHCP connection[edit | edit source]

Add the network configuration for systemd-networkd, disable the connman service and enable the resolv.conf via systemd-resolved:

root@desk-mx8mp:~# cat /etc/systemd/network/21-wlan0.network
[Match]
Name=wlan0

# Prevent the interface loading if the kernel boots from nfs
KernelCommandLine=!nfsroot

[Network]
DHCP=yes
root@desk-mx8mp:~# systemctl disable connman.service
Removed /etc/systemd/system/multi-user.target.wants/connman.service.
...
...
root@desk-mx8mp:~# ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Setup your wpa_supplicant.conf configuration file for handle WiFi connection:

root@desk-mx8mp:~# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
        ssid="daveguest"
        psk="********"
}

Reboot the system and manually start the wpa_supplicant using the wlan0 interface and the wpa_supplicant.conf configuration file:

root@desk-mx8mp:~# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
root@desk-mx8mp:~# [  132.978188] DEBUGFS PEER MAC = 0xd0:0x21:0xf9:0x35:0x8e:0x88
[  133.070518] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

root@desk-mx8mp:~#

Then the interface will be properly configured (see the IP address configured) and the network access is enabled:

root@desk-mx8mp:~# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.203.1.186  netmask 255.255.255.0  broadcast 10.203.1.255
        inet6 fe80::221:7eff:fe81:47e7  prefixlen 64  scopeid 0x20<link>
        ether 00:21:7e:81:47:e7  txqueuelen 3000  (Ethernet)
        RX packets 6  bytes 1012 (1012.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 22  bytes 3101 (3.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@desk-mx8mp:~# ping www.dave.eu
PING www.dave.eu (51.91.120.202) 56(84) bytes of data.
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=1 ttl=48 time=40.1 ms
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=2 ttl=48 time=46.8 ms
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=3 ttl=48 time=46.0 ms
^C
--- www.dave.eu ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 40.124/44.331/46.821/2.991 ms
root@desk-mx8mp:~#

Accessing the peripheral MITO 8M Mini[edit | edit source]

Linux messages at boot time[edit | edit source]

Check that AzureWave driver for PCIe was initialized:

...
...                                                                                  
[    6.519674] mwifiex_pcie 0000:01:00.0: no quirks enabled
[    6.525230] mwifiex_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[    6.593357] mwifiex_pcie: PCI memory map Virt0: (____ptrval____) PCI memory map Virt2: (____ptrval____)
...
[    7.638822] mwifiex_pcie 0000:01:00.0: info: FW download over, size 632240 bytes
...
[    8.509865] mwifiex_pcie 0000:01:00.0: WLAN FW is active
[    8.562243] mwifiex_pcie 0000:01:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (16.68.1.p179)
[    8.570473] mwifiex_pcie 0000:01:00.0: driver_version = mwifiex 1.0 (16.68.1.p179)
...
...

and the WiFi module is available as PCIe device:

root@desk-mx8mm:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 2b42 (rev 11)
root@desk-mx8mm:~#

Setup for static connection[edit | edit source]

Check that the interface is properly intialized:

root@desk-mx8mm:~# ifconfig mlan0
mlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether e8:fb:1c:e1:80:65  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Setup the wpa_supplicant.conf configuration file for handling the WiFi connection, for example:

root@desk-mx8mm:~# cat /etc/wpa_supplicant.conf
network={
    ssid="ZyXEL"
    key_mgmt=NONE
}

Apply the wpa_supplicant.conf configuration file manually starting the wpa_supplicant:

root@desk-mx8mm:~# wpa_supplicant -i mlan0 -c /etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
...
root@desk-mx8mm:~#

Add the mlan0 IP address:

root@desk-mx8mm:~# ip addr add 192.168.11.165/255.255.255.0 dev mlan0

Then the network access is enabled:

root@desk-mx8mm:~# ping 192.168.11.243 -c 4
PING 192.168.11.243 (192.168.11.243) 56(84) bytes of data.
64 bytes from 192.168.11.243: icmp_seq=1 ttl=64 time=2.93 ms
64 bytes from 192.168.11.243: icmp_seq=2 ttl=64 time=2.96 ms
64 bytes from 192.168.11.243: icmp_seq=3 ttl=64 time=1.97 ms
64 bytes from 192.168.11.243: icmp_seq=4 ttl=64 time=2.77 ms

--- 192.168.11.243 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 1.969/2.657/2.962/0.404 ms
root@desk-mx8mm:~#

Setup for DHCP connection[edit | edit source]

Check that the interface is properly recognized:

root@desk-mx8mm:~# ifconfig mlan0
mlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether e8:fb:1c:e1:80:65  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Add the network configuration for systemd-networkd

root@desk-mx8mm:~# cat /etc/systemd/network/21-mlan0.network
[Match]
Name=mlan0

# Prevent the interface loading if the kernel boots from nfs
KernelCommandLine=!nfsroot

[Network]
DHCP=yes

Setup your wpa_supplicant.conf configuration file for handle WiFi connection:

root@desk-mx8mm:~# cat /etc/wpa_supplicant.conf
network={
        ssid="daveguest"
        psk="******"
}

Reboot the system and manually start the wpa_supplicant using the mlan0 interface and the wpa_supplicant.conf configuration file:

root@desk-mx8mm:~# wpa_supplicant -i mlan0 -c /etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
...
[  131.877506] ieee80211 phy0: mwifiex_cfg80211_sched_scan_start : Invalid Sched_scan parameters
root@desk-mx8mm:~# [  134.728825] mwifiex_pcie 0000:01:00.0: info: trying to associate to bssid d0:21:f9:35:87:e8
[  134.754118] mwifiex_pcie 0000:01:00.0: info: associated to bssid d0:21:f9:35:87:e8 successfully
[  134.778115] IPv6: ADDRCONF(NETDEV_CHANGE): mlan0: link becomes ready

Then the interface will be properly configured and the network access is enabled:

root@desk-mx8mm:~# ping www.dave.eu -c 4
PING www.dave.eu (51.91.120.202) 56(84) bytes of data.
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=1 ttl=48 time=332 ms
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=2 ttl=48 time=254 ms
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=3 ttl=48 time=174 ms
64 bytes from 202.ip-51-91-120.eu (51.91.120.202): icmp_seq=4 ttl=48 time=94.2 ms

--- www.dave.eu ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 94.197/213.585/332.136/88.720 ms
root@desk-mx8mm:~#

Additional information[edit | edit source]