S
S
shatrakh2019-03-15 17:50:08
linux
shatrakh, 2019-03-15 17:50:08

Is it possible to work 2x adapters at the same time Wifi Raspberry PI 3 B Raspbian?

Good day!
Available:
Raspberry PI 3 B+
OS: Rasbian
wlan0 - a module built into the board, launched an access point on it to control RPI wirelessly. Everything works well and I'm happy.
wlan1 - TP-Link adapter that I connect to USB and through it I try to connect to the network to access the Internet.
Not to confuse you - I'm not trying to connect to Raspbury and get the Internet through an access point.
I'm sitting at the very raspberry with the Internet connected and I want to surf (but the access point must always be active wlan0 )
The problem is this:
When the access point is active, Internet access does not work.
That is, you can see that the TP-Link wlan1 adapterconnected to the router, passed authorization, received an IP but no Internet.
As soon as I turn off the hostapd
sudo systemctl stop hostapd service - I go to the browser everything works fine.
What I did:
After installing the OS, I configured only wlan0
wlan1 did not touch - I decided myself, I decided not to spoil it).

[email protected]:~ $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:dc:90:7e  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        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 1000  (Local Loopback)
        RX packets 969  bytes 67084 (65.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 969  bytes 67084 (65.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.1  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fe80::ba27:ebff:fe89:c52b  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:89:c5:2b  txqueuelen 1000  (Ethernet)
        RX packets 819  bytes 64431 (62.9 KiB)
        RX errors 0  dropped 2  overruns 0  frame 0
        TX packets 525  bytes 62328 (60.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.3.116  netmask 255.255.255.0  broadcast 192.168.3.255
        inet6 fe80::211:7fff:fe13:b29f  prefixlen 64  scopeid 0x20<link>
        ether 00:11:7f:13:b2:9f  txqueuelen 1000  (Ethernet)
        RX packets 128  bytes 13005 (12.7 KiB)
        RX errors 0  dropped 8  overruns 0  frame 0
        TX packets 36  bytes 5520 (5.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[email protected]:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

[email protected]:~ $ cat /etc/dhcpcd.conf
interface wlan0
        static ip_address=192.168.4.1/24
        nohook wpa_supplicant

[email protected]:~ $ routel
         target            gateway          source    proto    scope    dev tbl
        default        192.168.3.1   192.168.3.116                    wlan1
192.168.3.0 24                   192.168.3.116   kernel     link  wlan1
192.168.4.0 24                     192.168.4.1   kernel     link  wlan0
127.0.0.0               broadcast       127.0.0.1   kernel     link     lo local
127.0.0.0 8                    local       127.0.0.1   kernel     host     lo local
127.0.0.1                       local       127.0.0.1   kernel     host     lo local
127.255.255.255           broadcast       127.0.0.1   kernel     link     lo local
192.168.3.0               broadcast   192.168.3.116   kernel     link  wlan1 local
192.168.3.116              local   192.168.3.116   kernel     host  wlan1 local
192.168.3.255          broadcast   192.168.3.116   kernel     link  wlan1 local
192.168.4.0          broadcast     192.168.4.1   kernel     link  wlan0 local
192.168.4.1              local     192.168.4.1   kernel     host  wlan0 local
192.168.4.255          broadcast     192.168.4.1   kernel     link  wlan0 local
 fe80:: 64                                   kernel           wlan0
 fe80:: 64                                   kernel           wlan1
::1              local                   kernel              lo local
fe80::211:7fff:fe13:b29f              local                   kernel           wlan1 local
fe80::ba27:ebff:fe89:c52b           local                   kernel           wlan0 local
         ff00:: 8                                                     wlan0 local
         ff00:: 8                                                     wlan1 local

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question