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
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
*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:

# g for IEEE 802.11g (2.4 GHz)
# channel number
# real SSID in beacons
# IEEE 802.11n (HT) enabled
# Enable WMM
# Shared Key Authentication (requires WEP)
# WPA2 enabled
# WPA-PSK key management
# Use AES for pairwise keys
# Log all to syslog
# Log all to stdout
# Syslog verbose level = informational messages
# Stdout verbose level = informational messages
# Interface for external control program
# Access for control interface for root group (gid=0)
# Be careful not to add whitespaces after gid
# Max. number of stations in station table

Open /etc/udhcpd.conf file:

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

Replace its contents with:

interface       wlan0
opt dns
opt subnet
opt router
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 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