Home/Support/Support Forum/How to host a web page on the connect core 6UL sbc and use SoftAP mode? (+other questions)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to host a web page on the connect core 6UL sbc and use SoftAP mode? (+other questions)

0 votes
Hi,

I have a couple of questions all regarding the same topic.

I'm currently using the stock ccimx6ulsbc image. I followed the instructions to set up softAP mode on wlan0 from here:

https://www.digi.com/resources/documentation/digidocs/90001945-13/default.htm#reference/yocto/r_network_bridging.htm%3FTocPath%3DDigi%2520Embedded%2520Yocto%7CSystem%2520

I can see the access point and connect to it on my computer. I then configured wlan0 in /etc/network/interfaces to have a static IP:

auto wlan0
iface wlan0 inet static
address 192.168.46.35
netmask 255.255.255.0
post-up /etc/init.d/hostapd start
pre-down /etc/init.d/hostapd stop

then I did 'ifconfig wlan0 down' and 'ifup wlan0' to get the interface back up with its new static IP.

Now I'm pretty sure the stock image runs an httpd server -- when I connect to my board via ethernet, if I type the ethernet interfaces IP into my computers browser I get to a page which displays the text "It Works!" However, when I try the same thing with the IP address on wlan0, I get a timeout. Whats the deal here? I'm assuming there is something basic here i'm misunderstanding.

My ultimate goal is to host a webpage that will be displaying live data which can be accesses from any other browser enabled wireless device.

A few other questions:

Which physical antennas correspond to which wlan interfaces? There is wlan0 and wlan1 and there is the antenna on the actual CCi.MX6UL module and there's one on the sbc board via the ANT EXT pin. Which is which? I couldn't find documentation on it, and its probably in the DEY configurations somewhere but I don't know where to look for these kinds of things.

Also I'm using the stock image because for some reason, I couldn't get a proper image to build. I built an image with the following inside of my local.conf file:

#
#Debugging
#
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
EXTRA_IMAGE_FEATURES += "tools-debug"
EXTRA_IMAGE_FEATURES += "eclipse-debug"
EXTRA_IMAGE_FEATURES += "dey-network"
EXTRA_IMAGE_FEATURES += "dey-wireless"
#EXTRA_IMAGE_FEATURES += "dey-examples"

#
#Web hosting services
#
CORE_IMAGE_EXTRA_INSTALL += "apache2"
CORE_IMAGE_EXTRA_INSTALL += "php"
CORE_IMAGE_EXTRA_INSTALL += "sqlite3"

I built using bitbake core-image-base. For whatever reason, my resulting image did not have wlan0 or wlan1 as an interface when running on the sbc board -- only eth0. Any advice here?

Thank you!

-AES_Dev
asked Jun 5, 2018 in Linux by AES_Dev New to the Community (11 points)
Well another step slightly forward, I've compiled another image. I am booting it via network (https://www.digi.com/resources/documentation/digidocs/90001548/#task/eclipse_ide/new/boot_your_images_from_network.htm%3FTocPath%3DDigi%2520Embedded%2520Yocto%7CSystem%2520development%7CProgram%2520devices%7CBoot%2520options%7C_____1) but the wlan is still not showing. I noticed that upon boot, it actually says "wlan: driver load failure." I then tried "sudo modprobe wlan" and I received the following message:

modprobe: can't load module wlan (extra/wlan.ko): No such device


What am I missing here?

Please log in or register to answer this question.

2 Answers

0 votes
 
Best answer
Well I've figured it out! Since no one else has answered (or possibly the mods are just really slow at approving messages) I was determined to get this working. After scouring across various guides, I realized where I was lacking understanding. I ended up just keeping with busybox instead of Apache. You can replicate this with the default image that comes on the board.

Here are the steps to get a locally hosted web page going on your Connect Core SBC Board:

1.) Create a softAP access point

a.) Modify your wpa_suppplicant config file in /etc/wpa_supplicant.conf

# SoftAP mode (WPA-PSK/AES)
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
fast_reauth=1
update_config=1

ap_scan=2
network={
ssid="AES-AP" #this is what you will see on the devices you want to connect
mode=2
frequency=2412
key_mgmt=WPA-PSK
proto=RSN
pairwise=CCMP
psk="aes_dev_ap" #enter in passphrase of choice
}

b.) Generate your WPA key for your devices to use by using 'wpa_passphrase' on your CCiMX6UL

root@ccimx6ulsbc:~# wpa_passphrase AES-AP aes_dev_ap

c.) Kill wpa_supplicant if its currently running

root@ccimx6ulsbc:~# killall wpa_supplicant

d.) Run the wpa_supplicant daemon again with the following parameters:

root@ccimx6ulsbc:~# wpa_supplicant -i wlan0 -D nl80211 -c /etc/wpa_supplicant.conf -B

e.) Check and make sure the daemon is running:

root@ccimx6ulsbc:~# ps | grep wpa_supplicant

2.) bind an IP address to your wlan interface (in this case wlan0):

root@ccimx6ulsbc:~# ifconfig wlan0 192.168.40.1 netmask 255.255.255.0 broadcast 192.168.40.255 up

3.) Now we must enable dhcp on this network interface so that devices that connect get an IP assigned

a.) Create a configuration file for the dhcp daemon to use:

root@ccimx6ulsbc:~# vi /etc/dhcp/udhcp.conf

start 192.168.40.1 #range start for IP assigning addresses
end 192.168.40.200 #range end
interface wlan0 #specify our wireless interface
option subnet 255.255.255.0
option router 192.168.40.1
option lease 43200
option dns 192.168.40.1
option domain local

:wq

b.) Create a lease file for the dhcp daemon (the daemon will complain if it doesn't exist):

root@ccimx6ulsbc:~# touch /var/lib/misc/udhcpd.leases

c.) Start the daemon with our configuration file(use -S to post messages to syslog):

root@ccimx6ulsbc:~# /usr/sbin/udhcpd -S /etc/dhcp/dhcpd.conf

d.) Make sure the daemon is running:

root@ccimx6ulsbc:~# ps | grep udhcpd

(optional)
4.) By default the httpd daemon seems to bind to all interfaces, but if you want to bind it to a specific address or interface you can end the server by killing the process (find the process PID using 'ps' and then kill it using 'kill -9 <pid>') and restart the httpd daemon by running:

root@ccimx6ulsbc:~# /usr/sbin/httpd -p 192.168.40.1:80 -h /srv/www

At this point, after connecting your device to your connect core board (using the key we generated in 1.b) you should be able to see your web page by entering the IP address of your wlan0 interface into your browser!

Now my only remaining task is determining why my yocto configuration did not yield an image that had the wlan0 interfaces. I will explore this next!
answered Jun 8, 2018 by AES_Dev New to the Community (11 points)
selected Jun 11, 2018 by AES_Dev
0 votes
Well I've figured out the answer to one of my questions -- regarding the antenna and wlan interface.

WLAN0 is indeed the interface tied to the antenna.

In the ConnectCore6UL reference manual it says:

You can use the control signal RF1_INT/nEXT to select between the on-module antenna
port (U.FL connector) and the external antenna port (LGA pad). This control signal has a 10K pull-up
populated on the module, which means that the on-module antenna port (U.FL connector) is active by
default. Pulling RF1_INT/nEXT low activates the external antenna port and disables the on-module
antenna port.

RF1_INT/nEXT of the CCiMX6UL on the SBC/Pro board is actually tied to SW4 (as seen here in http://ftp1.digi.com/support/documentation/55001889-02-ENG_1P.pdf)

Looks like by factory default, the switch is in the 'on' position, meaning the RF1_INT/nEXT is high and on-board antenna is the one I should be using.

I'm starting to think that all I have to do is bridge wlan0 to eth0, and then i'll likely be able to connect to the local web page. I'll try that and see what happens.
answered Jun 8, 2018 by AES_Dev New to the Community (11 points)
...