Adding Wi-Fi to Emcraft Systems K70 SoM
Emcraft Systems K70 SoM is a system-on-module powered by Freescale K70 Cortex M4 micro-controller with enough RAM (64 MB) to comfortably run uClinux. They used to charge $99 for their uCLinux BSP, but it’s now free of charge, and the company also provides full hardware and software documentation, including a getting started guide, schematics and BoM for the baseboard, application notes and more…
Many of their clients want to use Wi-Fi with K70 SoM, and it can easily be done by using Wi-Fi USB dongles based on Ralink RT5370 chipset such as D-Link DWA-140 (H/W rev B3) or Comfast CF-WU815N.
Emcraft has provided detailed instructions to do so with K70 SoM, their latest baseboard (SOM-BSB-EXT) and a demo image based on their uClinux BSP. I’ll summarize the instructions to use K70 SoM as a Wi-Fi access point below.
- Connect the baseboard and K70 SoM with an Ethernet cable, a mini USB to USB Y-cable for power and serial console, a mini USB to USB female and a Wi-Fi USB dongle as shown in the picture below.
- Download the kernel image with Wi-Fi enabled, copy it to to your TFTP server, and download the image via tftp, flash it to the SoM’s NAND flash, and reset the board
- The image contains the following script (start_ap) to start a Wi-Fi access point:
Shell12345678#!/bin/shecho "Starting AP"ifconfig wlan0 192.168.1.1 upifconfig wlan0hostapd /etc/hostapd-minimal.conf &echo "Starting DHCP server"udhcpd -f /etc/udhcpd.conf &
as well as a minimal hostapd configuration file (/etc/hostapd-minimal.conf) for a non-encrypted k70 access point:
Shell1234567#change wlan0 to your wireless deviceinterface=wlan0driver=nl80211ssid=k70hw_mode=gmax_num_sta=255channel=2
Simply run ./start_ap to start the daemon
Done. You should now see k70 with any Wi-Fi enabled device (laptop, smartphone,…), be able to connect to this unsecured network, and get an IP via DHCP on this subnet.
Emcraft posted some Wi-Fi throughput benchmarks done in the wireless LAN:
- FTP transfer (FTP server to K70 SoM with wget) – 772.652 KB/s.
- NFS transfer (NFS host to K70 SoM) – 1076.92 KB/sec
The connection was tested in 802.11g mode, and the Wi-Fi connection rate was reported to be 54 Mb/sec.
Disclosure: This post has been sponsored by Emcraft Systems.