<SOLVED> Enabling wifi?

Kernels & Hardware, configuring network, installing services

<SOLVED> Enabling wifi?

Postby Huecuva » 2020-03-14 02:51

I have debian 10.3 installed on a fit-PC3 device on a 4GB SD card. When I type in ip a in the terminal it says my wifi is wlp5s0 and it says the state is DOWN.

I've found this tutorial for it but when I use their command iwlist wlp5s0 scan | grep -i ssid to scan for networks it says the device does not support scanning because the network is down. If I use the command I found on this thread to enable the wireless like ip link set wlp5s0 up it does not result in any out put. No errors or anything, and yet it still says the network is down.

Someone on the debian reddit suggested rfkill unblock wlp5s0, but when I tried that bash said that rfkill is not found.

How do I get my wifi working?
Last edited by Huecuva on 2020-03-18 23:46, edited 1 time in total.
Huecuva
 
Posts: 116
Joined: 2017-06-09 04:00

Re: Enabling wifi?

Postby Head_on_a_Stick » 2020-03-14 09:37

Huecuva wrote:When I type in ip a in the terminal it says my wifi is wlp5s0 and it says the state is DOWN

Please post verbatim command output rather than vague descriptions.

Huecuva wrote:I've found this tutorial

That "guide" is utter nonsense, don't use it.

See https://wiki.debian.org/WiFi/HowToUse#W ... d_WPA2-PSK instead.

Huecuva wrote:ip link set wlp5s0 up it does not result in any out put. No errors or anything, and yet it still says the network is down.

Silence==success:
Code: Select all
ip a show up

You need to associate with an access point for the "state" bit to change.

Huecuva wrote:Someone on the debian reddit suggested rfkill unblock wlp5s0, but when I tried that bash said that rfkill is not found.

Well install it then. Here's the .deb: http://deb.debian.org/debian/pool/main/ ... _amd64.deb

See also viewtopic.php?f=16&t=142973
User avatar
Head_on_a_Stick
 
Posts: 11987
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Enabling wifi?

Postby Huecuva » 2020-03-14 22:21

Head_on_a_Stick wrote:Please post verbatim command output rather than vague descriptions.

Code: Select all
3: wlp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000


Head_on_a_Stick wrote:That "guide" is utter nonsense, don't use it.
Okay.

Does that mean I need to set up a wpa-supplicant file?

Head_on_a_Stick wrote:
Code: Select all
ip a show up

You need to associate with an access point for the "state" bit to change.

Someone on the debian reddit suggested this:
Do a fresh install, make sure you have the wi-fi firmware installed if you need it and simply edit the text file /etc/network/interfaces:

auto wlan0
iface wlan0 inet dhcp
wpa-ssid <wifi-name>
wpa-psk <wifi-password>
and do:

sudo ifup wlan0
if you don't have ifup from ifupdown package, this might work too:

sudo ip link set dev wlan0 up


It didn't work even after a reboot. You can find that thread here.
Head_on_a_Stick wrote:Well install it then. Here's the .deb: http://deb.debian.org/debian/pool/main/ ... _amd64.deb

See also viewtopic.php?f=16&t=142973


You're saying I need rfkill, then?

I will check out those links, thank you. I did already have a look at that tutorial on the debian website. Since it started out scanning for SSIDs and assuming that that would work and that's what I was having problems with I admit I didn't give it much of a look past that.

EDIT: Oh, yeah. The su - thing. I am using su -, as I don't really want and don't think I need to install sudo on this machine. I tried to sudo with my username and it said sudo wasn't found so I just use su -. If sudo isn't already installed, I don't need it.
Huecuva
 
Posts: 116
Joined: 2017-06-09 04:00

Re: Enabling wifi?

Postby Huecuva » 2020-03-15 02:14

Alright, so I attempted to set up a wpa_supplicant, I installed rfkill and ConnMan and tried adding those four lines mentioned to /etc/network/interfaces. Nothing has worked.

I'm going to try reinstalling with the netinstaller with a wifi connection and if that doesn't work, I'll try the desktop installer.
Huecuva
 
Posts: 116
Joined: 2017-06-09 04:00

Re: Enabling wifi?

Postby Head_on_a_Stick » 2020-03-15 09:50

Huecuva wrote:
Does that mean I need to set up a wpa-supplicant file?

Do yourself a favour and take the time to actually *read* all of the linked guide instead of just scanning it briefly then firing off superfluous questions here.

The initial section describes using wpa_passphrase(8) & wpa_supplicant(8) to create a configuration file for the purposes of testing and also to generate a hashed passphrase line for use in /etc/network/interfaces so you don't have the password saved in plain text on your machine.

Huecuva wrote:Someone on the debian reddit suggested this

That's pretty much what is described on the Debian wiki page to which I linked. Note that ifupdown is used by /etc/network/interfaces to initiate the connection so if that isn't installed then the file will not work at all. Also note that just bringing the interface up does not connect via wireless, the interface must also be associated with the access point (usually with wpa_supplicant) and have addresses assigned (usually with dhclient); all of these are handled by the ifupdown scripts if /etc/network/interfaces is used to control the connection.

Huecuva wrote:You're saying I need rfkill, then?

You might need rfkill if your wireless interface is blocked. The rfkill(8) command will allow you to check that and also to remove any software blocks on the interface.

Huecuva wrote:I installed rfkill

Just installing the rfkill package won't help, you need to use the rfkill(8) command to check for any blocks (as I mentioned above). Did you try that?

Huecuva wrote:I attempted to set up a wpa_supplicant

How? What did you do, exactly? And did you attempt to assign any IP addresses after creating a configuration file and associating with the access point? Your posts are far too vague, please include more detail.

Huecuva wrote:ConnMan

That will ignore any devices listed in /etc/network/interfaces

Huecuva wrote:tried adding those four lines mentioned to /etc/network/interfaces

Have you confirmed that networking.service is enabled?
Code: Select all
systemctl is-enabled networking.service

Huecuva wrote:Nothing has worked

What does the systemd journal have to say about your attempts? Ask the interweb for a usage guide, I'm sick of answering questions here that are well-covered elsewhere.

And we should check if the correct drivers are loaded for your device:
Code: Select all
lspci -knn | grep -A2 Network
User avatar
Head_on_a_Stick
 
Posts: 11987
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Enabling wifi?

Postby Huecuva » 2020-03-15 21:56

I will address the rest of ^ later when I'm not also fighting with my wireless keyboard.

For now though, now that I have debian reinstalled with the realtek firmware for my WNIC, now my ethernet connection is not working and ip a indicates that it is down. I used ip link set enp2s0 up and it changes that to up but it still does not have an IP address and I cannot ping.

This is like headache inception here. Headaches within headaches within headaches.

EDIT: Wifi is also not working, but if at least the enet was working I can SSH into this thing from my desk where I'm not hunched over on my couch doing this on a tiny monitor to fix the wifi.

EDIT AGAIN: On closer examination, setting it up did not actually set the enet up. It changed what ip a says, though. Here is what it says before the command:
2: enp2s0: <BROOADCAST, MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

After I input ip link set enp2s0 up it says:
2: enp2s0: <NO-CARRIER ,BROADCAST ,MULTICAST, UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000


EDIT #3: I checked /etc/network/interfaces and there was nothing in there but loopback, so I added:
Code: Select all
auto enp2s0
allow-hotplug enp2s0
iface enp2s0 inet dhcp

and now my ethernet is working.

Now to get the wifi working. Fun. The fact that that was so easy makes me think that the wifi should be similarly as easy to get working, now that it has the firmware that was missing before. I hope that is the case.
Huecuva
 
Posts: 116
Joined: 2017-06-09 04:00

Re: Enabling wifi?

Postby Huecuva » 2020-03-15 23:43

Okay, here goes:
Head_on_a_Stick wrote:Do yourself a favour and take the time to actually *read* all of the linked guide instead of just scanning it briefly then firing off superfluous questions here.
Well, that kind of came out wrong. What I meant was, some methods of getting wifi to work seem to imply that a wpa_supplicant file is unnecessary. Other methods require it. So many people are suggesting various ways to get my wifi to work and I end up following three different ones without even knowing it and they're all working against each other. I'm trying to stick to one method at a time and I don't know which ones require the wpa_supplicant file and which don't. I just want whatever method is the simplest and requires installing the least extra software.

Head_on_a_Stick wrote:The initial section describes using wpa_passphrase(8) & wpa_supplicant(8) to create a configuration file for the purposes of testing and also to generate a hashed passphrase line for use in /etc/network/interfaces so you don't have the password saved in plain text on your machine.
I did manage to generate that hashed passphrase the last time I was attempting this, before the reinstall with the firmware. I will do that again.

Head_on_a_Stick wrote:That's pretty much what is described on the Debian wiki page to which I linked. Note that ifupdown is used by /etc/network/interfaces to initiate the connection so if that isn't installed then the file will not work at all. Also note that just bringing the interface up does not connect via wireless, the interface must also be associated with the access point (usually with wpa_supplicant) and have addresses assigned (usually with dhclient); all of these are handled by the ifupdown scripts if /etc/network/interfaces is used to control the connection.
Okay, that clarifies a few things.

Head_on_a_Stick wrote:You might need rfkill if your wireless interface is blocked. The rfkill(8) command will allow you to check that and also to remove any software blocks on the interface.
Okay. So rfkill isn't an absolutely essential component of this. I will install it if I need to, but when I installed it last time and checked to see if wifi was blocked, it was not. I will continue under that assumption until forced to do otherwise.

Head_on_a_Stick wrote:Just installing the rfkill package won't help, you need to use the rfkill(8) command to check for any blocks (as I mentioned above). Did you try that?
Yup. See above.

Head_on_a_Stick wrote:How? What did you do, exactly? And did you attempt to assign any IP addresses after creating a configuration file and associating with the access point? Your posts are far too vague, please include more detail.
I followed the instructions in that link you posted and generated the hashed passphrase. I put that in /etc/network/interfaces instead of the actual wpa key and all I got to show for it was a longer boot time where a start job for the interface just took forever to do nothing and then the wifi still didn't work. I figured I'd tried enough methods that the resulting mess was now more of a hindrance than a help and decided to fresh install.

Granted, after fixing /etc/network/interfaces for my ethernet connection this time around, I am getting a start job that is slowing down my boot time for that. That wasn't happening last time. What would cause that?

Head_on_a_Stick wrote:That will ignore any devices listed in /etc/network/interfaces
Okay. Is it easier to use than setting up wpa_supplicant and editing /etc/network/interfaces?

Head_on_a_Stick wrote:Have you confirmed that networking.service is enabled?
Code: Select all
systemctl is-enabled networking.service
No. I never tried that.

Head_on_a_Stick wrote:And we should check if the correct drivers are loaded for your device:
Code: Select all
lspci -knn | grep -A2 Network
That's a good idea. Even with that firmware now installed I will do that and see what it says.

I understand how frustrating this is for you. Trust me, it's just as frustrating for me. Until I am able to ssh into this thing from the other room where I can sit at my desk and do this properly, I'm stuck hunched over a sketchy wireless keyboard that I don't have time to investigate, posting via my HTPC while this fit-PC runs on a monitor that is in a very uncomfortable position and in both cases I'm using thumb-trackball keyboards. Trying to give verbatim output for anything more than a line or two involves connecting a USB stick, manually mounting it (which in itself was proving troublesome), redirect the output of whatever command to a file, copy that file to the USB stick and transfer it to my HTPC (another needlessly complicated process I'm not going to get into here) and then copy and paste it to here. I know none of this is your problem, but I hope it helps explain why I've been a little vague. I will try to provide more details. Since the enet is working on this device now, I should be able to do more of my work on it from my desk.

BTW: that ispci says my wifi card is Realtek Semiconductor Co. RTL8723AE. That doesn't match what I installed. Does that matter?
Huecuva
 
Posts: 116
Joined: 2017-06-09 04:00

Re: Enabling wifi?

Postby Head_on_a_Stick » 2020-03-16 19:52

Huecuva wrote:I followed the instructions in that link you posted and generated the hashed passphrase. I put that in /etc/network/interfaces instead of the actual wpa key and all I got to show for it was a longer boot time where a start job for the interface just took forever to do nothing and then the wifi still didn't work.

We really need to see the actual contents of the interfaces file, you probably made a mistake.

And rather than rebooting use this to check if the interfaces file is correctly configured:
Code: Select all
# ifup wlp5s0

See also ifup(8).

Huecuva wrote:I am getting a start job that is slowing down my boot time for that. That wasn't happening last time. What would cause that?

Use the systemd journal to investigate.

Huecuva wrote:Is it easier to use than setting up wpa_supplicant and editing /etc/network/interfaces?

No idea, I don't use ConnMan. And you don't need to set up wpa_supplicant to use ifupdown & /etc/network/interfaces, you just need wpa_passphrase(8) to generate a hashed passphrase line for the interfaces file.

Huecuva wrote:
Head_on_a_Stick wrote:Have you confirmed that networking.service is enabled?
Code: Select all
systemctl is-enabled networking.service
No. I never tried that.

Well you probably should...

Huecuva wrote:that ispci says my wifi card is Realtek Semiconductor Co. RTL8723AE. That doesn't match what I installed. Does that matter?

I don't understand what you mean by "that doesn't match what I installed" and I really need to know the kernel driver in use for that device.
User avatar
Head_on_a_Stick
 
Posts: 11987
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Enabling wifi?

Postby Huecuva » 2020-03-17 01:32

Head_on_a_Stick wrote:Use the systemd journal to investigate.

That's dmesg, right? This is all it says about my ethernet connection:
Code: Select all
[    4.271584] r8169 0000:02:00.0 eth0: RTL8168evl/8111evl, <MAC>, XID 2c900800, IRQ 27
[    4.271589] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    4.310076] r8169 0000:02:00.0 enp2s0: renamed from eth0
[   14.867542] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
[   29.362565] r8169 0000:02:00.0 enp2s0: Link is Up - 100Mbps/Full - flow control off
[   29.362591] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
[17063.413531] r8169 0000:02:00.0 enp2s0: Link is Down
[17082.238745] r8169 0000:02:00.0 enp2s0: Link is Up - 100Mbps/Full - flow control off

Head_on_a_Stick wrote:Well you probably should...

Code: Select all
root@radio:~# ifup wlp5s0
ifup: unknown interface wlp5s0
root@radio:~# systemctl is-enabled networking.service
enabled

Head_on_a_Stick wrote:I don't understand what you mean by "that doesn't match what I installed" and I really need to know the kernel driver in use for that device.

The firmware I installed was RTL8723FW_B.bin not RTL8723AE. I don't know if that matters. Here is the verbatim output from that command:
Code: Select all
05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723AE PCIe Wireless Network Adapter [10ec:8723]
        Subsystem: Realtek Semiconductor Co., Ltd. RTL8723AE PCIe Wireless Network Adapter [10ec:8723]
        Kernel driver in use: rtl8723ae
        Kernel modules: rtl8723ae

And just for continuity, here's what ip a says about my wifi:
Code: Select all
3: wlp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether <my MAC> brd ff:ff:ff:ff:ff:ff

I will try generating a hashed passphrase and adding wlp5s0 to my /etc/network/interfaces file later.
Last edited by Huecuva on 2020-03-18 04:48, edited 1 time in total.
Huecuva
 
Posts: 116
Joined: 2017-06-09 04:00

Re: Enabling wifi?

Postby Head_on_a_Stick » 2020-03-17 18:11

Huecuva wrote:
Head_on_a_Stick wrote:Use the systemd journal to investigate.

That's dmesg, right?

No.

Search the interweb for "systemd journal".

Huecuva wrote:
Code: Select all
root@radio:~# ifup wlp5s0
ifup: unknown interface wlp5s0

Did you bother to read the man page to which I linked? That command will only work if there is a stanza in /etc/network/interfaces that correctly configures the named interface.

EDIT: use this to check if your firmware is being loaded:
Code: Select all
# dmesg | grep firmware
User avatar
Head_on_a_Stick
 
Posts: 11987
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Enabling wifi?

Postby Huecuva » 2020-03-18 01:49

So I'm following that tutorial you linked me to. The how-to on wifi on the debian wiki. It actually does involve setting up a wpa_supplicant file to generate the hashed passphrase. But you said that was for testing? So I can remove it after?

Also, it occurs to me that I think most of my confusion stems from the fact that all of these tutorials, every one I find, seems to assume that iwlist scan just works and that's how you know what network you're connecting to and then you edit the etc/network/interfaces file. Well, I'm not even getting that far, man. Everyone tells me I just need to edit the /etc/network/interfaces file and it will all work, but every tutorial those same people link me to says that using this command should yield some result other than:
Code: Select all
root@radio:~# iwlist scan
lo        Interface doesn't support scanning.

enp2s0    Interface doesn't support scanning.

wlp5s0    Interface doesn't support scanning : Network is down

I've generated the hashed passphrase and put it into /etc/network/interfaces. I have not removed the /etc/wpa_supplicant/wpa_supplicant.conf file.
Code: Select all
root@radio:~# ifup wlp5s0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlp5s0/<MAC>
Sending on   LPF/wlp5s0/<MAC>
Sending on   Socket/fallback
DHCPDISCOVER on wlp5s0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlp5s0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlp5s0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlp5s0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on wlp5s0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Now when I try to use that command again, it says that wlp5s0 is already configured.
Code: Select all
root@radio:~# iwlist scan
lo        Interface doesn't support scanning.

enp2s0    Interface doesn't support scanning.

wlp5s0    Interface doesn't support scanning : Device or resource busy

After typing ip link set wlp5s0 up and getting no response, which you indicated means it worked, ip a now has this to say about my wifi:
Code: Select all
3: wlp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether <my MAC> brd ff:ff:ff:ff:ff:ff
    inet 169.254.7.146/16 brd 169.254.255.255 scope link wlp5s0:avahi
       valid_lft forever preferred_lft forever

My /etc/network/interfaces file contains the following:
Code: Select all
#auto wlp5s0
allow-hotplug wlp5s0
iface wlp5s0 inet dhcp
       wpa-ssid <my SSID>
       wpa-psk <my hash-phrase>

My /etc/wpa_supplicant/wpa_supplicant.conf file contains pretty much the same thing, formatting appropriately.

EDIT: After rebooting the machine and running ip link set wlp5s0 up again, I finally got iwlist scan to display some results. It was able to detect two of the wireless networks in range. Only two of the like eight that it should be finding, and neither of them was mine. I'm not having much luck finding any useful tutorials on how to filter this mess it spat out at me for just a list of SSIDs and maybe a more complete list?

EDIT #2: I tried rebooting again and it appears that in order for iwlist scan to find anything, I need to manually run ip link set wlp5s0 up. There has to be some way to fix that. Also, it found five networks this time, but again not mine.

EDIT #3: Just tried scanning two more times. It found four networks the first time and three the second time. This is very unreliable. My phone can detect seven networks in range. Mine is one of the strongest. The router is within ten feet of the Fit-PC. The Fit-PC is compatible with 802.11N. My router is broadcasting 802.11AC/N.

EDIT #4: After tracking down some info that the iwlist man pages didn't make obvious at all, I was able to filter the results and found no less than twelve SSIDs. However, mine is still not listed. Though there is one that is called \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00. I don't know if that's someone being clever or what. If something like dlink-138E is a valid SSID, it should have no trouble listing mine.

EDIT #5: Alright, something is seriously weird here now. I've gotten wifi to work. I was able to connect to my room mate's wifi. When I scan with iw wlp5s0 scan | egrep 'SSID|signal' it can detect 15 wireless networks in range, but not mine. The rest of my wifi devices can see it just fine. Even an old phone I have that I haven't connected to wifi since before I changed the name of that SSD a few weeks ago detected it.

EDIT #6: So it appears that, for some reason, the problem is the fact that my main wifi network is 802.11AC/N. I have a secondary hidden wifi network that is G/N and I made it visible to see if this fit-PC can detect it. It can. This thing is supposed to be 802.11N compatible. This is annoying.
Huecuva
 
Posts: 116
Joined: 2017-06-09 04:00

Re: Enabling wifi?

Postby Head_on_a_Stick » 2020-03-18 19:01

Huecuva wrote:So I'm following that tutorial you linked me to. The how-to on wifi on the debian wiki. It actually does involve setting up a wpa_supplicant file to generate the hashed passphrase. But you said that was for testing? So I can remove it after?

Yes, that's right.

Huecuva wrote:So it appears that, for some reason, the problem is the fact that my main wifi network is 802.11AC/N. I have a secondary hidden wifi network that is G/N and I made it visible to see if this fit-PC can detect it. It can. This thing is supposed to be 802.11N compatible. This is annoying.

Okay, so is this thread [SOLVED] then? Can you connect to the G/N network with the fit-PC & ifupdown?
User avatar
Head_on_a_Stick
 
Posts: 11987
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Enabling wifi?

Postby Huecuva » 2020-03-18 23:46

Now that my question about removing the wpa_supplicant.conf file is answered, yes. I will mark this as SOLVED.

Thanks for the help, mate.
Huecuva
 
Posts: 116
Joined: 2017-06-09 04:00


Return to System configuration

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable