Jump to content


Photo

Wireless AP OPI One


  • Please log in to reply
7 replies to this topic

#1 agentzulu

agentzulu

    Newbie

  • Senior Members
  • Pip
  • 5 posts

Posted 13 February 2017 - 03:43 AM

Hello,

 

I have just been following the instructions set up here to make an access point out of my orange pi one which has the 4.9.4-sun8i dev kernels (they are not the problem). https://learn.adafru...nstall-software

 

When I begin the first test I get an error that is spit out by the interface I guess? (I'm relatively new to linux and am trying to get a hang of it)

Configuration file: /etc/hostapd/hostapd.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlx40a5ef0eea56 disabled_11b_rates=0
nl80211 driver initialization failed.
wlx40a5ef0eea56: interface state UNINITIALIZED->DISABLED
wlx40a5ef0eea56: AP-DISABLED 
hostapd_free_hapd_data: Interface wlx40a5ef0eea56 wasn't started

My hostapd.conf file is also as follows, although it looks OK to me.

ssid=PI_AP            
interface=wlx40a5ef0eea56
hw_mode=g
channel=5
driver=nl80211
logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
ieee80211n=1
wpa=3
preamble=1
#wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
noscan=1
#ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40]
country_code=US
#ieee80211d=1
root@orangepion

Spoiler

#2 Igor

Igor

    Administrator

  • Administrators
  • 3078 posts

Posted 13 February 2017 - 06:24 AM

Running wireless AP on developing kernel (no end user support by default) and 3rd party wireless hardware (also unsupported by us since it's mission impossible) is a hard nut even for experienced users. If you are newbie go the other way and search for & buy a working combination, Orange board with supported on-board WiFi(s) or just prepare yourself for many trial and errors. 

And we use NetworkManager, since it's more user friendly for newbies. The manual above is wrong in first place. Try this.


Donate to support Armbian. Thank you! | Use forum not private messaging | Use search before opening new topic | Enjoy!


#3 jkajolin

jkajolin

    Advanced Member

  • Senior Members
  • PipPipPip
  • 42 posts

Posted 13 February 2017 - 06:58 AM

The current mainline kernel has the same problem with orange pi pc plus. Legacy image works but mainline don't. On mainline the wireless don't work even on client the initialization just fails. Tried my own build and the image provided, on a working installation the command what it is trying is to set the ap mode...

#4 agentzulu

agentzulu

    Newbie

  • Senior Members
  • Pip
  • 5 posts

Posted 14 February 2017 - 05:25 PM

Another quick one...

 

What causes network manager to instinctively port traffic from a wireless interface to the ethernet interface in an access point setting? I will read up on the documentation but essentially I am thinking of setting up an access point that ports traffic to another wireless network interface.


Spoiler

#5 jkajolin

jkajolin

    Advanced Member

  • Senior Members
  • PipPipPip
  • 42 posts

Posted 14 February 2017 - 06:12 PM

don't know if you are using the post marked by igor it show nothing on actual routing.

perhaps the network manager does it internally adding iptable rows or something similar.

 

hostap itself don't actually do anything for the networking layer other than just give the client ip-address all the interface tied routing is done by normal procedures.

at least I don't know any other way to route traffic from one interface to another than iptables rules

 

one thing to test whenever have some extra time...

 

 

Another quick one...

 

What causes network manager to instinctively port traffic from a wireless interface to the ethernet interface in an access point setting? I will read up on the documentation but essentially I am thinking of setting up an access point that ports traffic to another wireless network interface.



#6 Blars

Blars

    Newbie

  • Senior Members
  • Pip
  • 7 posts

Posted 14 February 2017 - 06:14 PM

You can use iptables to set up NAT routing.  If you don't need NAT, "echo 1 > /proc/sys/net/ipv4/ip_forward" will turn on ipv4 routing.  I've never set up bridging.



#7 agentzulu

agentzulu

    Newbie

  • Senior Members
  • Pip
  • 5 posts

Posted 15 February 2017 - 12:05 AM

Alright, I will see if routing the traffic to and from my other adapter will work on its own trough iptables. I wasn't sure if there was an open file in NM that had the routing rules before I just tried to do it through iptables manually. I kind of assumed it was done internally but wanted to check. I will let you know if it works.


Spoiler

#8 agentzulu

agentzulu

    Newbie

  • Senior Members
  • Pip
  • 5 posts

Posted 15 February 2017 - 02:50 PM

Ok I did some more testing and it turns out that wpa_supplicant is interfering with hostapd, so I don't have to specifically worry about network manager anymore. All i did to fix the issue was define the cards in wpa_supplicant and then it worked as planned.

 

As for Network Manager, putting iptables over the instinctive routing path didn't change anything as I'd expected, I talked to someone that said making hard routes with the "route" command would be a better Idea and more likely to work but I've never really done that.

 

Overall, wpa_supplicant seems to mess around with the wireless interface AP mode and encourage anyone else with a similar problem to either disable it or write in the arguments that you need.


Spoiler