Jump to content

Orange pi r1 hostapd issue


madurani

Recommended Posts

Hello,

 

Could you please somebody advise me with hostapd issue?

I installed on new Orange Pi R1 new Armbian: 

ARMBIAN 5.59 testing Debian GNU/Linux 9 (stretch) 4.14.65-sunxi
 

Problem is, that after starting service hostapd system/kernel crashed 

Some short time is Access Point reachable, but then orange crashed.

 

root@orangepi:~# cat /etc/hostapd/hostapd.conf  
interface=wlan0
bridge=br0
#driver=nl80211
ssid=Rubikon
hw_mode=g
channel=8
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=xxxxxxxxxxxxxx
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP


root@orangepi:~# cat /etc/network/interfaces
auto br0
iface br0 inet static
bridge_ports enxc0742bffed69 wlan0
address 192.168.100.1
netmask 255.255.255.0

 

auto enxc0742bffed69
allow-hotplug enxc0742bffed69
iface enxc0742bffed69 inet manual

 

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wireless-power off

 

Here is message from screen after crashing of kernel:

 

Message from syslogd@localhost at Sep  7 19:03:18 ...
kernel:[  117.629526] Internal error: Oops: 5 [#1] SMP THUMB2

Message from syslogd@localhost at Sep  7 19:03:18 ...
kernel:[  117.736098] Process RTW_CMD_THREAD (pid: 1060, stack limit = 0xcadee210)

Message from syslogd@localhost at Sep  7 19:03:18 ...
kernel:[  117.742843] Stack: (0xcadeff28 to 0xcadf0000)

Message from syslogd@localhost at Sep  7 19:03:18 ...
kernel:[  117.747258] ff20:                   caa9e140 d1248000 d1249520 d1248000 ca30a200 bfb88040

 

 

 



 

Edited by madurani
Link to comment
Share on other sites

In case of troubles try with modern kernel even it might lack some functionality.

 

It is very simple:
 

armbian-config -> switch to nightly, then choose alternative kernel DEV

Link to comment
Share on other sites

8 minutes ago, Igor said:

In case of troubles try with modern kernel even it might lack some functionality.

 

It is very simple:
 

armbian-config -> switch to nightly, then choose alternative kernel DEV

Could you please provide me more details, because with armbian I work only half day?

Link to comment
Share on other sites

14 minutes ago, Igor said:

In case of troubles try with modern kernel even it might lack some functionality.

 

It is very simple:
 

armbian-config -> switch to nightly, then choose alternative kernel DEV

I tried it and kernel was switched from 4.14.65-sunxi  to 4.14.68-sunxi, but problem persist.

But I am not sure whether I correct use tool armbian-config, because I didn't get any possibility, only new kernel was installed automatically.

 

Link to comment
Share on other sites

5 minutes ago, madurani said:

I tried it and kernel was switched from 4.14.65-sunxi  to 4.14.68-sunxi, but problem persist.


Now read my post once again. It contains all you need to know/do - I am not sure it will help but its a good path. It is expensive to provide you those hints (triple in Friday night), but I am afraid I can't guide you hand by hand in real time ... please don't expect this kind of luxury.

 

Next, you are most likely not the only one with this problem. We have a powerful search function.  Use it. Get familiar with Armbian ... then try to get clues here.

Link to comment
Share on other sites

1 hour ago, Igor said:


Now read my post once again. It contains all you need to know/do - I am not sure it will help but its a good path. It is expensive to provide you those hints (triple in Friday night), but I am afraid I can't guide you hand by hand in real time ... please don't expect this kind of luxury.

 

Next, you are most likely not the only one with this problem. We have a powerful search function.  Use it. Get familiar with Armbian ... then try to get clues here.

I tried configure wifi via armbian-config and after that, I only add wlan0 to bridge br0 manually with second network interface enxc0742bffed69 and look, that it work. Before system crashed immediately(after few seconds when hostapd started). now is hostapd up 15 minutes and look fine.

 

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
4: enxc0742bffed69: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
 

I want configure router/firewall on this HW(Orange PI R1). Now I have configure it on Raspberry PI3, but there is only one network card integrated on board.

thank

Link to comment
Share on other sites

Firewall/router was build and works fine, but I have some trouble with ppp0 device.

After starting/rebooting system interface ppp0 doesn't start immediately, but after some short time, approximately 5-15 seconds and then it is OK.  

Problem is, that I don't know how to create/write correct service file for starting firewall script, which will wait/test until ppp0  device is up. 

I tried some things, but service started before ppp0 interface(don't wait till ppp0 is up). I need to add to service file some option for waiting on ppp0 device:

 

root@kraken:~# cat /lib/systemd/system/fwbuilder.service
[Unit]
Description=Fwbuilder
Wants=network-online.target
BindsTo=sys-devices-virtual-net-ppp0.device
After=network.target network-online.target sys-devices-virtual-net-ppp0.device

[Install]
WantedBy=multi-user.target
WantedBy=network-online.target  

[Service]
ExecStart=/etc/init.d/fwbuilder start
#ExecStop=/etc/init.d/fwbuilder stop

Here is status when service started before ppp0:

 

root@kraken:~# systemctl status fwbuilder
● fwbuilder.service - Fwbuilder
  Loaded: loaded (/lib/systemd/system/fwbuilder.service; enabled; vendor preset: enabled)
  Active: inactive (dead) since Sun 2018-09-09 16:10:38 CEST; 57s ago
 Process: 1585 ExecStart=/etc/init.d/fwbuilder start (code=killed, signal=TERM)
Main PID: 1585 (code=killed, signal=TERM)

Sep 09 16:10:38 kraken systemd[1]: Started Fwbuilder.
Sep 09 16:10:38 kraken systemd[1]: fwbuilder.service: Unit is bound to inactive unit sys-devices-virtual-net-ppp0.device. Stopping, too.
Sep 09 16:10:38 kraken systemd[1]: Stopping Fwbuilder...
Sep 09 16:10:38 kraken systemd[1]: Stopped Fwbuilder.

And here is status when service started after ppp0:

 

root@kraken:~# systemctl status fwbuilder
● fwbuilder.service - Fwbuilder
  Loaded: loaded (/lib/systemd/system/fwbuilder.service; enabled; vendor preset: enabled)
  Active: inactive (dead) since Sun 2018-09-09 16:07:11 CEST; 1min 35s ago
 Process: 1670 ExecStart=/etc/init.d/fwbuilder start (code=exited, status=0/SUCCESS)
Main PID: 1670 (code=exited, status=0/SUCCESS)

Sep 09 16:07:11 kraken fwbuilder[1670]: Rule 10 (global)
Sep 09 16:07:11 kraken fwbuilder[1670]: Rule 11 (global)
Sep 09 16:07:11 kraken fwbuilder[1670]: Rule 12 (global)
Sep 09 16:07:11 kraken fwbuilder[1670]: Rule 13 (global)
Sep 09 16:07:11 kraken fwbuilder[1670]: Rule 14 (global)
Sep 09 16:07:11 kraken fwbuilder[1670]: Rule 15 (global)
Sep 09 16:07:11 kraken fwbuilder[1670]: Rule 16 (global)
Sep 09 16:07:11 kraken fwbuilder[1670]: Rule 17 (global)
Sep 09 16:07:11 kraken fwbuilder[1670]: Running epilog script
Sep 09 16:07:11 kraken fwbuilder[1670]: fwbuilder.

 

 

Link to comment
Share on other sites

I am running  hostapd  on orangepir1 on   internal wifi with  success.
There is still  one  issue only on   log file creation.  Is  seems not
possible to have log with Armbian package ??My configuration is :

Spoiler

 

root@srv-orangepir1-150:~# uname -a
Linux srv-orangepir1-150 4.19.38-sunxi #5.85 SMP Wed May 8 14:20:48 CEST 2019 armv7l GNU/Linux

root@srv-orangepir1-150:~# dpkg -l |grep hostapd
ii  hostapd  3:2.7-99~armbian5.86+1 armhf   IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator

root@srv-orangepir1-150:~# dpkg -l |grep armbian
ii  armbian-firmware        5.83   all  Linux firmware
ii  armbian-tools-stretch   5.83   armhf        Armbian tools, Cubie bt utils
ii  sunxi-tools     1.4.2-2~armbian5.86+1  armhf        tools for working with Allwinner (sunxi) ARM processors


root@srv-orangepir1-150:~# cat /etc/default/hostapd | grep -v "#" | grep -v "^$"
DAEMON_CONF_INTERFACE=""
DAEMON_CONF_FILE=""
DAEMON_CONF_INTERFACE="wlan-ap0,"
DAEMON_CONF_FILE="/etc/hostapd/hostapd.srv-orangepir1-150.wlan-ap0.conf"
DAEMON_OPTS="-d -t -K -f /var/log/hostapd/hostapd.log "
DAEMON_CONF="$DAEMON_CONF_FILE"


root@srv-orangepir1-150:~# cat /etc/hostapd/hostapd.srv-orangepir1-150.wlan-ap0.conf | grep -v "#" | grep -v "^$"
interface=wlan-ap0
bridge=br-wifi-test
driver=nl80211
logger_syslog=255
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=-1
ssid=ap-srv-orangepir1-150
country_code=FR
ieee80211d=1
hw_mode=g
channel=12
auth_algs=1
ieee80211n=1
wpa=2
wpa_passphrase=;debian;
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP

root@srv-orangepir1-150:~# /etc/init.d/hostapd restart
[ ok ] Stopping advanced IEEE 802.11 management: hostapd.
[ ok ] Starting advanced IEEE 802.11 management: hostapd.

root@srv-orangepir1-150:~# ps auxww |grep hostapd
root     14085  0.0  0.1   5012   296 ?        Ss   19:35   0:00 /usr/sbin/hostapd -B -P /run/hostapd.pid -d -t -K -f /var/log/hostapd/hostapd.log /etc/hostapd/hostapd.srv-orangepir1-150.wlan-ap0.conf
root     15111  0.0  0.2   4152   560 pts/0    S+   19:43   0:00 grep hostapd
root     22572  0.0  0.0   3440    56 pts/0    S    18:23   0:00 tail -f /var/log/hostapd/hostapd.log

All jobs  seems ok, but there is no log file ....

So  now,  i remove  hostapd  (because  installed  by Armbian,   and i
reinstall hostapd from Debian stretch or stretch-backports.

root@srv-orangepir1-150:~# apt install hostapd
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
The following additional packages will be installed:
  libnl-route-3-200
Les NOUVEAUX paquets suivants seront installés :
  hostapd libnl-route-3-200
0 mis à jour, 2 nouvellement installés, 0 à enlever et 1 non mis à jour.
Il est nécessaire de prendre 608 ko dans les archives.
Après cette opération, 1 294 ko d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] O
Réception de:1 http://ftp.debian.org/debian stretch/main armhf libnl-route-3-200 armhf 3.2.27-2 [115 kB]
Réception de:2 http://security.debian.org stretch/updates/main armhf hostapd armhf 2:2.4-1+deb9u4 [493 kB]
608 ko réceptionnés en 0s (807 ko/s)                                     
Sélection du paquet libnl-route-3-200:armhf précédemment désélectionné.
(Lecture de la base de données... 31602 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../libnl-route-3-200_3.2.27-2_armhf.deb ...
Dépaquetage de libnl-route-3-200:armhf (3.2.27-2) ...
Sélection du paquet hostapd précédemment désélectionné.
Préparation du dépaquetage de .../hostapd_2%3a2.4-1+deb9u4_armhf.deb ...
Dépaquetage de hostapd (2:2.4-1+deb9u4) ...
Paramétrage de libnl-route-3-200:armhf (3.2.27-2) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.24-11+deb9u4) ...
Traitement des actions différées (« triggers ») pour man-db (2.7.6.1-2) ...
Paramétrage de hostapd (2:2.4-1+deb9u4) ...
root@srv-orangepir1-150:~#

And now log files are ok .

As a  result, because log   file are mandatory  for  me to  debug wifi
issues, and in order to give always capabilities  to install uboot and
kernel from Armbian, i  have blacklisted hostapd  from Armbian  in the
preferences, so that all is now OK.

My configuration is now :


root@srv-orangepir1-150:~# cat /etc/logrotate.d/hostapd |grep -v "#" |grep -v "^$"
/var/log/hostapd/hostapd.log
{
  rotate   4
  weekly
  minsize  1M
  size     1000k
  missingok
  create   0640 root grp_ssh_user
  notifempty
  compress
  delaycompress
  postrotate
  invoke-rc.d hostapd reload > /dev/null
  endscript
  daily
}

root@srv-orangepir1-150:~# ls -altr /etc/apt/sources.list.d/
total 36
drwxr-xr-x 6 root root 4096 juin  28 19:26 ..
-rw-r--r-- 1 root root 1022 juin  28 19:26 debian_apt_v_9_stretch_previous.list
-rw-r--r-- 1 root root  840 juin  28 19:27 debian_apt_v_9_stretch_current.list
-rw-r--r-- 1 root root  850 juin  28 19:27 debian_apt_v_9_stretch_updates.list
-rw-r--r-- 1 root root  908 juin  28 19:27 debian_apt_v_9_stretch_update_security.list
-rw-r--r-- 1 root root  848 juin  28 19:27 debian_apt_v_9_stretch_backports.list
-rw-r--r-- 1 root root  920 juin  28 19:27 debian_apt_v_9_stretch_next.list
-rw-r--r-- 1 root root  839 juin  28 19:27 armbian_apt_v_9_stretch.list

root@srv-orangepir1-150:~#  cat  /etc/apt/sources.list.d/*list|grep -v "#" |grep -v "^$"
deb http://apt.armbian.com stretch main stretch-utils stretch-desktop
deb http://ftp.fr.debian.org/debian stretch-backports main contrib non-free
deb http://ftp.debian.org/debian/ stretch main contrib non-free
deb http://ftp.debian.org/debian/ buster main contrib non-free
deb http://security.debian.org stretch/updates main contrib non-free
deb http://ftp.fr.debian.org/debian stretch-updates main contrib non-free

root@srv-orangepir1-150:~# ls -altr /etc/apt/preferences.d/
total 24
drwxr-xr-x 6 root root 4096 juin  28 19:26 ..
-rw-r--r-- 1 root root 1054 juin  28 19:27 preferences_debian_v_9_stretch_no_systemd.pref
-rw-r--r-- 1 root root 2495 juin  28 19:27 preferences_debian_v_9_stretch.pref
-rw-r--r-- 1 root root 1163 juin  28 19:27 preferences_debian_v_9_stretch_no_dhcpcd5.pref
-rw-r--r-- 1 root root 1011 juin  28 19:27 preferences_armbian_stretch.pref
drwxr-xr-x 2 root root 4096 juin  28 19:27 .

root@srv-orangepir1-150:~# cat /etc/apt/preferences.d/preferences_armbian_stretch.pref |grep -v "#" |grep -v "^$"
Package: hostapd
Pin: origin "apt.armbian.com"
Pin-Priority: -1
Package: *
Pin: origin "apt.armbian.com"
Pin-Priority: 500

 

All is ok now ...

Thanks to Debian preferences (!)

Edited by lanefu
moved config data into spoiler
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines