Unable to activate wifi on Linux
#1
Hello everyone
I installed Ubuntu distribution from Pine64 site.
Everything worked fine until I tried to get wifi running: I'm unable to activate it
  • ifconfig only displays eth0 and lo
  • lsmod shows that cfg80211 is there
In addition dmesg returns a strange message about power:

Code:
dmesg |grep wlan
[    8.267425] sunxi-wlan wlan.26: wlan_busnum (1)
[    8.272474] sunxi-wlan wlan.26: Missing wlan_power.
[    8.277918] sunxi-wlan wlan.26: wlan_power_name ((null))
[    8.283839] sunxi-wlan wlan.26: io_regulator_name (vcc-wifi-io)
[    8.290464] sunxi-wlan wlan.26: wlan_regon gpio=354  mul-sel=1  pull=-1  drv_level=-1  data=0
[    8.300002] sunxi-wlan wlan.26: wlan_hostwake gpio=355  mul-sel=6  pull=-1  drv_level=-1  data=0
[    8.309821] sunxi-wlan wlan.26: clk not config
[   13.706002] sunxi-wlan wlan.26: bus_index: 1
[   13.716752] sunxi-wlan wlan.26: check wlan io_regulator voltage: 1800000
[   14.103278] RTL871X: rtw_ndev_init(wlan0)
[   14.104519] RTL871X: rtw_ndev_init(wlan1)

Any idea of what I could check (or where I went wrong)?

Best Regards
  Reply
#2
I don't have my pine64 running atm, so I can't check on that wifi message, which may or may not be normal.

On the premise that it's not normal, I would check if the module is plugged in the right way around... it isn't symetrial... the row of pins on one side is longer than the other, so there is a 'right way around' and 'wrong way around'.

Other than that, it may be worth running the uboot and kernel update scripts to make sure everything is up to date there. As a root user (eg. sudo -i) run the following commands to grab and run the lastest version of longsleeps update scripts:

Code:
bash <(curl -s https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_uboot.sh)
bash <(curl -s https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_kernel.sh)

Have you enabled wlan0 in /etc/network/interfaces, and configured it yet?
  Reply
#3
Well in fact it works ...
Simply iwconfig tool is not installed by default in Ubuntu longsleep image

Here is the way to activate wifi:


sudo apt-get install wireless-tools
iwconfig
sudo ifup wlan0
sudo iwconfig wlan0 essid "Use this one Mom"
# wpa_passphrase essid pwd > /etc/wpa_supplicant.conf
sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf
sudo dhclient wlan0

Hope it may help others
  Reply
#4
Glad it's all working now!

I never bother with iwconfig unless there is something wrong that needs diagnosing... I just make sure the /etc/network/interfaces has something like this in it...

Code:
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

and in /etc/wpa_supplicant/wpa_supplicant.conf I have (at a minimum)

Code:
network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_NETWORK_PASSWORD"
}

and wireless comes up on reboot or with 'sudo ifup wlan0' ... but there's more than one way to skin a cat. Thanks for posting the steps for other people. More ways you know how to do it the better... then you can pick which way you prefer!

Pete

(08-31-2016, 01:48 PM)smouton Wrote: Well in fact it works ...
Simply iwconfig tool is not installed by default in Ubuntu longsleep image

Here is the way to activate wifi:


sudo apt-get install wireless-tools
iwconfig
sudo ifup wlan0
sudo iwconfig wlan0 essid "Use this one Mom"
# wpa_passphrase essid pwd > /etc/wpa_supplicant.conf
sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf
sudo dhclient wlan0

Hope it may help others
  Reply
#5
(08-31-2016, 01:48 PM)smouton Wrote: Well in fact it works ...
Simply iwconfig tool is not installed by default in Ubuntu longsleep image

Here is the way to activate wifi:


sudo apt-get install wireless-tools
iwconfig
sudo ifup wlan0
sudo iwconfig wlan0 essid "Use this one Mom"
# wpa_passphrase essid pwd > /etc/wpa_supplicant.conf
sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf
sudo dhclient wlan0

Hope it may help others

I would like to try that!
Could you please confirm that the only 2 parameters are:
1. "Use this one Mom" for the essid name,
2. 'pwd' in the 5th line for the wpa password

Blush
  Reply
#6
These are the commands you'll find useful with manual wifi config :

ip  link  set  wlan0  up


ip  link  show  wlan0


iw  dev  wlan0  scan  |  less


iw  dev  wlan0  link


wpa_supplicant  -D  nl80211  -i  wlan0  -c  <(wpa_passphrase  "the ssid"  "the passphrase"  )  &


dhcpcd  wlan0


(hope you find these useful)
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#7
I'm running auyufan latest stable with updated kernal. on a Rev B board
  • Like the OP
  • lsmod shows that cfg80211 is there
but ifconfig show two wlan,  wlan0 and wlan1

wlan0     Link encap:Ethernet  HWaddr 34:c3:d2:e4:38:ce  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1     Link encap:Ethernet  HWaddr 36:c3:d2:e4:38:ce  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Showing two (with different MAC addresses) is pretty weird considering there is only one adaptor in the module.
BTW I disconnected the module to confirm the two only appear together when the module is connected.
This weirdness seems related to my woes.

Also the BT part of the module is working fine.

So whichever of the the two is the "real" adapter neither of these can I get working (with Network Manager).

I do get the same "missing power" for both.

Ifup doesn't give any error and Network Manager is set to "managed=true" but still the wlan(s) is greyed in NM.

So I tried doing things manually


ip  link  set  wlan0  up
returns no error


ip  link  show  wlan0

wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group
default qlen 1000

    link/ether 34:c3:d2:e4:38:ce brd ff:ff:ff:ff:ff:ff

wpa_supplicant  -D  nl80211  -i  wlan0  -c  <(wpa_passphrase  ""  ""  )  & dhcpcd  wlan0

Successfully initialized wpa_supplicant

nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface


-----------------
more suggestions please.  I've tried all on this thread and also those related to gettting  WIFI on network manager working.
http://thesave.altervista.org/2014/02/ne...-it-right/
  Reply
#8
i think the MAC addresses are generated by the system and as such neither is the actual board. but are you concerned about wifi not showing or 2 ethernet ?
  Reply
#9
Photo 
So turns out the module does have two adapters.  The default solution was to disable one (wlan1)which was done in the interfaces.d folder
But this via the old (pre systemd) networking service which one disables when using NetworkManger or systemd-networkd.  So when I did that I saw the second one wlan1.

So I did disable wlan1 (unmanage it) in network manager but I still can't get wlan0 (via network manager) to look for available networks so I can connect.


Code:
pine64@pine64:~$ nmcli dev
DEVICE  TYPE      STATE         CONNECTION
eth0    ethernet  connected     eth0       
wlan0   wifi      disconnected  --         
dummy0  dummy     unmanaged     --         
sit0    iptunnel  unmanaged     --         
lo      loopback  unmanaged     --         
wlan1   wifi      unmanaged     --         
pine64@pine64:~$




So either my wifi module is bad or I am missing some settings in network manager.

using 'ip'  I get this


Code:
pine64@pine64:~$ sudo ip link set wlan0 up
pine64@pine64:~$ ip link show wlan0
5: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 34:c3:d2:e4:38:ce brd ff:ff:ff:ff:ff:fflink


the NM applet shows  for wlan0 just "disconnected" instead of available networks

Anyone been down the wifi module, ayufan latest stable, network manager rabbit hole and know what I am missing here.
I'm going with a bad radio (sadly) at this point as adaptor itself seems ok and "up"
---------------------
btw now I don't see wlan1 since it's unmanaged (down)



Code:
eth0      Link encap:Ethernet  HWaddr 3e:b6:98:a9:76:df  
          inet addr:192.168.0.53  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::3cb6:98ff:fea9:76df/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16703 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19939 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1842689 (1.8 MB)  TX bytes:6552931 (6.5 MB)
          Interrupt:114

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1139 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1139 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:84230 (84.2 KB)  TX bytes:84230 (84.2 KB)

wlan0     Link encap:Ethernet  HWaddr 34:c3:d2:e4:38:ce  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:
  Reply
#10
Well, it's not a hardware/radio issue as I burned an android version and booted that and I can connect via wifi no issue.

So that brings it down to ayufan's image/kernal and/or the settings for network manger/linux as creating my issue.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Better WiFi/BT module? moriel5 3 5,800 05-18-2022, 01:55 PM
Last Post: moriel5
  WIFI/BT Power Supply / VBAT-EXT xalius 3 5,325 08-12-2021, 06:41 AM
Last Post: Luke490
  Better WiFi/BT module? fonix232 20 27,928 08-11-2021, 09:27 AM
Last Post: Jean-Marc LACROIX
  Wifi / Bluetooth Board Update S265 2 4,602 07-30-2020, 04:53 PM
Last Post: S265
  Create a WiFi hotspot on Debian 8 JulianM 6 28,286 03-10-2019, 01:02 AM
Last Post: waqasnasir
  Schematics of Wifi/BT module gamelaster 7 10,843 09-11-2018, 02:02 PM
Last Post: gamelaster
  Installing another WiFi module on one of the buses mido2018 1 3,953 07-22-2018, 07:15 AM
Last Post: tllim
  Pine64 doesn't recognize Wifi/BT Module clobeca 3 6,681 07-13-2017, 08:58 PM
Last Post: MarkHaysHarris777
Sad wifi direct bj_jung 2 5,888 12-29-2016, 10:26 AM
Last Post: happytuna
  Enabling wifi c4tich 10 18,953 12-28-2016, 02:22 PM
Last Post: workaccountbro

Forum Jump:


Users browsing this thread: 1 Guest(s)