This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AP with WiFi-Dongle
#1
Hi,

I did last week the update to 1.2.0, and the AP functionality is gone.

When I click in openplotter on "Install driver", the script won't recognize my Wifi chip. Probably because I am still on RPi2 with a wifi-dongle. It is the Edimax dongle, which was often bundled wit the RPi 2.

lsusb says:
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

which used to work well with the 8192cu drivers and the special hostapd package.

But the new script won't recognize the chip, I guess that the ID just has to be added to "MrEngmans" script - but I don't know where is the correct place.

thanks for any hints
fairs winds
Christian
  Reply
#2
Install drivers is for some 5 Ghz Sticks which aren't directly supported by Raspbian. Yours is directly supported since 3 years.
If you get any result when you enter "iw list" then it is recognized.

What output does the Status button on Network page give you?

If there is something wrong with hostapd.
(There was an issue with hostapd update that should have been solved in the update script.)
The solution was "sudo systemctl enable hostapd" and reboot.
  Reply
#3
(06-18-2019, 02:30 PM)e-sailing Wrote: Install drivers is for some 5 Ghz Sticks which aren't directly supported by Raspbian. Yours is directly supported since 3 years.
If you get any result when you enter "iw list" then it is recognized.

What output does the Status button on Network page give you?

If there is something wrong with hostapd.
(There was an issue with hostapd update that should have been solved in the update script.)
The solution was "sudo systemctl enable hostapd" and reboot.

Hi e-sailing,

thanks for your answer.

iw list gives normal output, the dongle is recognized with 8192cu driver

Status-Button gives:

no AP
up network: wlan1
dnsmasq (dhcp-server)  running
hostapd (AP)                  stopped
dhcpd                             running
avahi-daemon                running
IP address
10.10.10.1 wlan1

when running 
pi@openplotter:~ $ sudo systemctl enable hostapd
Synchronizing state of hostapd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hostapd
Failed to enable unit: Unit file /etc/systemd/system/hostapd.service is masked.

ls -l /etc/systemd/system/hostapd.service
lrwxrwxrwx 1 root root 9 Jun 10 10:19 /etc/systemd/system/hostapd.service -> /dev/null

this doesn't look quite right, does it?

should I reinstall hostapd package?

fair winds
Christian

edit: reinstalled hostapd, but it will still not start.

sudo systemctl status hostapd.service gives:

sudo systemctl status hostapd.service
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2019-06-19 18:26:42 CEST; 1s ago
Process: 1191 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=1/FAILURE)

Jun 19 18:26:42 openplotter systemd[1]: hostapd.service: Control process exited, code=exited status=1
Jun 19 18:26:42 openplotter systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Jun 19 18:26:42 openplotter systemd[1]: hostapd.service: Unit entered failed state.
Jun 19 18:26:42 openplotter systemd[1]: hostapd.service: Failed with result 'exit-code'.

sudo journalctl -xe gives:

-- Unit hostapd.service has begun starting up.
Jun 19 18:27:20 openplotter hostapd[1237]: Configuration file:
Jun 19 18:27:20 openplotter hostapd[1237]: Could not open configuration file '' for reading.
Jun 19 18:27:20 openplotter hostapd[1237]: Failed to set up interface with
Jun 19 18:27:20 openplotter hostapd[1237]: Failed to initialize interface
Jun 19 18:27:20 openplotter systemd[1]: hostapd.service: Control process exited, code=exited status=1
Jun 19 18:27:20 openplotter systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
-- Subject: Unit hostapd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit hostapd.service has failed.
--
-- The result is failed.
Jun 19 18:27:20 openplotter systemd[1]: hostapd.service: Unit entered failed state.
Jun 19 18:27:20 openplotter systemd[1]: hostapd.service: Failed with result 'exit-code'.
  Reply
#4
Wifi stick is working and hostapd not.
To unmask hostapd try:

Code:
sudo systemctl unmask hostapd.service
Then try to enable hostapd again

Code:
sudo systemctl enable hostapd
  Reply
#5
(06-19-2019, 01:45 PM)e-sailing Wrote: Wifi stick is working and hostapd not.
To unmask hostapd try:

Code:
sudo systemctl unmask hostapd.service
Then try to enable hostapd again

Code:
sudo systemctl enable hostapd

unmasking hostapd works, 
enabling hostapd works as well, but the asking for the status of hostapd I get:
Code:
pi@openplotter:~ $ sudo systemctl status hostapd.service
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authent
  Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset:
  Active: activating (auto-restart) (Result: exit-code) since Wed 2019-06-19 21
 Process: 12278 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS

Jun 19 21:21:42 openplotter systemd[1]: Failed to start Advanced IEEE 802.11 AP
Jun 19 21:21:42 openplotter systemd[1]: hostapd.service: Unit entered failed sta
Jun 19 21:21:42 openplotter systemd[1]: hostapd.service: Failed with result 'exi
lines 1-8/8 (END)...skipping...
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
  Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
  Active: activating (auto-restart) (Result: exit-code) since Wed 2019-06-19 21:21:42 CEST; 1s ago
 Process: 12278 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=1/FAILURE)

Jun 19 21:21:42 openplotter systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Jun 19 21:21:42 openplotter systemd[1]: hostapd.service: Unit entered failed state.
Jun 19 21:21:42 openplotter systemd[1]: hostapd.service: Failed with result 'exit-code'.


and no possibility to connect.

Any other ideas?

Christian
  Reply
#6
To debug hostapd you should use following commands and send the output.
Code:
sudo service hostapd stop
hostapd -d /etc/hostapd/hostapd.conf
  Reply
#7
(06-19-2019, 04:17 PM)e-sailing Wrote: To debug hostapd you should use following commands and send the output.
Code:
sudo service hostapd stop
hostapd -d /etc/hostapd/hostapd.conf

hostapd -d /etc/hostapd/hostapd.conf
gives this output:

Code:
pi@openplotter:~ $ sudo hostapd -d /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
Could not read interface wlan1 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=0 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
Could not read interface wlan1 flags: No such device
nl80211: Set mode ifindex 0 iftype 2 (STATION)
nl80211: Failed to set interface 0 to mode 2: -19 (No such device)
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0x138dcf8)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x138dcf8)
wlan1: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlan1
wlan1: AP-DISABLED
hostapd_cleanup(hapd=0x138ea48 (wlan1))
hostapd_free_hapd_data: Interface wlan1 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x138dcf8)
hostapd_interface_free: free hapd 0x138ea48
hostapd_cleanup_iface(0x138dcf8)
hostapd_cleanup_iface_partial(0x138dcf8)
hostapd_cleanup_iface: free iface=0x138dcf8
  Reply
#8
"Could not read interface wlan1 flags: No such device"
hostapd has a problem with wlan1 in line 3. If status says the same as you already posted I can't tell you why it tells "no such device".

I've tried to simulate a pi2 with a pi3. When the AP is up and I connect to the raspi, raspbian everytime stops/crashes. Things which worked perfectly sometimes don't work anymore after a raspbian update. Sorry I haven't got a solution. In v2.x.x network management has changed a bit. Maybe that's a solution.
  Reply
#9
(06-20-2019, 03:22 PM)e-sailing Wrote: "Could not read interface wlan1 flags: No such device"
hostapd has a problem with wlan1 in line 3. If status says the same as you already posted I can't tell you why it tells "no such device".

I've tried to simulate a pi2 with a pi3. When the AP is up and I connect to the raspi, raspbian everytime stops/crashes. Things which worked perfectly sometimes don't work anymore after a raspbian update. Sorry I haven't got a solution. In v2.x.x network management has changed a bit. Maybe that's a solution.
Hello e-sailing,

I continued to try around...

first of all the udev rule in OP 1.2 won't give anymore the wlan1 name if there is only one wifi dongle present - I took the udev rule from 1.1. backup:

Code:
pi@openplotter:~ $ cat /etc/udev/rules.d/72-static-name.rules
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", KERNEL=="wlan*", NAME="wlan1"
and wlan1 is back. I guess that is the 1st problem with "no such device"

when now starting hostapd manually, I get good reading:

Code:
pi@openplotter:~ $ sudo hostapd -d /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
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: Using driver-based off-channel TX
nl80211: interface wlan1 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP(wlan1) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0xea8100 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=0501
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=0504
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=08
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xea8100 match=7f
nl80211: Enable Probe Request reporting nl_preq=0xea8160
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0xea8160 match=
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Add own interface ifindex 3 (ifidx_reason -1)
nl80211: if_indices[16]: 3(-1)
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2437 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2437 MHz, cf2=0 MHz)
 * freq=2437
 * vht_enabled=0
 * ht_enabled=0
 * channel_type=0
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=0xea7a48 (wlan1), first=1)
wlan1: Flushing old station entries
nl80211: flush -> DEL_STATION wlan1 (all)
wlan1: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION wlan1 ff:ff:ff:ff:ff:ff --> -22 (Invalid argument)
wpa_driver_nl80211_set_key: ifindex=3 (wlan1) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan1) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan1) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan1) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan1 with hwaddr 74:da:38:62:63:42 and ssid "openplotter"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=11):
    6f 70 65 6e 70 6c 6f 74 74 65 72                  openplotter    
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 20/20 bytes from /dev/random
GMK - hexdump(len=32): [REMOVED]
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=62): 80 00 00 00 ff ff ff ff ff ff 74 da 38 62 63 42 74 da 38 62 63 42 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 0b 6f 70 65 6e 70 6c 6f 74 74 65 72 01 08 82 84 8b 96 0c 12 18 24 03 01 06
nl80211: Beacon tail - hexdump(len=37): 2a 01 04 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 00 00 7f 04 00 00 00 02
nl80211: ifindex=3
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=11):
    6f 70 65 6e 70 6c 6f 74 74 65 72                  openplotter    
 * beacon_int=100
 * dtim_period=2
nl80211: hidden SSID not in use
nl80211: privacy=1
nl80211: auth_algs=0x1
nl80211: wpa_version=0x2
nl80211: key_mgmt_suites=0x2
nl80211: pairwise_ciphers=0x10
nl80211: group_cipher=0x10
nl80211: beacon_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: proberesp_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: assocresp_ies - hexdump(len=6): 7f 04 00 00 00 02
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 (wlan1) alg=3 addr=0xd4108 key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
  broadcast key
nl80211: Set wlan1 operstate 0->1 (UP)
netlink: Operstate: ifindex=3 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.
wlan1: interface state UNINITIALIZED->ENABLED
wlan1: AP-ENABLED
wlan1: Setup of interface done.
ctrl_iface not configured!
RTM_NEWLINK: ifi_index=3 ifname=wlan1 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK: ifi_index=3 ifname=wlan1 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: RTM_NEWLINK: ifi_index=3 ifname=wlan1 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: vlan_newlink(wlan1)
VLAN: RTM_NEWLINK: ifi_index=3 ifname=wlan1 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: vlan_newlink(wlan1)

but when I try to connect, I get the hard lockup.

It doesn't seem to be connected with power-management as some posts on the web suggest, as even with editing /etc/modprobe.de/8192.conf the lockup occurs... very disappointing, the regression.

is there any way to roll back to OP 1.1.0 which was working nicely?

thanks a lot for your support
Christian
  Reply
#10
I'm confused. You posted that status said up network wlan1  -> so rules have worked.
Now you say rules didn't work (wlan0)???

Your correction in rules isn't wrong when it now works.

I don't think that you have to go back to V1.1 the problem with rules you already solved.
But you can try.
rename openplotter folder to openplotterv12 
cd ~/.config
git clone https://github.com/sailoog/openplotter.git -b beta
cd openplotter
git reset --hard cb3e7e9d9c698df8bbfc4899070c2cf27644ee0b
restart



I had the same hard lockup as you and I think it has to do with the kernel. Search for raspberry kernel downgrade (choose the last 4.14).
make a backup before you do anything
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)