Page 1 of 2

Pi as wireless client and wireless AP?

Posted: Wed Sep 06, 2017 12:52 pm
by tazboys
Hi,

I am using Pi model B with a external wireless card which is Via Technology VNT9271B6050 802.11n/b/g USB Module 150Mbps / AR9271 / 1T x 1R MI however I cannot get the Uap up. I have followed the instructions from viewtopic.php?f=36&t=138730&start=50 but no luck. can anybody help me what I am doing wrong. when i do ifup -a i receive

Code: Select all

cannot find device "uap0"
ifup: failed to bring up uap0

/etc/network/interfaces file is below

Code: Select all

auto lo
auto wlx00127b64322f
auto uap0
auto enxb827eba49b26

iface enxb827eba49b26 inet dhcp

iface lo inet loopback
allow-hotplug wlx00127b64322f
iface wlx00127b64322f inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

#allow-hotplug uap0
#iface uap0 inet dhcp
iface uap0 inet static
address 192.168.50.1
netmask 255.255.255.0
#network 192.168.50.0
#broadcast 192.168.50.255
#gateway 192.168.50.1
thanks

Re: Pi as wireless client and wireless AP?

Posted: Wed Sep 06, 2017 1:19 pm
by SurferTim
Which version Raspbian are you using? Wheezy? Jessie? Stretch?

You should post the output of ifconfig.

Re: Pi as wireless client and wireless AP?

Posted: Wed Sep 06, 2017 1:22 pm
by SkyRise
With these interface names, it can only be Stretch... (or a really fiddled Jessie)
auto wlx00127b64322f
auto enxb827eba49b26

Re: Pi as wireless client and wireless AP?

Posted: Wed Sep 06, 2017 1:35 pm
by SurferTim
SkyRise wrote: With these interface names, it can only be Stretch... (or a really fiddled Jessie)
auto wlx00127b64322f
auto enxb827eba49b26
That is what I figured, but I wanted to make sure. The OP is trying to bring up an interface that probably doesn't exist (uap0). That is why I would like to see the output of ifconfig.

If it is Stretch, the static IP assignments go in /etc/dhcpcd.conf.

If using Stretch, ifup and ifdown no longer work on default interface names.

Code: Select all

sudo ip link set wlan0 up
sudo ip link set wlan0 down

Re: Pi as wireless client and wireless AP?

Posted: Wed Sep 06, 2017 2:50 pm
by tazboys
thanks for the prompt reply both. Yes it is Stretch.
ifconifg output is below

Code: Select all

[email protected]:~ $ ifconfig

enxb827eba49b26: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.27.108.61  netmask 255.255.255.128  broadcast 172.27.108.127
        inet6 fe80::ba27:ebff:fea4:9b26  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:a4:9b:26  txqueuelen 1000  (Ethernet)
        RX packets 47173  bytes 5723882 (5.4 MiB)
        RX errors 0  dropped 278  overruns 0  frame 0
        TX packets 58293  bytes 81680789 (77.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 124313  bytes 1902490332 (1.7 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 124313  bytes 1902490332 (1.7 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlx00127b64322f: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 10.169.108.40  netmask 255.255.255.128  broadcast 10.169.108.127
        ether 00:12:7b:64:32:2f  txqueuelen 1000  (Ethernet)
        RX packets 12  bytes 1888 (1.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 36  bytes 5856 (5.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

/etc/hostpad/hostapd.conf

Code: Select all

interface=uap0
ssid=aLGuestWiFi2
hw_mode=a
channel=6
ieee80211d=1
country_code=GB
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=kajq6432
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

I have not modified the /etc/dhcpcd.conf file at all.

Where I should setup the uap0?

any advice?

Re: Pi as wireless client and wireless AP?

Posted: Wed Sep 06, 2017 10:32 pm
by SurferTim
What is this interface?
wlx00127b64322f

Are you certain that is not your wireless interface?

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 8:13 am
by tazboys
SurferTim wrote:
Wed Sep 06, 2017 10:32 pm
What is this interface?
wlx00127b64322f

Are you certain that is not your wireless interface?
it is the wireless interface...

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 10:15 am
by SurferTim
Then that is the interface name to use for your AP setup.

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 10:20 am
by tazboys
I am sorry I may be dump so should I change the interface=uap0 to wlx... in /etc/hostpad/hostapd.conf ?

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 10:41 am
by SurferTim
You are doing fine. Don't use the uap0 name. Replace it in all you setups with wlx00127b64322f.

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 12:08 pm
by tazboys
thanks, I have but still rPi does not broadcast another network.

/etc/hostapd/hostapd.conf

Code: Select all

interface=wlx00127b64322f
ssid=newaptest
hw_mode=a
channel=6
ieee80211d=1
country_code=GB
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=kajq6432
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

/etc/network/interfaces

Code: Select all

source-directory /etc/network/interfaces.d
auto lo
auto wlx00127b64322f
#auto uap0
auto enxb827eba49b26

iface enxb827eba49b26 inet dhcp

iface lo inet loopback
allow-hotplug wlx00127b64322f
iface wlx00127b64322f inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

#allow-hotplug uap0
iface wlx00127b64322f inet dhcp
#iface wlx00127b64322f inet static
address 192.168.50.1
#netmask 255.255.255.0
#network 192.168.50.0
#broadcast 192.168.50.255
#gateway 192.168.50.1
ifconfig

Code: Select all


[email protected]:~# ifconfig
enxb827eba49b26: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.27.108.61  netmask 255.255.255.128  broadcast 172.27.108.127
        inet6 fe80::ba27:ebff:fea4:9b26  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:a4:9b:26  txqueuelen 1000  (Ethernet)
        RX packets 1778  bytes 172676 (168.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3157  bytes 4261950 (4.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 5348  bytes 75059021 (71.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5348  bytes 75059021 (71.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlx00127b64322f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.169.108.40  netmask 255.255.255.128  broadcast 10.169.108.127
        inet6 fe80::212:7bff:fe64:322f  prefixlen 64  scopeid 0x20<link>
        ether 00:12:7b:64:32:2f  txqueuelen 1000  (Ethernet)
        RX packets 160  bytes 21276 (20.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 72  bytes 10460 (10.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 12:11 pm
by SurferTim
There is a IP address and netmask showing up on your wifi interface. Where is that coming from?

I don't see a driver entry on your hostapd.conf file.

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 12:57 pm
by tazboys
I have now added the driver to the hostapd file and it is broadcasting a new network which is good but when join to that network there is no internet working also IP address is coming as 169.254.81.46. Is it something with Dhcpcd file? If so what I should put there.

Netmask is coming from the network btw.

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 2:30 pm
by SurferTim
Insure you have set up a static IP for your wlan interface in /etc/dhcpcd.conf. Only the IP address. No routers or domain_name_servers on the wlan assignment.

Then check /etc/hostapd/hostapd.conf, and insure the dhcp_range is set correctly for your wlan localnet. Also insure you edited /etc/default/hostapd and uncommented and added this

Code: Select all

DAEMON-CONF="/etc/hostapd/hostapd.conf"

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 4:53 pm
by tazboys
I cannot find the where to set the dhcp_range. is it in dnsmasq.conf?

Re: Pi as wireless client and wireless AP?

Posted: Thu Sep 07, 2017 5:01 pm
by SurferTim
tazboys wrote: I cannot find the where to set the dhcp_range. is it in dnsmasq.conf?
Yes. Change this to agree with your localnet.

Code: Select all

interface wlan0
dhcp-range=192.168.4.8,192.168.4.250,255.255.255.0,12h

Re: Pi as wireless client and wireless AP?

Posted: Sat Sep 09, 2017 9:31 pm
by tazboys
I am struggling so badly here. I have spent so many hours on this simple setup. Is there any tutorials that I can follow at all for this?
Thanks.

Re: Pi as wireless client and wireless AP?

Posted: Sat Sep 09, 2017 9:54 pm
by SurferTim
I haven't found an accurate online tutorial yet. I have my RPi3 working as an AP. This is what I do.

DO NOT MODIFY /etc/network/interfaces FILE! The only uncommented line in that file should be
source-directory /etc/network/interfaces.d

If you have connected to a wifi network, edit /etc/wpa_supplicant/wpa_supplicant.conf and remove the network part. It will look like this.

Code: Select all

network={
  ssid="myssid'
  psk="mypassphrase"
}
First, insure your OS is up to date.

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
Then install the modules.

Code: Select all

sudo apt-get install dnsmasq hostapd
Replace wlx12345 with the name of your wifi interface and enx12345 with the ethernet interface from ifconfig in the following files. In the latest version of Stretch (2017-09-07), these will be wlan0 and eth0.

My /etc/dhcpcd.conf addition:

Code: Select all

interface wlx12345
static ip_address=192.168.4.1/24
My /etc/dnsmasq.conf file. I remove everything but these lines.

Code: Select all

interface=wlx12345
dhcp-range=192.168.4.8,192.168.4.250,255.255.255.0,12h
Create the file /etc/hostapd/hostapd.conf and insert this:

Code: Select all

interface=wlx12345
driver=nl80211
ssid=RPiNet
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=mypassphrase
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Edit /etc/default/hostapd, uncomment and change this:

Code: Select all

DAEMON_CONF="/etc/hostapd/hostapd.conf"
Edit /etc/sysctl.conf and uncomment

Code: Select all

net.ipv4.ip_forward=1
The next section is required only if you are wanting to access the internet through the ethernet connection.

My iptables rule.

Code: Select all

sudo iptables -t nat -A  POSTROUTING -o enx12345 -j MASQUERADE
Then make the iptables rule permanent.

Code: Select all

sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
Then in /etc/rc.local, add this:

Code: Select all

iptables-restore < /etc/iptables.ipv4.nat

Re: Pi as wireless client and wireless AP?

Posted: Sun Oct 08, 2017 3:04 pm
by tazboys
hi,
thanks for your continued help to me but even I have done everything and hostapd says it is initialised still AP does not show on my devices. please see the log below for "sudo hostapd /etc/hostapd/hostapd.conf -dd " any help will be appreciated as I want to use this module due to fact that i has 2 wireless antennas and the range is better than others.

Code: Select all

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: TDLS supported
nl80211: TDLS external setup
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: Supported cipher 00-0f-ac:10
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supported cipher 00-0f-ac:9
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported cipher 00-0f-ac:13
nl80211: Supported cipher 00-0f-ac:11
nl80211: Supported cipher 00-0f-ac:12
nl80211: Using driver-based off-channel TX
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: interface wlx00127b64322f in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP(wlx00127b64322f) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x671348
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x671348 match=
nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0x671348 match=
nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0x671348 match=
nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0x671348 match=
nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0x671348 match=
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x671348 match=
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x671348 match=
nl80211: Add own interface ifindex 3
nl80211: if_indices[16]: 3
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=GB (DFS-ETSI)
nl80211: 2402-2482 @ 40 MHz 20 mBm
nl80211: 5170-5250 @ 80 MHz 20 mBm
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS)
nl80211: 5490-5710 @ 160 MHz 27 mBm (DFS)
nl80211: 57000-66000 @ 2160 MHz 40 mBm
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
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
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=0x672858 (wlx00127b64322f), first=1)
wlx00127b64322f: Flushing old station entries
nl80211: flush -> DEL_STATION wlx00127b64322f (all)
wlx00127b64322f: Deauthenticate all stations
nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2437
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=2437 wait=0 no_cck=0 no_ack=0 offchanok=0
CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 00 12 7b 64 32 2f 00 12 7b 64 32 2f 00 00 02 00
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2437 wait=0)
wpa_driver_nl80211_set_key: ifindex=3 (wlx00127b64322f) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlx00127b64322f) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlx00127b64322f) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlx00127b64322f) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlx00127b64322f with hwaddr 00:12:7b:64:32:2f and ssid "newaptest"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=9):
     6e 65 77 61 70 74 65 73 74                        newaptest       
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 20/20 bytes from /dev/random
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
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=60): 80 00 00 00 ff ff ff ff ff ff 00 12 7b 64 32 2f 00 12 7b 64 32 2f 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 09 6e 65 77 61 70 74 65 73 74 01 08 82 84 8b 96 0c 12 18 24 03 01 06
nl80211: Beacon tail - hexdump(len=67): 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 0c 00 7f 08 00 00 00 02 00 00 00 40 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=3
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=9):
     6e 65 77 61 70 74 65 73 74                        newaptest       
  * beacon_int=100
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=0x8
nl80211: group_cipher=0x8
nl80211: beacon_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
nl80211: proberesp_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
nl80211: assocresp_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 (wlx00127b64322f) alg=2 addr=0xc77c0 key_idx=1 set_tx=1 seq_len=0 key_len=32
nl80211: KEY_DATA - hexdump(len=32): [REMOVED]
   broadcast key
nl80211: Set wlx00127b64322f operstate 0->1 (UP)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
wlx00127b64322f: interface state UNINITIALIZED->ENABLED
wlx00127b64322f: AP-ENABLED 
wlx00127b64322f: Setup of interface done.
ctrl_iface not configured!
RTM_NEWLINK: ifi_index=3 ifname= operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK: ifi_index=3 ifname= operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK: ifi_index=3 ifname= operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: RTM_NEWLINK: ifi_index=3 ifname=wlx00127b64322f ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: vlan_newlink(wlx00127b64322f)
VLAN: RTM_NEWLINK: ifi_index=3 ifname=wlx00127b64322f ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: vlan_newlink(wlx00127b64322f)
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=20:68:9d:98:ea:5d
nl80211: MLME event frame - hexdump(len=81): 40 00 00 00 ff ff ff ff ff ff 20 68 9d 98 ea 5d ff ff ff ff ff ff 20 c8 00 0b 42 54 48 75 62 33 2d 50 34 46 37 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c 2d 1a 6e 01 03 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
nl80211: Frame event
nl80211: RX frame sa=20:68:9d:98:ea:5d freq=2437 ssi_signal=-80 fc=0x40 seq_ctrl=0xc820 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=81
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=20:68:9d:98:ea:5d
nl80211: MLME event frame - hexdump(len=81): 40 00 00 00 ff ff ff ff ff ff 20 68 9d 98 ea 5d ff ff ff ff ff ff e0 c9 00 0b 42 54 48 75 62 33 2d 50 34 46 37 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c 2d 1a 6e 01 03 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
nl80211: Frame event
nl80211: RX frame sa=20:68:9d:98:ea:5d freq=2437 ssi_signal=-83 fc=0x40 seq_ctrl=0xc9e0 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=81
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=70:70:0d:51:3e:a6
nl80211: MLME event frame - hexdump(len=138): 40 00 00 00 ff ff ff ff ff ff 70 70 0d 51 3e a6 ff ff ff ff ff ff b0 55 00 10 45 45 42 72 69 67 68 74 45 78 74 65 6e 64 65 72 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 05 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=70:70:0d:51:3e:a6 freq=2437 ssi_signal=-82 fc=0x40 seq_ctrl=0x55b0 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=138
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=5
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=70:70:0d:51:3e:a6
nl80211: MLME event frame - hexdump(len=138): 40 00 00 00 ff ff ff ff ff ff 70 70 0d 51 3e a6 ff ff ff ff ff ff c0 55 00 10 45 45 42 72 69 67 68 74 45 78 74 65 6e 64 65 72 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 06 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=70:70:0d:51:3e:a6 freq=2437 ssi_signal=-74 fc=0x40 seq_ctrl=0x55c0 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=138
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=70:70:0d:51:3e:a6
nl80211: MLME event frame - hexdump(len=138): 40 00 00 00 ff ff ff ff ff ff 70 70 0d 51 3e a6 ff ff ff ff ff ff f0 55 00 10 45 45 42 72 69 67 68 74 45 78 74 65 6e 64 65 72 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 07 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=70:70:0d:51:3e:a6 freq=2437 ssi_signal=-76 fc=0x40 seq_ctrl=0x55f0 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=138
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=7
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=70:70:0d:51:3e:a6
nl80211: MLME event frame - hexdump(len=122): 40 00 00 00 ff ff ff ff ff ff 70 70 0d 51 3e a6 ff ff ff ff ff ff 40 58 00 00 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 05 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=70:70:0d:51:3e:a6 freq=2437 ssi_signal=-75 fc=0x40 seq_ctrl=0x5840 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=122
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=5
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=70:70:0d:51:3e:a6
nl80211: MLME event frame - hexdump(len=122): 40 00 00 00 ff ff ff ff ff ff 70 70 0d 51 3e a6 ff ff ff ff ff ff 50 58 00 00 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 06 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=70:70:0d:51:3e:a6 freq=2437 ssi_signal=-75 fc=0x40 seq_ctrl=0x5850 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=122
nl80211: send_mlme - da= 70:70:0d:51:3e:a6 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2437
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=2437 wait=0 no_cck=0 no_ack=1 offchanok=0
CMD_FRAME - hexdump(len=127): 50 00 00 00 70 70 0d 51 3e a6 00 12 7b 64 32 2f 00 12 7b 64 32 2f 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 09 6e 65 77 61 70 74 65 73 74 01 08 82 84 8b 96 0c 12 18 24 03 01 06 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 0c 00 7f 08 00 00 00 02 00 00 00 40 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: Frame TX command accepted (no ACK); cookie 0x0
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=70:70:0d:51:3e:a6
nl80211: MLME event frame - hexdump(len=122): 40 00 00 00 ff ff ff ff ff ff 70 70 0d 51 3e a6 ff ff ff ff ff ff 80 58 00 00 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 07 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=70:70:0d:51:3e:a6 freq=2437 ssi_signal=-73 fc=0x40 seq_ctrl=0x5880 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=122
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=7
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=06:47:25:7b:31:d3
nl80211: MLME event frame - hexdump(len=122): 40 00 00 00 ff ff ff ff ff ff 06 47 25 7b 31 d3 ff ff ff ff ff ff 70 5b 00 00 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 05 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=06:47:25:7b:31:d3 freq=2437 ssi_signal=-69 fc=0x40 seq_ctrl=0x5b70 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=122
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=5
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=06:47:25:7b:31:d3
nl80211: MLME event frame - hexdump(len=122): 40 00 00 00 ff ff ff ff ff ff 06 47 25 7b 31 d3 ff ff ff ff ff ff 80 5b 00 00 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 06 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=06:47:25:7b:31:d3 freq=2437 ssi_signal=-64 fc=0x40 seq_ctrl=0x5b80 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=122
nl80211: send_mlme - da= 06:47:25:7b:31:d3 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2437
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=2437 wait=0 no_cck=0 no_ack=1 offchanok=0
CMD_FRAME - hexdump(len=127): 50 00 00 00 06 47 25 7b 31 d3 00 12 7b 64 32 2f 00 12 7b 64 32 2f 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 09 6e 65 77 61 70 74 65 73 74 01 08 82 84 8b 96 0c 12 18 24 03 01 06 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 0c 00 7f 08 00 00 00 02 00 00 00 40 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: Frame TX command accepted (no ACK); cookie 0x0
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlx00127b64322f
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlx00127b64322f(00:12:7b:64:32:2f) A1=ff:ff:ff:ff:ff:ff A2=06:47:25:7b:31:d3
nl80211: MLME event frame - hexdump(len=122): 40 00 00 00 ff ff ff ff ff ff 06 47 25 7b 31 d3 ff ff ff ff ff ff 90 5b 00 00 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 07 2d 1a 2d 00 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 08 84 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 11 00 00 dd 09 00 10 18 02 00 00 10 00 00
nl80211: Frame event
nl80211: RX frame sa=06:47:25:7b:31:d3 freq=2437 ssi_signal=-67 fc=0x40 seq_ctrl=0x5b90 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=122
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=7
Signal 2 received - terminating
hostapd_interface_deinit_free(0x6708d0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x6708d0)
wlx00127b64322f: interface state ENABLED->DISABLED
hostapd_bss_deinit: deinit bss wlx00127b64322f
wlx00127b64322f: Deauthenticate all stations
nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2437
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=2437 wait=0 no_cck=0 no_ack=0 offchanok=0
CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 00 12 7b 64 32 2f 00 12 7b 64 32 2f 00 00 03 00
nl80211: Frame TX command accepted; cookie 0xe
wlx00127b64322f: AP-DISABLED 
hostapd_cleanup(hapd=0x672858 (wlx00127b64322f))
hostapd_free_hapd_data(wlx00127b64322f)
hostapd_interface_deinit_free: driver=0xd8a68 drv_priv=0x6711c8 -> hapd_deinit
nl80211: deinit ifname=wlx00127b64322f disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=3)
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Teardown AP(wlx00127b64322f) - device_ap_sme=0 use_monitor=0
nl80211: Unsubscribe mgmt frames handle 0x88ef9bc1 (AP teardown)
hostapd_interface_free(0x6708d0)
hostapd_interface_free: free hapd 0x672858
hostapd_cleanup_iface(0x6708d0)
hostapd_cleanup_iface_partial(0x6708d0)
hostapd_cleanup_iface: free iface=0x6708d0

hostapd file is below as well

Code: Select all

interface=wlx00127b64322f
driver=nl80211
ssid=newaptest
hw_mode=g
channel=6
#ieee80211n=1
#ieee80211d=1
#ieee80211h=1
#wme_enabled=1
wmm_enabled=1
#country_code=GB
#macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=kajq6432
#wpa_key_mgmt=WPA-PSK
#wpa_pairwise=TKIP
#rsn_pairwise=CCMP

Re: Pi as wireless client and wireless AP?

Posted: Sun Oct 08, 2017 3:41 pm
by SurferTim
hostapd starts as a service. To check the status

Code: Select all

sudo service hostapd status
It should show active (running)

If it shows active (exited), you have a problem with the /etc/default/hostapd file not having the correct entry for DAEMON_CONF , or an error on the /etc/hostapd/hostapd.conf entries.

Re: Pi as wireless client and wireless AP?

Posted: Sun Oct 08, 2017 7:10 pm
by tazboys
thanks again. it is strange and not stable. when i restart my pi it does get the below ip addresses. and the status is below as well.

Code: Select all

[email protected]:~# sudo service hostapd status
● hostapd.service - LSB: Advanced IEEE 802.11 management daemon
   Loaded: loaded (/etc/init.d/hostapd; generated; vendor preset: enabled)
   Active: active (exited) since Sun 2017-10-08 17:44:36 UTC; 15min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 456 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/hostapd.service

Oct 08 17:44:31 raspberrypi systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon...
Oct 08 17:44:36 raspberrypi hostapd[456]: Starting advanced IEEE 802.11 management: hostapd failed!
Oct 08 17:44:36 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.
ifconfig

Code: Select all

enxb827eba49b26: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.14  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e20b:b324:6742:3c31  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:a4:9b:26  txqueuelen 1000  (Ethernet)
        RX packets 898  bytes 67429 (65.8 KiB)
        RX errors 0  dropped 3  overruns 0  frame 0
        TX packets 171  bytes 17075 (16.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 1700  bytes 160714 (156.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1700  bytes 160714 (156.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlx00127b64322f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.15  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e896:2d9a:f188:5546  prefixlen 64  scopeid 0x20<link>
        ether 00:12:7b:64:32:2f  txqueuelen 1000  (Ethernet)
        RX packets 1514  bytes 347519 (339.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 152  bytes 17254 (16.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
If I do the below hostapd runs and broadcasts the internet but I do get no internet.

Code: Select all

[email protected]:~# killall wpa_supplicant
[email protected]:~# sudo service hostapd stop && sudo service hostapd start
[email protected]:~# sudo service hostapd status
● hostapd.service - LSB: Advanced IEEE 802.11 management daemon
   Loaded: loaded (/etc/init.d/hostapd; generated; vendor preset: enabled)
   Active: active (running) since Sun 2017-10-08 18:03:27 UTC; 3s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4710 ExecStop=/etc/init.d/hostapd stop (code=exited, status=0/SUCCESS)
  Process: 4748 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/hostapd.service
           └─4753 /usr/sbin/hostapd -B -P /run/hostapd.pid /etc/hostapd/hostapd.conf

Oct 08 18:03:25 raspberrypi systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon...
Oct 08 18:03:27 raspberrypi hostapd[4748]: Starting advanced IEEE 802.11 management: hostapd.
Oct 08 18:03:27 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.

ifconfig is now as below

Code: Select all

[email protected]:~# ifconfig
enxb827eba49b26: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.14  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e20b:b324:6742:3c31  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:a4:9b:26  txqueuelen 1000  (Ethernet)
        RX packets 4633  bytes 390323 (381.1 KiB)
        RX errors 0  dropped 10  overruns 0  frame 0
        TX packets 4047  bytes 365981 (357.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 2822  bytes 267452 (261.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2822  bytes 267452 (261.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlx00127b64322f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.1  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::4052:563e:bc3f:e8db  prefixlen 64  scopeid 0x20<link>
        ether 00:12:7b:64:32:2f  txqueuelen 1000  (Ethernet)
        RX packets 5282  bytes 748350 (730.8 KiB)
        RX errors 0  dropped 4  overruns 0  frame 0
        TX packets 663  bytes 112496 (109.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
what do you suggest?

Re: Pi as wireless client and wireless AP?

Posted: Sun Oct 08, 2017 7:20 pm
by SurferTim
Then check dnsmasq.

Code: Select all

sudo service dnsmasq status
Same thing. Should show active (running)

Why does the IP address on the wireless change localnets? On the first ifconfig, it is 192.168.1.15, and the second it is 192.168.2.1.

Edit: If you are trying to get both an AP and station (client) on a single wireless device, I couldn't get it to work.
And FYI, not all usb wifi devices support AP mode. Mine doesn't.

Re: Pi as wireless client and wireless AP?

Posted: Sun Oct 08, 2017 9:12 pm
by tazboys
dnsmasq is running as expected. I am not sure why it does change. 192.168.1.x is IP range from my home network and 192.168.2.x is the I have put in the rPi. I have to do "killall wpa_supplicant" and "service hostapd start" to get AP turn on. I am not sure why thought.

Also even I get a wifi and connect internet does not work on connected devices.

I have also checked the card attached support ap and client. datasheet is here http://cdn.viaembedded.com/products/doc ... 151104.pdf

Re: Pi as wireless client and wireless AP?

Posted: Sun Oct 08, 2017 9:27 pm
by SurferTim
Do you have any network settings in /etc/wpa_supplicant/wpa_supplicant.conf? If so, that will mess up your AP start.

Re: Pi as wireless client and wireless AP?

Posted: Sun Oct 08, 2017 9:38 pm
by tazboys
yes, as I want to use my wifi to broadcast another wifi my existing wifi details are there


/etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

#ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
#update_config=1

network={
	ssid="homewifi"
	psk="homewifipassword"
}