The STM32MP1-BSB Rev 2A board features an M.2 connector and supports SDIO/UART modules.
This application note describes how to enable WiFi/Bluetooth support using the AW-NB136NF
M.2 module.
To use the AW-NB136NF
M.2 module, the following preparations should be done:
create the
/lib/firmware/brcm
directorycopy the firmware files to the
/lib/firmware/brcm
directory on the board:reboot the board.
1. WiFi
Use the following step-wise procedure to enable WiFi on the board:
Initialize the
wpa_supplicant
module:/ # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B Successfully initialized wpa_supplicant
In another Linux shell window, validate that you can see the Access Points in the vicinity of the board:
/ # wpa_cli -i wlan0 scan OK / # wpa_cli -i wlan0 scan_results bssid / frequency / signal level / flags / ssid ec:43:f6:02:75:54 2437 -75 [WPA2-PSK-CCMP][ESS] Maxim c0:25:e9:05:55:1e 2412 -83 [WPA2-PSK-CCMP][WPS][ESS] Hone-120 ec:43:f6:e1:4a:d8 2422 -24 [WPA2-PSK-CCMP][WPS][ESS] Tik 16:2d:27:5e:54:d4 2432 -72 [WPA2-PSK-CCMP][WPS][ESS][P2P] DIRECT-YQ-BRAVIA ea:28:5d:7b:5a:f8 2432 -78 [WPA2-PSK-CCMP][WPS][ESS] ELDAR ec:43:f6:e1:4a:da 5180 -82 [WPA2-PSK-CCMP][WPS][ESS] Tik5 14:dd:a9:f0:bf:08 2437 -87 [WPA2-PSK-CCMP][WPS][ESS] Gnomiki c8:3a:35:18:7b:21 2452 -87 [WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS] Dom 08:60:6e:e1:66:0c 2437 -87 [WPA2-PSK-CCMP][WPS][ESS] Ioanna 3c:15:c2:f4:05:66 2462 -88 [WPA2-PSK-CCMP][ESS] Air Network bc:ee:7b:e4:24:58 2457 -85 [WPA2-PSK-CCMP][ESS] b0:6e:bf:d8:a7:78 2467 -87 [WPA2-PSK-CCMP][WPS][ESS] Nastya1
Disable
eth0
, connect to the Internet over WiFi:/ # ifconfig eth0 down / # wpa_cli -i wlan0 add_network 1 / # wpa_cli -i wlan0 set_network 1 ssid '"name-of-access-point"' OK / # wpa_cli -i wlan0 set_network 1 psk '"password-to-access-point"' OK / # wpa_cli -i wlan0 enable_network 1 OK [ 284.555912] wlan0: authenticate with ec:43:f6:e1:4a:d8 [ 284.627134] wlan0: send auth to ec:43:f6:e1:4a:d8 (try 1/3) [ 284.634605] wlan0: authenticated [ 284.639897] wlan0: associate with ec:43:f6:e1:4a:d8 (try 1/3) [ 284.649323] wlan0: RX AssocResp from ec:43:f6:e1:4a:d8 (capab=0x411 status=0 aid=1) [ 284.660116] wlan0: associated / # udhcpc -i wlan0 Sending discover... Sending select for 192.168.1.35... Lease of 192.168.1.35 obtained, lease time 25200 /etc/udhcpc.d/50default: Adding DNS 8.8.8.8 /etc/udhcpc.d/50default: Adding DNS 192.168.1.1
Ping a public host:
/ # ping -c 3 google.com PING google.com (74.125.205.101) 56(84) bytes of data. 64 bytes from le-in-f101.1e100.net (74.125.205.101): icmp_seq=1 ttl=47 time=18.5 ms 64 bytes from le-in-f101.1e100.net (74.125.205.101): icmp_seq=2 ttl=47 time=20.7 ms 64 bytes from le-in-f101.1e100.net (74.125.205.101): icmp_seq=3 ttl=47 time=20.9 ms --- google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2004ms rtt min/avg/max/mdev = 18.593/20.102/20.930/1.075 ms
2. Bluetooth
Use the following step-wise procedure:
Initialize the Bluetooth module on the board. Validate that the initialization has completed successfully:
/ # hciattach /dev/ttySTM7 any -t120 115200 flow ... HCI Reset is done Setting TTY to N_HCI line discipline Device setup complete / # hciconfig hci0 up / # hciconfig hci0: Type: Primary Bus: UART BD Address: 61:47:AA:32:44:07 ACL MTU: 1024:7 SCO MTU: 60:8 UP RUNNING PSCAN RX bytes:1326 acl:0 sco:0 events:72 errors:0 TX bytes:1166 acl:0 sco:0 commands:72 errors:0
Switch on some Bluetooth devices in the vicinity of the board. Validate that the board detects them:
/ # hcitool scan Scanning ... 50:1A:A5:E5:34:8A JABRA BT2045 F0:F6:1C:67:F4:D4 iPhone yur
Switch on some BLE devices around. Validate that the board detects them:
/ # hcitool lescan LE Scan ... 14:BB:6E:2F:9B:07 (unknown) ^C