Personal tools

How to use Murata WiFi on VisionSOM-6ULL

From SomLabs Wiki

Jump to: navigation, search

How to use Murata WiFi on VisionSOM-6ULL


Murata 1DX WiFi module firmware

VisionSOM-6ULx modules with NXP i.MX 6 processor can have built-in 1DX WiFi module by Murata. 1DX can work as:

  • STA (station) - in this mode VisionSOM-6ULx can connect to existing WiFi networks
  • AP (access point) - in this mode VisionSOM-6ULx creates WiFi network that other devices can connect to

In order to use VisionSOM-6ULx Murata 1DX module in both modes you need to download and extract firmware:

root@somlabs:~# cd ~
root@somlabs:~# wget http://ftp.somlabs.com/visionsom-6ull-bcmfirmware.tar.xz
root@somlabs:~# cd /
root@somlabs:/# tar -xJf /root/visionsom-6ull-bcmfirmware.tar.xz

To be able to access WiFi module you also need to unblock it with RF-kill:

root@somlabs:~# apt install rfkill
root@somlabs:~# rfkill unblock all

Murata 1DX as STA

In case of connection to secured WiFi network wpasupplicant is required, install it and restart connman:

root@somlabs:~# apt install wpasupplicant
root@somlabs:~# service connman restart

Now you can use connmanctl to connect to network, run it:

root@somlabs:~# connmanctl

Enable wifi:

connmanctl> enable wifi

To be able to list and connect to secured network you need to issue this command:

connmanctl> agent on

List available WiFi networks:

connmanctl> services
services
*AO Wired                ethernet_c6e05be9f643_cable
    iPhone (xxx)         wifi_dcefca002b89_6950686f6e6520284a6163656b29_managed_psk
    ppp1200              wifi_dcefca002b89_70707031323030_managed_psk

Above you can see two WiFi networks: ppp1200 and iPhone (xxx), to connect to ppp1200:

connmanctl> connect wifi_dcefca002b89_70707031323030_managed_psk

Now you can exit connmanctl:

connmanctl> exit 

Murata 1DX as AP

Install hostapd (Host access point daemon) and udhcpd (DHCP server, it will provide IP addresses for connected devices):

root@somlabs:~# apt install hostapd udhcpd

Create hostapd.conf file, it will contain AP configuration:

root@somlabs:~# nano /etc/hostapd.conf

You can use this configuration, it will create AP with SOMLABS SSID and "12345678" password:

interface=wlan0
ssid=SOMLABS
wpa_passphrase=12345678
# g for IEEE 802.11g (2.4 GHz)
hw_mode=g
# channel number
channel=11
# real SSID in beacons
ignore_broadcast_ssid=0
# IEEE 802.11n (HT) enabled
ieee80211n=1
# Enable WMM
wmm_enabled=1
# Shared Key Authentication (requires WEP)
auth_algs=1
# WPA2 enabled
wpa=2
# WPA-PSK key management
wpa_key_mgmt=WPA-PSK
# Use AES for pairwise keys
rsn_pairwise=CCMP
# Log all to syslog
logger_syslog=-1
# Log all to stdout
logger_stdout=-1
# Syslog verbose level = informational messages
logger_syslog_level=2
# Stdout verbose level = informational messages
logger_stdout_level=2
# Interface for external control program
ctrl_interface=/var/run/hostapd
# Access for control interface for root group (gid=0)
# Be careful not to add whitespaces after gid
ctrl_interface_group=0
# Max. number of stations in station table
max_num_sta=255

Open /etc/udhcpd.conf file:

root@somlabs:~# nano /etc/udhcpd.conf

Replace its contents with:

start           192.168.2.10
end             192.168.2.254
interface       wlan0
opt dns         8.8.8.8 8.8.4.4
opt subnet      255.255.255.0
opt router      192.168.2.1
opt lease       864000

Now switch WiFi module mode to AP:

root@somlabs:~# echo 2 > /sys/module/bcmdhd/parameters/op_mode

Set WiFi module IP address:

root@somlabs:~# ip addr add 192.168.2.1/24 dev wlan0

Start hostapd and DHCP server:

root@somlabs:~# hostapd -B /etc/hostapd.conf
root@somlabs:~# udhcpd /etc/udhcpd.conf

Hostapd -B parameter causes that process is run as a daemon. In case of trouble you can add -d, -dd or -ddd parameters to hostapd command to get more informations. At this point you should be able to connect to SOMLABS access point with "12345678" password and your device should receive IP address from DHCP server.

Note! You may need to kill existing wpa_supplicant and hostapd processes before starting hostapd as they can conflict with hostapd:

root@somlabs:~# pkill wpa_supplicant
root@somlabs:~# pkill hostapd<pre>
NXP Partner ST Partner Renesas Partner