September 21, 2019, 01:33:50 pm

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Another failure to use WLAN AP on cubietruck

Started by Don Pedro, January 22, 2016, 06:21:53 pm

Previous topic - Next topic

Don Pedro

Hi there,

I have a similar problem like in that post here:
http://www.cubieforums.com/index.php/topic,963.0.html
I equally cannot setup a hotspot on my cubietruck. However my prerequesites are a bit different, as above link is a bit older and software has improved since then. Plus additionally I'm facing misleading information from the internet.

So I have:

       
  • Debian jessie, I use Igor's image. Curretly this is V3.4.110 from 28th of Dec 2015

  •    
  • A current version of hostapd from Igor's image, i. e. v2.5-devel which should  be current.

  •    
  • I can scan the WLAN when using the adapter in non-AP mode, I see neighbouring nets, so the wlan adapter should basically be OK.

What anomalies I realized (in comparison to what you regularly read on the net)

       
  • I have no such thing as a bcmdhd driver on my machine. Sunxi says it's ap6210 now, read more here: https://linux-sunxi.org/Cubietruck/AP6210 However this should be OK for jessie. This driver is loaded during boot (etc/modules).

  •    
  • The driver hehaves like bcmdhd in many aspects, it equally says "Disable use_monitor with device_ap_sme since no monitor mode support detected" as does bcmdhd.

  •    
  • Above sunxi link says that to use AP you must add "op_mode=2" in /etc/modules (like with bcmdHD). However if I do so the driver will not get loaded at startup anymore!

  •    
  • I tried using the seemingly incorrectly configured driver with hostapd anyway. And hey, who would've guessed, during startup I see the following log output:

nl80211: Failed to set interface 6 to mode 3: -22 (Invalid argument)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 6 iftype 3 (AP)
nl80211: Mode change succeeded while interface is down
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0

  • So it seems this driver is capable of automatically setting op_mode=2, it even detects if this cannot be done due to an active interface, shuts it down and resets the op_mode, this time successfully.


So hostapd successfully starts up, at the end I can see "wlan0: AP-ENABLED". For a flash of a second I was in good hope it should work now, but with none of my devices I could see the Cubie's WLAN (i tried three devices). Also when trying to connect blindly this has no effect on connectivity. This holds true for both, encrypted and unencrypted setup. Here's the output of hostapd for both cases:

Without encryption:

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd.conf
ctrl_interface_group=0
nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 6 iftype 3 (AP)
nl80211: Failed to set interface 6 to mode 3: -22 (Invalid argument)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 6 iftype 3 (AP)
nl80211: Mode change succeeded while interface is down
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x8ecfa8 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x8ecfa8 match=
nl80211: Enable Probe Request reporting nl_preq=0x8ecba0
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x8ecba0 match=
nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
nl80211: Add own interface ifindex 6
nl80211: if_indices[16]: 6
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Previous country code 00, new country code DE
Continue interface setup after channel list update
ctrl_iface not configured!
random: Got 20/20 bytes from /dev/random
RTM_NEWLINK: ifi_index=6 ifname=wlan0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface wlan0 is up
RTM_NEWLINK: ifi_index=6 ifname=wlan0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
Channel list update timeout - try to continue anyway
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 40 MHz 20 mBm (no IR)
nl80211: 5735-5835 @ 40 MHz 20 mBm (no IR)
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=14 freq=2484 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=14 freq=2484 MHz max_tx_power=20 dBm
hw vht capab: 0x0, conf vht capab: 0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 11  Frequency: 2462 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2462 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2462 MHz, cf2=0 MHz)
  * freq=2462
  * vht_enabled=0
  * ht_enabled=1
  * sec_channel_offset=0
  * channel_type=1
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
hostapd_setup_bss(hapd=0x8ec538 (wlan0), first=1)
wlan0: Flushing old station entries
nl80211: flush -> DEL_STATION wlan0 (all)
wlan0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 6c:fa:a7:72:17:44 and ssid "Nachbarschaftshilfe"
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=70): 80 00 00 00 ff ff ff ff ff ff 6c fa a7 72 17 44 6c fa a7 72 17 44 00 00 00 00 00 00 00 00 00 00 64 00 21 04 00 13 4e 61 63 68 62 61 72 73 63 68 61 66 74 73 68 69 6c 66 65 01 08 82 84 8b 96 0c 12 18 24 03 01 0b
nl80211: Beacon tail - hexdump(len=95): 07 06 44 45 20 01 0e 14 2a 01 00 32 04 30 48 60 6c 2d 1a 0c 00 1f ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 0b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=6
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=19):
[REMOVED]
  * beacon_int=100
nl80211: hidden SSID not in use
nl80211: privacy=0
nl80211: auth_algs=0x1
nl80211: wpa_version=0x0
nl80211: key_mgmt_suites=0x4
nl80211: pairwise_ciphers=0x1
nl80211: group_cipher=0x1
nl80211: SMPS mode - off
nl80211: Set wlan0 operstate 0->1 (UP)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED
wlan0: Setup of interface done.
RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])


And with encryption:

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd.conf
ctrl_interface_group=0
nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 6 iftype 3 (AP)
nl80211: Failed to set interface 6 to mode 3: -22 (Invalid argument)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 6 iftype 3 (AP)
nl80211: Mode change succeeded while interface is down
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x9a8f98 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x9a8f98 match=
nl80211: Enable Probe Request reporting nl_preq=0x9a8f10
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x9a8f10 match=
nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
nl80211: Add own interface ifindex 6
nl80211: if_indices[16]: 6
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Previous country code 00, new country code DE
Continue interface setup after channel list update
ctrl_iface not configured!
random: Got 20/20 bytes from /dev/random
RTM_NEWLINK: ifi_index=6 ifname=wlan0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface wlan0 is up
RTM_NEWLINK: ifi_index=6 ifname=wlan0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
Channel list update timeout - try to continue anyway
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 40 MHz 20 mBm (no IR)
nl80211: 5735-5835 @ 40 MHz 20 mBm (no IR)
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=14 freq=2484 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=14 freq=2484 MHz max_tx_power=20 dBm
hw vht capab: 0x0, conf vht capab: 0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 11  Frequency: 2462 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2462 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2462 MHz, cf2=0 MHz)
  * freq=2462
  * vht_enabled=0
  * ht_enabled=1
  * sec_channel_offset=0
  * channel_type=1
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
hostapd_setup_bss(hapd=0x9a8568 (wlan0), first=1)
wlan0: Flushing old station entries
nl80211: flush -> DEL_STATION wlan0 (all)
wlan0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 6c:fa:a7:72:17:44 and ssid "Nachbarschaftshilfe"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=19):
[REMOVED]
PSK (ASCII passphrase) - hexdump_ascii(len=20): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=70): 80 00 00 00 ff ff ff ff ff ff 6c fa a7 72 17 44 6c fa a7 72 17 44 00 00 00 00 00 00 00 00 00 00 64 00 31 04 00 13 4e 61 63 68 62 61 72 73 63 68 61 66 74 73 68 69 6c 66 65 01 08 82 84 8b 96 0c 12 18 24 03 01 0b
nl80211: Beacon tail - hexdump(len=117): 07 06 44 45 20 01 0e 14 2a 01 00 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 2d 1a 0c 00 1f ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 0b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=6
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=19):
     4e 61 63 68 62 61 72 73 63 68 61 66 74 73 68 69   Nachbarschaftshi
     6c 66 65                                          lfe
  * beacon_int=100
nl80211: hidden SSID not in use
nl80211: privacy=1
nl80211: auth_algs=0x3
nl80211: wpa_version=0x2
nl80211: key_mgmt_suites=0x2
nl80211: pairwise_ciphers=0x10
nl80211: group_cipher=0x10
nl80211: SMPS mode - off
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=3 addr=0x5b89c key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   broadcast key
nl80211: Set wlan0 operstate 0->1 (UP)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED
wlan0: Setup of interface done.
RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])


As you can see, both variants are identical (except the encryption key stuff of course). AT least I can see no fatal errors. To me (I'm not a linux expert but I'm also not completely unexpierienced) it looks as if the AP should be operable in both cases. But obvioulsy it isn't.

And here's my hostapd.conf:

interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

ssid=[REMOVED]
country_code=DE
ieee80211d=1
hw_mode=g
channel=11
beacon_int=100
auth_algs=1
wmm_enabled=1
preamble=1
macaddr_acl=0

ieee80211n=1

wpa=2
wpa_passphrase=[REMOVED]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP

Any ideas anyone about what could be wrong here? Am I missing something completely stupid? Or what's the point here?

BR

Don

slovenia

Parameter for setting op_mode is not in /etc/modules if using Jessie.

Poslano z mojega MI 2S z uporabo Tapatalk

Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

Don Pedro

OK, didn't know that!

So, then what would I have to do to set the WLAN into AP mode? Tried to google that but did not find a hit. From what I read it appears that hostapd alone will set the WLAN into AP mode when starting up. On my Cubie this looks as if, hostapd -dd spits out "wlan0: AP-ENABLED". Nevertheless if I do cat /sys/module/ap6210/parameters/op_mode it says "0"! Obviously something's still missing...

THX

Doon

slovenia

OK, try this. Create file:

/etc/modprobe.d/myfilename.conf

Put this into file
options ap6210 op_mode=2

Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

Don Pedro

February 07, 2016, 06:32:50 pm #4 Last Edit: February 07, 2016, 06:39:12 pm by Don Pedro
Yep, I just found this out myself after some more internet studies and yes, this does work. For those interested I'll just note down my findings here:

  • In Jessie the option "op_mode=2" (or any other option) cannot be entered after the module name in /etc/modules any longer. This seems to be due to changes introduced when switching from sysvinit to systemd, see e.g. here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627949

  • For Jessie there's no module bcmdhd. As you may read at some places on the net its non-conformant architecture made some problems. Instead there's the new module ap6210 which does (among others) the WLAN stuff. For details look here: https://linux-sunxi.org/Cubietruck/AP6210

  • It appears the Cubie's WLAN adapter cannot be switched between normal and AP mode on-the-fly. At least that's the way I read it. Thus it must be instructed during boot if it should work in AP-mode or not. "echo 2 > /sys/module/ap6210/parameters/op_mode" does not switch to AP mode.

  • Somewhere on the net I read the option parameters should be placed in /etc/modules.conf - this is not correct (or at least it doesn't work for the Cubie). This was the point when I temporarily gave up and started this post.

  • Today I know: Configuration options must be placed in a file in /etc/modprobe.d that ends in ".conf". This is any file in /etc/modprobe.d that ends on ".conf" will be parsed. E. g. you have a file /etc/modprobe.d/ap6210.conf. Then you place your option in it, module by module. For the AP mode you put in there "options ap6210 op_mode=2". This is what Slovenia wrote in his reply, thanks, this is very much appreciated!

  • You may check if AP mode is instructed to the module during boot: "systool -m ap6210 -v" needs to deliver a line stating op_mode="2". If this was successful /sys/module/ap6210/parameters/op_mode should read as "2" as well.

If you follow this instructions it should be possible to set up a working AP on the Cubie even with Jessie. At least I could finally do it by following above steps.

HTH

Don