I managed to make Omega2 connect my wireless network provided by Mikrotik RB951B and will share my knowledge with you guys. If you find anything wrong, please, correct me.
Here we go:
Mikrotik configuration:
- Wireless
- Frequency: auto
- Band: 2GHz-B/G/N
- Country: no_country_set
- Wireless/Security Profiles
- Authentication types: WPA2 PSK
- Unicast Ciphers: aes ccm
Build notes:
- I use official LEDE sources to build the image
- Target System: MediaTek Ralink MIPS
- Subtarget: MT7688 based boards
- Target Profile: Onion Omega2
- I do not use Omega2 feeds (FTBFS during typing this post)
Configuration:
- /etc/config/wireless:
config wifi-device 'radio0'
option type 'mac80211'
option channel 'auto'
option path 'platform/10300000.wmac'
option disabled '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'wwan'
option mode 'sta'
option encryption 'psk2'
option key 'MyWPA2Key'
option ssid 'MyWirelessNetworkSSID'
- /etc/config/network:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd1d:48c4:7633::/48'
config interface 'default_radio0'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.3.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
config interface 'wwan'
option proto 'dhcp'
Having changed those 2 configuration files, I restarted the wireless subsystem by wifi
and I could read this:
[ 1329.657946] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1331.436860] wlan0: authenticate with aa:bb:cc:dd:ee:ff
[ 1331.459985] wlan0: send auth to aa:bb:cc:dd:ee:ff (try 1/3)
[ 1331.468056] wlan0: authenticated
[ 1331.475129] wlan0: associate with aa:bb:cc:dd:ee:ff (try 1/3)
[ 1331.486320] wlan0: RX AssocResp from aa:bb:cc:dd:ee:ff (capab=0x401 status=0 aid=5)
[ 1331.494544] wlan0: associated
[ 1331.497749] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Then I verified that I obtained a network address from DHCP service running on Mikrotik:
# ip a s dev wlan0
8: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
inet 192.168.88.224/24 brd 192.168.88.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::42a3:6bff:fec0:85e1/64 scope link
valid_lft forever preferred_lft forever
The crucial part was to configure the wireless subsystem to use Client/Station (option mode 'sta') mode. The effect of this setting is following: OpenWRT/LEDE spawns a wpa_supplicant daemon for the configured interface which takes care of authentication and assiciation... See:
$ cat /var/run/wpa_supplicant-wlan0.conf
network={
scan_ssid=1
ssid="MyWirelessNetworkSSID"
key_mgmt=WPA-PSK
psk="MyWPA2Key!"
proto=RSN
}
Conclusion
I can now reach my device!