Jump to content

Recommended Posts

Posted

Hi,

 

I've now spent days to get the access point running with hostapd and dnsmasq on the OrangePi Lite. Still without success.

 

Output of hostapd:

 

 

Configuration file: /etc/hostapd.conf
nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Using interface wlan0 with hwaddr 00:e0:4c:d8:f6:4b and ssid "SensorBox88"
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED
wlan0: INTERFACE-DISABLED
wlan0: INTERFACE-ENABLED
wlan0: INTERFACE-DISABLED
wlan0: INTERFACE-ENABLED
Failed to set beacon parameters
wlan0: INTERFACE-DISABLED
wlan0: INTERFACE-ENABLED
Failed to set beacon parameters

 

/etc/hotapd.conf:

 

 

ssid=SensorBox88
interface=wlan0
hw_mode=g
channel=5
driver=nl80211
logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
ieee80211n=1
wpa=3
#wpa=2
preamble=1
wpa_passphrase=orangepi
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
noscan=1
country_code=DE

 

/etc/network/interfaces

 

 

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

# WLAN mit statischer Konfiguration
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.3.1
netmask 255.255.255.0
broadcast 192.168.3.255

# hostapd und dnsmasq neu starten
#   up /etc/init.d/hostapd restart
#    up /etc/init.d/dnsmasq restart
 

 

Output of iw list:

 

 

root@orangepilite:/home/orangepi# iw list
Wiphy phy0
    Band 1:
        Capabilities: 0x1962
            HT20/HT40
            Static SM Power Save
            RX HT20 SGI
            RX HT40 SGI
            RX STBC 1-stream
            Max AMSDU length: 7935 bytes
            DSSS/CCK HT40
        Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
        Minimum RX AMPDU time spacing: 16 usec (0x07)
        HT TX/RX MCS rate indexes supported: 0-7
        Frequencies:
            * 2412 MHz [1] (20.0 dBm)
            * 2417 MHz [2] (20.0 dBm)
            * 2422 MHz [3] (20.0 dBm)
            * 2427 MHz [4] (20.0 dBm)
            * 2432 MHz [5] (20.0 dBm)
            * 2437 MHz [6] (20.0 dBm)
            * 2442 MHz [7] (20.0 dBm)
            * 2447 MHz [8] (20.0 dBm)
            * 2452 MHz [9] (20.0 dBm)
            * 2457 MHz [10] (20.0 dBm)
            * 2462 MHz [11] (20.0 dBm)
            * 2467 MHz [12] (20.0 dBm) (no IR)
            * 2472 MHz [13] (20.0 dBm) (no IR)
            * 2484 MHz [14] (disabled)
        Bitrates (non-HT):
            * 1.0 Mbps
            * 2.0 Mbps
            * 5.5 Mbps
            * 11.0 Mbps
            * 6.0 Mbps
            * 9.0 Mbps
            * 12.0 Mbps
            * 18.0 Mbps
            * 24.0 Mbps
            * 36.0 Mbps
            * 48.0 Mbps
            * 54.0 Mbps
    max # scan SSIDs: 9
    max scan IEs length: 2304 bytes
    Retry short limit: 7
    Retry long limit: 4
    Coverage class: 0 (up to 0m)
    Supported Ciphers:
        * WEP40 (00-0f-ac:1)
        * WEP104 (00-0f-ac:5)
        * TKIP (00-0f-ac:2)
        * CCMP (00-0f-ac:4)
    Available Antennas: TX 0 RX 0
    Supported interface modes:
         * IBSS
         * managed
         * AP
         * monitor
         * P2P-client
         * P2P-GO
    software interface modes (can always be added):
         * monitor
    interface combinations are not supported
    Supported commands:
         * new_interface
         * set_interface
         * new_key
         * start_ap
         * new_station
         * set_bss
         * join_ibss
         * set_pmksa
         * del_pmksa
         * flush_pmksa
         * remain_on_channel
         * frame
         * set_channel
         * connect
         * disconnect
    Supported TX frame types:
         * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    Supported RX frame types:
         * IBSS: 0xd0
         * managed: 0x40 0xd0
         * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
         * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
         * P2P-client: 0x40 0xd0
         * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
    WoWLAN support:
         * wake up on anything (device continues operating normally)
 

 

/etc/init.d/hostapd:

 

 

#!/bin/sh

### BEGIN INIT INFO
# Provides:        hostapd
# Required-Start:    $remote_fs
# Required-Stop:    $remote_fs
# Should-Start:        $network
# Should-Stop:
# Default-Start:    2 3 4 5
# Default-Stop:        0 1 6
# Short-Description:    Advanced IEEE 802.11 management daemon
# Description:        Userspace IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP
#            Authenticator
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_SBIN=/usr/sbin/hostapd
DAEMON_DEFS=/etc/default/hostapd
DAEMON_CONF=/etc/hostapd.conf
NAME=hostapd
DESC="advanced IEEE 802.11 management"
PIDFILE=/run/hostapd.pid

[ -x "$DAEMON_SBIN" ] || exit 0
[ -s "$DAEMON_DEFS" ] && . /etc/default/hostapd
[ -n "$DAEMON_CONF" ] || exit 0

DAEMON_OPTS="-B -P $PIDFILE $DAEMON_OPTS $DAEMON_CONF"

. /lib/lsb/init-functions

case "$1" in
  start)
    log_daemon_msg "Starting $DESC" "$NAME"
    start-stop-daemon --start --oknodo --quiet --exec "$DAEMON_SBIN" \
        --pidfile "$PIDFILE" -- $DAEMON_OPTS >/dev/null
    log_end_msg "$?"
    ;;
  stop)
    log_daemon_msg "Stopping $DESC" "$NAME"
    start-stop-daemon --stop --oknodo --quiet --exec "$DAEMON_SBIN" \
        --pidfile "$PIDFILE"
    log_end_msg "$?"
    ;;
  reload)
      log_daemon_msg "Reloading $DESC" "$NAME"
    start-stop-daemon --stop --signal HUP --exec "$DAEMON_SBIN" \
        --pidfile "$PIDFILE"
    log_end_msg "$?"
    ;;
  restart|force-reload)
      $0 stop
    sleep 8
    $0 start
    ;;
  status)
    status_of_proc "$DAEMON_SBIN" "$NAME"
    exit $?
    ;;
  *)
    N=/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart|force-reload|reload|status}" >&2
    exit 1
    ;;
esac

exit 0
 

 

The strange thing is, that in rare cases it was sometimes possible to create the AP with the same configuration after doing: 

 

 

/etc/init.d/hostapd stop

/etc/init.d/dnsmasq stop

/etc/init.d/networking restart

hostapd /etc/hostapd.conf &

/etc/init.d/dnsmasq start

 

 

But on reboot it always failed.

 

Can somebody help me please?

Posted

Thank you very much. It is working now.

good

 

please lupus666

if you have long logs

please add spoiler tags

[ spoiler ]

[ /spoiler ]

 

remove the spaces

 

 

it is easier to read that way. Thank you

 

 

Posted

I copied everything exactly as above, the wifi network appears, but the phone does not associate.
It says wrong password.
How does hostapd not correctly send my password to the radio ?

It is "Encryption key:off"

I set it up "00000000"

 

iwconfig:

Spoiler

root@orangepi:~# iwconfig
gre0      no wireless extensions.

lo        no wireless extensions.

tunl0     no wireless extensions.

wlan1     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"geva"  Nickname:"<WIFI@REALTEK>"
          Mode:Master  Frequency:2.437 GHz  Access Point: 2C:98:51:56:D5:65   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=1/100  Signal level=-99 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

eth0      no wireless extensions.

ip6tnl0   no wireless extensions.

 

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

Important Information

Terms of Use - Privacy Policy - Guidelines