AP mode on Linux

Hi,

I’m trying to run my Dragonboard in AP mode with no success. I’m trying with hostapd and dnsmaq. Does anyone know how to configure it properly? Is there any special configuration that should be made on /etc/hostapd/hostapd.conf?

My configuration file is as follows:

interface=wlan0
driver=nl80211
ssid=SSID_NAME
hw_mode=g
channel=10
macaddr_acl=0
auth_algs=3
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=MY_PASSPHRASE
rsn_pairwise=CCMP
wpa_pairwise=CCMP

thanks in advance
Marcelo

hi,

soft ap was fixed very recently, so make sure to use a (very) recent build from http://builds.96boards.org/snapshots/dragonboard410c/linaro/debian/.

also, it would help if you can give more information about your setup/image and provide log files. Typically dmesg or journactl output, as well as the terminal logs.

Hi,

Thanks for your answer…

I was using the following image: dragonboard410c_sdcard_install_debian-66.zip

I’m downloading the version you mentioned and I will give it a try. If it doesn’t work I’ll post my detailed configuration and log files.

Hi,

It didn’t work.

/etc/network/interfaces:

source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

allow-hotplug wlan0
iface wlan0 inet static
  address 10.0.1.1
  network 10.0.1.0
  netmask 255.255.255.0
  gateway 10.0.1.1

/etc/hostapd/hostapd.conf:

interface=wlan0
ssid=MYSSID
hw_mode=g
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
channel=10
macaddr_acl=0
auth_algs=3
driver=nl80211
ieee80211n=1
wmm_enabled=1
beacon_int=100
rsn_pairwise=CCMP
wpa_pairwise=CCMP
ignore_broadcast_ssid=0

/etc/dnsmasq.conf:

interface=wlan0
no-resolv
bogus-priv
server=8.8.8.8
server=8.8.4.4
dhcp-range=10.0.1.50,10.0.1.150,255.255.255.0,12h

/etc/NetworkManager/NetworkManager.conf:

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ífupdown]
managed=false

the command “iw wlan0 info” output is:

Interface wlan0
  ifindex 3
  wdev 0x1
  addr 02:00:85:4f:25:28
  type managed
  wiphy 0

command “iwconfig” output is:

wlan0     IEEE 802.11abgn ESSID:off/any
           Mode:Managed Access Point: Not-Associated  Tx-Power=20 dBm
           Retry short limit:7  RTS thr:off   Fragment thr:off
           Encryption key:off
           Power Management:off

sit0       no wireless extensions.

lo         no wireless extensions.

/etc/sysctl.conf:
net.ipv4.ip_forward=1

dmesg output for wcn36xx:

[   18.833139] wcn36xx-msm a000000.qcom,wcn36xx: wcn36xx_msm_probe initialized
[   18.845425] wcn36xx: mac address: 02:00:85:4f:25:28
[   19.400646] wcn36xx: firmware WLAN version 'WCN v2.0 RadioPhy vRhea_GF_1.12 with 19.2MHz XO' and CRM version 'CNSS-PR-2-0-1-2-c1-00010'
[   19.400684] wcn36xx: firmware API 1.5.1.2, 41 stations, 2 bssids
[   19.412911] wcn36xx: FW Cap MCC
[   19.417892] wcn36xx: FW Cap P2P
[   19.420756] wcn36xx: FW Cap SLM_SESSIONIZATION
[   19.423852] wcn36xx: FW Cap DOT11AC_OPMODE
[   19.428399] wcn36xx: FW Cap SAP32STA
[   19.432473] wcn36xx: FW Cap TDLS
[   19.436208] wcn36xx: FW Cap P2P_GO_NOA_DECOUPLE_INIT_SCAN
[   19.439392] wcn36xx: FW Cap WLANACTIVE_OFFLOAD
[   19.444722] wcn36xx: FW Cap BEACON_OFFLOAD
[   19.449064] wcn36xx: FW Cap SCAN_OFFLOAD
[   19.453150] wcn36xx: FW Cap BCN_MISS_OFFLOAD
[   19.457218] wcn36xx: FW Cap STA_POWERSAVE
[   19.461473] wcn36xx: FW Cap STA_ADVANCED_PWRSAVE
[   19.465378] wcn36xx: FW Cap BCN_FILTER
[   19.470078] wcn36xx: FW Cap RTT
[   19.473625] wcn36xx: FW Cap RATECTRL
[   19.476659] wcn36xx: FW Cap WOW
[   19.480481] wcn36xx: FW Cap WLAN_ROAM_SCAN_OFFLOAD
[   19.483314] wcn36xx: FW Cap SPECULATIVE_PS_POLL
[   19.488210] wcn36xx: FW Cap IBSS_HEARTBEAT_OFFLOAD
[   19.492636] wcn36xx: FW Cap WLAN_SCAN_OFFLOAD
[   19.497490] wcn36xx: FW Cap WLAN_PERIODIC_TX_PTRN
[   19.501916] wcn36xx: FW Cap ADVANCE_TDLS
[   19.506605] wcn36xx: FW Cap BATCH_SCAN
[   19.510596] wcn36xx: FW Cap FW_IN_TX_PATH
[   19.514160] wcn36xx: FW Cap EXTENDED_NSOFFLOAD_SLOT
[   19.518236] wcn36xx: FW Cap CH_SWITCH_V1
[   19.522925] wcn36xx: FW Cap HT40_OBSS_SCAN
[   19.527085] wcn36xx: FW Cap UPDATE_CHANNEL_LIST
[   19.530999] wcn36xx: FW Cap WLAN_MCADDR_FLT
[   19.535424] wcn36xx: FW Cap WLAN_CH144
[   19.539590] wcn36xx: FW Cap TDLS_SCAN_COEXISTENCE
[   19.543409] wcn36xx: FW Cap LINK_LAYER_STATS_MEAS
[   19.548189] wcn36xx: FW Cap EXTENDED_SCAN
[   19.552867] wcn36xx: FW Cap DYNAMIC_WMM_PS
[   19.556858] wcn36xx: FW Cap MAC_SPOOFED_SCAN
[   19.560851] wcn36xx: FW Cap FW_STATS
[   19.565284] wcn36xx: FW Cap WPS_PRBRSP_TMPL
[   19.568838] wcn36xx: FW Cap BCN_IE_FLT_DELTA

hi,

i will be gone in a few mins … until next week… i am hoping someone from the support team can jump in and help.

what I can say in the mean time is that I have tested AP mode using the recent builds and it worked. I could connect from my phone and/or my laptop to the board in AP mode and ‘ssh into it’. I tried with 2 different methods:

  • using nmtui utility. iirc it worked without any issue after i installed dnsmasq-base and iptable packages.
  • using gnome-shell GUI and using the ‘setup Wifi HotSpot’ button in the top right menu, and it automatically setup AP mode with encryption, and that worked too.

I know bjorn was testing running hostapd directly as well.

I wasn’t able to set it using the ALIP/LXDE GUI, but i guess, it’s just because i didn’t figure out how to use it…

Marcelo,

Is that the end of the dmesg log? Is hostapd telling you that it successfully brought up the AP and are there any error messages at that point in the kernel log.

From my exchange with ndec I believe you will at least need build 80, but I’m not exactly sure when he merged the necessary fixes. If you don’t have those you will find a message from remoteproc about a “fatal error” - indicating that the wireless cpu has crashed.

Regards,
Bjorn

Hi Bjorn,

Finally I figured out what was wrong. When I posted the first question in the forum, I was using the image 64. This would not work because the AP mode was not properly implemented.

After ndec gave me this information, I downloaded the latest image and redid the entire configuration, except for one small detail. I completely forgot to tell hostapd which the path to the configuration file:

in /etc/network/interfaces:

iface wlan0 inet static
    hostapd /etc/hostapd/hostapd.conf
    ...

Now it is working just fine.

FYI: using /etc/default/hostapd and setting DAEMON_CONF did not work as well.

One last question: How many clients the board will support in AP mode?

Regards,
Marcelo