請先看『使用說明』
MB:2N8MP
From LEXWiKi
(→How to Test WIFI/BT(Sparklan WNFB-266AXI(BT) Modules) |
(→How to Test WIFI/BT(Sparklan WNFB-266AXI(BT) Modules) |
||
Line 218: | Line 218: | ||
WNFB-266AXI(BT) firmware file | WNFB-266AXI(BT) firmware file | ||
https://drive.google.com/file/d/18ms4wlhH81pfqyqfQKgiZCtPfeLikIy3/view?usp=sharing | https://drive.google.com/file/d/18ms4wlhH81pfqyqfQKgiZCtPfeLikIy3/view?usp=sharing | ||
+ | WIFI/BT source code | ||
+ | https://drive.google.com/file/d/1r8nv0mBHGocV-4fwtleFyeN6l4Xq9dQD/view?usp=sharing | ||
+ | |||
+ | 1.新增CONFIG到/kernel-source/arch/arm64/boot/configs/imx_v8_defconfig | ||
+ | #SPARKLAN WIFI | ||
+ | CONFIG_CFG80211=m | ||
+ | CONFIG_MAC80211=m | ||
+ | CONFIG_BRCMUTIL=m | ||
+ | CONFIG_BRCMFMAC=m | ||
+ | CONFIG_BRCMFMAC_PROTO_BCDC=y | ||
+ | CONFIG_BRCMFMAC_SDIO=y | ||
+ | CONFIG_BCMDHD=m | ||
+ | CONFIG_BCMDHD_FW_PATH="/lib/firmware/bcmdhd/fw_bcm43752a2_ag.bin" | ||
+ | CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/bcmdhd/nvram_ap6275s_m2.txt" | ||
+ | CONFIG_BCMDHD_SDIO=y | ||
+ | CONFIG_BCMDHD_OOB=y | ||
+ | |||
+ | #bluez | ||
+ | CONFIG_BT_HCIUART_H4=y | ||
+ | CONFIG_BT_L2CAP=y | ||
+ | CONFIG_BT_SCO=y | ||
+ | |||
+ | 2.bcmdhd.tar.gz extract to /kernel-source/drivers/net/wireless/ | ||
+ | |||
+ | 3.cp -r bcmdhd/include /kernel-source/include | ||
+ | |||
+ | 4.build image(bitbake imx-image-multimedia) | ||
+ | |||
+ | 5.into 2n8mp and create bcmdhd folder | ||
+ | unzip sparklan_wnfb-266axi(bt)_fw.zip | ||
+ | mkdir /lib/firmware/bcmdhd | ||
+ | cd /fw/ | ||
+ | cp -v *.* /lib/firmware/bcmdhd | ||
+ | |||
+ | 6.reboot | ||
+ | |||
+ | 7.ifconfig wlan0 up | ||
+ | |||
+ | 8.Test WIFI Function | ||
+ | vi /etc/wpa_supplicant.conf | ||
+ | |||
+ | ctrl_interface=/var/run/wpa_supplicant | ||
+ | ctrl_interface_group=0 | ||
+ | update_config=1 | ||
+ | |||
+ | network={ | ||
+ | |||
+ | ssid="BONA_5G" | ||
+ | psk="0222281056" | ||
+ | } | ||
+ | |||
+ | Start: | ||
+ | wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0 & | ||
+ | |||
+ | Get IP: | ||
+ | udhcpc -i wlan0 | ||
+ | |||
+ | Result: | ||
+ | wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 | ||
+ | inet 10.100.100.39 netmask 255.255.255.0 broadcast 10.100.100.255 | ||
+ | inet6 fe80::20e:8eff:feb2:72da prefixlen 64 scopeid 0x20<link> | ||
+ | ether 00:0e:8e:b2:72:da txqueuelen 1000 (Ethernet) | ||
+ | RX packets 57 bytes 5737 (5.6 KiB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 51 bytes 6626 (6.4 KiB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | |||
+ | root@imx8mpevk:/lib/firmware/bcmdhd# ping 8.8.8.8 | ||
+ | PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. | ||
+ | 64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=13.0 ms | ||
+ | 64 bytes from 8.8.8.8: icmp_seq=2 ttl=58 time=12.9 ms | ||
+ | 64 bytes from 8.8.8.8: icmp_seq=3 ttl=58 time=12.2 ms | ||
+ | |||
+ | 9.Enable BT | ||
+ | $cd /lib/firmware/bcmdhd | ||
+ | $./brcm_patchram_plus -d --enable_hci --no2bytes --tosleep 200000 --baudrate 3000000 --patchram /lib/firmware/bcmdhd/BCM4362A2_001.003.006.1059.1089.hcd /dev/ttymxc0 & | ||
+ | $hciconfig hci0 up | ||
+ | $hciconfig | ||
+ | $bluetoothctl | ||
+ | [bluetooth]# | ||
+ | [bluetooth]# scan on | ||
+ | Discovery started | ||
+ | [CHG] Controller 00:0E:8E:B2:72:DB Discovering: yes | ||
+ | [NEW] Device 77:51:E9:C7:4B:43 77-51-E9-C7-4B-43 | ||
+ | [NEW] Device 5A:5C:98:A4:55:7C 5A-5C-98-A4-55-7C | ||
+ | [NEW] Device 7E:15:28:DB:39:77 7E-15-28-DB-39-77 | ||
+ | [NEW] Device 3A:CA:84:0E:12:F9 3A-CA-84-0E-12-F9 | ||
+ | [NEW] Device 5F:4D:6E:1B:8C:7F 5F-4D-6E-1B-8C-7F | ||
+ | [NEW] Device 77:1A:59:4A:32:38 77-1A-59-4A-32-38 | ||
+ | [CHG] Device 5F:4D:6E:1B:8C:7F RSSI: -81 | ||
+ | [CHG] Device 77:1A:59:4A:32:38 RSSI: -88 | ||
+ | [NEW] Device 88:54:1F:4D:28:D1 Huangchunhua | ||
+ | ============================================================ | ||
+ | [bluetooth]# connect 88:54:1F:4D:28:D1 | ||
+ | ============================================================ | ||
+ | Attempting to connect to 88:54:1F:4D:28:D1 | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 Connected: yes | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 Modalias: bluetooth:v00E0p1200d1436 | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001105-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001112-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001115-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001116-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000112d-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001132-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001200-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001800-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001801-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 ServicesResolved: yes | ||
+ | Request confirmation | ||
+ | [agent] Confirm passkey 621094 (yes/no): yes | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 Bonded: yes | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 Paired: yes | ||
+ | Connection successful | ||
+ | [CHG] Device 7E:15:28:DB:39:77 RSSI: -87 | ||
+ | [CHG] Device 88:54:1F:4D:28:D1 RSSI: -73 | ||
+ | |||
+ | Connect Success: | ||
+ | [Huangchunhua]# |
Revision as of 15:25, 29 May 2024
O.S. | CPU | Rev | LVDS | HDMI | Dual output | M.2(B key) | nano SIM | USB2.0 | USB3.0 | PCIE | LAN | COM-422 | COM-485 | F75111N | WDT/DIO | TPM2.0 | CN059 | AU002 | Download | Patch |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zeus_yocto |
A53 |
0.3 |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
- |
Yes |
Yes |
kernel5.4.70 | |
kirkstone_yocto |
A53 |
0.3 |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
- |
Yes |
Yes |
kernel5.15.71 | |
kirkstone_desktop |
A53 |
0.3 |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
- |
- |
kernel5.15.71 |
Contents |
How to Test CIO/CPWM1
Download Sample code
DIO.ZIP https://drive.google.com/file/d/1ozNkJM7kMCuZY4z5h6gxbEk6VwjMniiT/view?usp=drive_link
Note
TPM2.0 only kirkstone_desktop Test, because other kernel not support clevis tool
How to Test CN059/AU002
root@imx8mpevk:~# cat /proc/asound/cards
0 [audiohdmi ]: audio-hdmi - audio-hdmi audio-hdmi 1 [Device ]: USB-Audio - USB Advanced Audio Device C-Media Electronics Inc. USB Advanced Audio Device at usb-xhci-hcd.1.auto-1.4.4
1.CN059/AU002 Recored Test
root@imx8mpevk:~# arecord -Dhw:1,0 -d 5 -f cd -r 44100 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
2.CN059/AU002 play Test
root@imx8mpevk:~# aplay -Dhw:1,0 -f cd -r 44100 test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
3.CN059/AU002 Record+Play Test
3-1.check sound card
pactl list sinks
pactl list sources
3-2.assignation Sound Card source:
pacmd set-default-source 1 (Microphone)
3-3.assignation Sound Card sink
pacmd set-default-sink 0 (C-Media)
3-4. Line In / Mic In Test
Line In Test : First Modify source Active Port is analog-input-linein:
pacmd set-source-port alsa_input.usb-C-Media_Electronics_Inc._USB_Advanced_Audio_Device-00.analog-stereo analog-input-linein
Mic In Test:First Modify source Active Port = analog-input-mic(Default):
pacmd set-source-port alsa_input.usb-C-Media_Electronics_Inc._USB_Advanced_Audio_Device-00.analog-stereo analog-input-mic
3-5.Arecord + Play Command
arecord –Dhw:1,0 –d 5 –f cd –r 44100 | aplay –Dhw:1,0 –r44100
Support 4G/5G LTE Module
SIMCOM SIM7906G-M2,LTE CAT6 M.2 Type Module
SIMCOM SIM8200EA-M2
Support WIFI/BT Module
AzureWave AW-CM276MA SDIO-UART
How to Test WIFI/BT(Sparklan WNFB-266AXI(BT) Modules
WNFB-266AXI(BT) firmware file https://drive.google.com/file/d/18ms4wlhH81pfqyqfQKgiZCtPfeLikIy3/view?usp=sharing WIFI/BT source code https://drive.google.com/file/d/1r8nv0mBHGocV-4fwtleFyeN6l4Xq9dQD/view?usp=sharing
1.新增CONFIG到/kernel-source/arch/arm64/boot/configs/imx_v8_defconfig
- SPARKLAN WIFI
CONFIG_CFG80211=m CONFIG_MAC80211=m CONFIG_BRCMUTIL=m CONFIG_BRCMFMAC=m CONFIG_BRCMFMAC_PROTO_BCDC=y CONFIG_BRCMFMAC_SDIO=y CONFIG_BCMDHD=m CONFIG_BCMDHD_FW_PATH="/lib/firmware/bcmdhd/fw_bcm43752a2_ag.bin" CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/bcmdhd/nvram_ap6275s_m2.txt" CONFIG_BCMDHD_SDIO=y CONFIG_BCMDHD_OOB=y
- bluez
CONFIG_BT_HCIUART_H4=y CONFIG_BT_L2CAP=y CONFIG_BT_SCO=y
2.bcmdhd.tar.gz extract to /kernel-source/drivers/net/wireless/
3.cp -r bcmdhd/include /kernel-source/include
4.build image(bitbake imx-image-multimedia)
5.into 2n8mp and create bcmdhd folder unzip sparklan_wnfb-266axi(bt)_fw.zip mkdir /lib/firmware/bcmdhd cd /fw/ cp -v *.* /lib/firmware/bcmdhd
6.reboot
7.ifconfig wlan0 up
8.Test WIFI Function vi /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 update_config=1
network={
ssid="BONA_5G" psk="0222281056"
}
Start: wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0 &
Get IP: udhcpc -i wlan0
Result: wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.100.100.39 netmask 255.255.255.0 broadcast 10.100.100.255 inet6 fe80::20e:8eff:feb2:72da prefixlen 64 scopeid 0x20<link> ether 00:0e:8e:b2:72:da txqueuelen 1000 (Ethernet) RX packets 57 bytes 5737 (5.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 51 bytes 6626 (6.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@imx8mpevk:/lib/firmware/bcmdhd# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=13.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=58 time=12.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=58 time=12.2 ms
9.Enable BT $cd /lib/firmware/bcmdhd $./brcm_patchram_plus -d --enable_hci --no2bytes --tosleep 200000 --baudrate 3000000 --patchram /lib/firmware/bcmdhd/BCM4362A2_001.003.006.1059.1089.hcd /dev/ttymxc0 & $hciconfig hci0 up $hciconfig $bluetoothctl [bluetooth]# [bluetooth]# scan on Discovery started [CHG] Controller 00:0E:8E:B2:72:DB Discovering: yes [NEW] Device 77:51:E9:C7:4B:43 77-51-E9-C7-4B-43 [NEW] Device 5A:5C:98:A4:55:7C 5A-5C-98-A4-55-7C [NEW] Device 7E:15:28:DB:39:77 7E-15-28-DB-39-77 [NEW] Device 3A:CA:84:0E:12:F9 3A-CA-84-0E-12-F9 [NEW] Device 5F:4D:6E:1B:8C:7F 5F-4D-6E-1B-8C-7F [NEW] Device 77:1A:59:4A:32:38 77-1A-59-4A-32-38 [CHG] Device 5F:4D:6E:1B:8C:7F RSSI: -81 [CHG] Device 77:1A:59:4A:32:38 RSSI: -88 [NEW] Device 88:54:1F:4D:28:D1 Huangchunhua
================================================
[bluetooth]# connect 88:54:1F:4D:28:D1
================================================
Attempting to connect to 88:54:1F:4D:28:D1 [CHG] Device 88:54:1F:4D:28:D1 Connected: yes [CHG] Device 88:54:1F:4D:28:D1 Modalias: bluetooth:v00E0p1200d1436 [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001105-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001112-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001115-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001116-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000112d-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001132-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device 88:54:1F:4D:28:D1 ServicesResolved: yes Request confirmation [agent] Confirm passkey 621094 (yes/no): yes [CHG] Device 88:54:1F:4D:28:D1 Bonded: yes [CHG] Device 88:54:1F:4D:28:D1 Paired: yes Connection successful [CHG] Device 7E:15:28:DB:39:77 RSSI: -87 [CHG] Device 88:54:1F:4D:28:D1 RSSI: -73
Connect Success: [Huangchunhua]#