2 2
thesign

Access Point Mode with AP6212 on armbian 5.21

Recommended Posts

Hi there,

I pulled the latest changes from github and created a fresh Debian Jessie Armbian Image for my BananaPi M2+. Specifically, I run:
BOARD=bananapim2plus
BOARD_NAME="Banana Pi M2+"
VERSION=5.21
LINUXFAMILY=sun8i
BRANCH=default
ARCH=arm

Through a lot of debugging and googeling, I found that the latest armbian Image uses a different BCM driver (https://github.com/igorpecovnik/lib/issues/484).

Now I face the following issue:
In order to use AP6216 with hostapd in access point mode, I added "bcmdhd op_mode=2" to /etc/module. I tried a number of things, e.g. using dhd instead of bcmdhd but without success?
Any ideas where I can configure AP6216 in op_mode=2 (access point mode) with the new driver?
Or any ideas where I can find additional documentation?

 

The access point mode is an important feature for me, so I am also considering using an older armbian version. With which release tag, did the new BCM driver got introduced?

thx,
markus
 

Share this post


Link to post
Share on other sites

Hi Igor,

I tried manually loading the dhd module with the op_mode=2, however the WiFi module did not switch into AP mode -> resulting in no accessible WiFi access point.
My attempts to persist the op_mode=2 module settings in /etc/modules, where unsuccessful (failure on boot).

Thus, my question: Which release changed the WiFi driver / daemon? Do you think its worth using a older armbian release until e.g. https://github.com/igorpecovnik/lib/issues/484is sorted out?

markus

Share this post


Link to post
Share on other sites
On 10. 10. 2016 at 6:59 PM, thesign said:

My attempts to persist the op_mode=2 module settings in /etc/modules, where unsuccessful (failure on boot).

 

Did you try

echo 'options dhd op_mode=2' >/etc/modprobe.d/ap6212.conf

already? And then -- just curious -- how does the output of

ls -laR /sys/module/dhd/parameters/

looks like?

Share this post


Link to post
Share on other sites

Wow, your support is amazing guys! While Igor answered, I tried tkaiser's suggestion - and it did not work. Another thing I tried (because I do not yet understand how dhd works) is to add the op_mode option to /lib/firmware/ap6212/config.txt - which did not change anything.
 

Share this post


Link to post
Share on other sites

I tried tkaiser's suggestion - and it did not work.

 

it would be nice if you could also answer tkaiser's question above. Hint: I'm thinking about stuff like

cat /sys/module/dhd/parameters/op_mode
echo 2 >/sys/module/dhd/parameters/op_mode
cat /sys/module/dhd/parameters/firmware_path

Share this post


Link to post
Share on other sites

I checked driver code and found out that it is a bit strange regarding how to chose correct working mode. In addition of setting op_mode to 2, you also have to set firmware_path correctly.

 

I checked driver code and it is a bit too complex to quickly draw a conclusion without actually testing. From what I found, op_mode=2 should be enough. You said that this doesn't really work. Next thing would be to add firmware_path=/lib/firmware/ap6212/fw_apsta.bin In essence, driver doesn't need that path is correct. What is needed is "_apsta" in fw path. So please try this, manually:

rmmod dhd
modprobe dhd op_mode=2 firmware_path=/lib/firmware/ap6212/fw_apsta.bin

If it works, you can consider tkaisers advice for persistent mode change.

 

EDIT: Please try tkaiser's advice first. I still think that op_mode=2 should be enough.

Share this post


Link to post
Share on other sites
EDIT: Please try tkaiser's advice first. I still think that op_mode=2 should be enough.

Yes it is. 

rmmod dhd
modprobe dhd op_mode=2

Correct auto loading is this way:

echo 'options dhd op_mode=2' >/etc/modprobe.d/dhd.conf

AP mode works without any problems on freshly build Armbian 5.21 for M2+

Share this post


Link to post
Share on other sites

Hi all,

I can confirm that the autoloading conf as proposed by Igor et al. works.

Thank you ever so much for your prompt replies!

Right now the WiFi signal is pretty low, I am experimenting with different settings - and this is a topic for yet another post if I do not solve it.

Thank you guys!

Share this post


Link to post
Share on other sites

Oh my ...! I sure hope it does not require me to start desoldering components - i have to get an antenna first to check if additional hardware hacks are required.

Share this post


Link to post
Share on other sites
On 2016/10/11 at 1:52 AM, tkaiser said:

 

it would be nice if you could also answer tkaiser's question above. Hint: I'm thinking about stuff like


cat /sys/module/dhd/parameters/op_mode
echo 2 >/sys/module/dhd/parameters/op_mode
cat /sys/module/dhd/parameters/firmware_path

 

 

This may cause  Network-manager not working?

Share this post


Link to post
Share on other sites
36 minutes ago, digitalsuper8 said:

Wow, I had so much trouble in getting the SSID to show when Nanopi Air Neo uses hostapd, I tried everything. The apmode.sh script solved it!

Wanna reply with an attachment of the exact script you used? I've tried everything. Porting over the Friendly Arm script to toggle AP MODE (works flawlessly), manually config/installing, waiting months for Armbians automated AP Mode (armbian-config) etc... The furthest I could get was a SSID to show but I could never actually connect to it with a device. Granted it's been a while since I revisited it but looking to see if you have a quick easy solution that worked for you. Thanks.

Share this post


Link to post
Share on other sites
30 minutes ago, StuxNet said:

The furthest I could get was a SSID to show but I could never actually connect to it with a device

 

The catch on those AP62xx is in setting op_mode=2 when loading a module (kernel 3.4.x) ... for permanent change, you need to create a systemd compatible conf. 

 

armbian-config way might work on some but not on all versions ... since it's done via exceptions.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
2 2