WiFi

The phyBOARD-Rigel AM67x supports external WiFi modules via the M.2 connector located on the bottom of the development kit carrier board, at X16. For more information on the M.2 connector on the phyCORE-AM67x development kit, please see the Hardware Manual.

phyCORE-AM67x WiFi

Requirements

Warning

Depending on the Wifi module you are using, the jumpers J7 and J8 may require adjustment to level shift the signals routed out of the M.2 connector.

The module requires a 1.8V operating voltage, thus this module specifically requires J7 and J8 set to the 1+2 jumper position. This is the default position on the kit. (reference development kit schematics for clarification).

Jumper Configuration

J7

1+2 = 1.8V

2+3 = 3.3V

Level shifts UART (Bluetooth) and PCM (audio) signals

J8

1+2 = 1.8V

2+3 = 3.3V

Level shifts MMC (WIFI) signals

phyCORE-AM67x J7 Placements phyCORE-AM67x J8 Placements

Hardware Setup

  • Power off the development kit and disconnect the power supply.

  • Prepare the M.2 WiFi module by securing the antenna.

  • Connect the M.2 WiFi module to the X16 M.2 connector on the bottom side of the carrier board. We recommend securing the module with a M2 bolt into the soldered standoff.

Enable the Bootloader Overlay

  • Power on the development kit and hit any key to stop in U-Boot.

    sh-uboot:~# setenv overlays k3-am6754-phyboard-rigel-m2-cc3351.dtbo
    sh-uboot:~# boot
    

Note

For more information about overlays see the guide Configuring the Bootloader.

Configure WiFi Credentials

  • Once in Linux, scan for available networks:

    sh-phyboard-rigel-am67xx-1:~# iw wlan0 scan | grep SSID
    SSID: OFFICE-GUEST
    SSID: OFFICE-5G
    
  • With a network identified, use wpa_passphrase to create the NETWORK section of your wpa_supplicant-wlan0.conf file with your network credentials and password filled in:

    Note

    Update “MYSSID” and “passphrase” to the correct credentials for your target network.

    sh-phyboard-rigel-am67xx-1:~# mkdir -p /etc/wpa_supplicant
    sh-phyboard-rigel-am67xx-1:~# wpa_passphrase MYSSID passphrase > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
    
  • Now we can edit the wpa_supplicant-wlan0.conf to include the rest of our network configuration.

    sh-phyboard-rigel-am67xx-1:~# vi /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
    
    # Giving configuration update rights to wpa_cli
    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=0
    update_config=1
    
    # AP scanning
    ap_scan=1
    
    # ISO/IEC alpha2 country code in which the device is operating
    country=US
    
    # network section generated by wpa_passphrase
    network={
            ssid="OFFICE-GUEST"
            #psk="123456"
            psk=59e0d07fa4c7741797a4e394f38a5c321e3bed51d54ad5fcbd3f84bc7415d73d
    }
    

Establish A Connection

  • Enable the wpa_service for the wlan0 interface:

    sh-phyboard-rigel-am67xx-1:~# systemctl enable [email protected]
    
  • Restart the systemd-networkd and wpa_supplicant services:

    sh-phyboard-rigel-am67xx-1:~# systemctl restart systemd-networkd.service
    sh-phyboard-rigel-am67xx-1:~# systemctl restart [email protected]
    
  • Confirm wlan0 is connected to the network.

    sh-phyboard-rigel-am67xx-1:~# iw dev wlan0 link
    Connected to 6e:d7:9a:cd:92:e9 (on wlan0)
    SSID: OFFICE-GUEST
    freq: 2437
    RX: 3684015 bytes (18198 packets)
    TX: 57638 bytes (745 packets)
    signal: -88 dBm
    rx bitrate: 39.0 MBit/s
    tx bitrate: 6.0 MBit/s
    
    bss flags:      short-preamble short-slot-time
    dtim period:    1
    beacon int:     100
    
  • Check the IP address:

    sh-phyboard-rigel-am67xx-1:~# ip addr show wlan0
    5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether c0:ee:40:84:4e:ec brd ff:ff:ff:ff:ff:ff
        inet 100.55.50.55/24 metric 1024 brd 100.55.50.255 scope global dynamic wlan0
           valid_lft 70512sec preferred_lft 70512sec
        inet6 fe80::c2ee:40ff:fe84:4eec/64 scope link
            valid_lft forever preferred_lft forever
    
  • In the above example output we can see that this system has been assigned the 100.55.50.55 IPv4 address.

  • Verify that the M.2 WiFi module is connected to the network.

    sh-phyboard-rigel-am67xx-1:~# ping -c 5 -I wlan0 google.com
    PING google.com (142.251.33.110): 56 data bytes
    64 bytes from 142.251.33.110: seq=0 ttl=56 time=464.257 ms
    64 bytes from 142.251.33.110: seq=1 ttl=56 time=13.316 ms
    64 bytes from 142.251.33.110: seq=2 ttl=56 time=15.097 ms
    64 bytes from 142.251.33.110: seq=3 ttl=56 time=13.265 ms
    64 bytes from 142.251.33.110: seq=4 ttl=56 time=13.039 ms
    
    --- google.com ping statistics ---
    5 packets transmitted, 5 packets received, 0% packet loss
    round-trip min/avg/max = 13.039/103.794/464.257 ms