How to bring up Wireless through command line in Ubuntu?


#1

Hi guys,

I’m porting a simple base Ubuntu on HiKey960.
It has no desktop GUI yet. Thus I’m trying to bring up the Wireless through command lines in Ubuntu.

I create the folder lib/firmware/ti-connectivity to contain Wireless firmware binaries TIInit_11.8.32.bts, wl18xx-conf.bin and wl8xx-fw-4.bin. i can see wlan0 in the ifconfig -a list. But iwlist/iwconfig always tell me wlan0 is “no wireless extension”.

I see lots of repos related to Wireless on HiKey960 Github page. But I don’t know which is necessary and how to use them.

Could you please show me a sequence or a reference about how to bring up Wireless through command line in Ubuntu?

Thank you.

Best regards


#2

Is usb port working?

unfortunately, for the wireless, i had the same thing

there is a wlan0 for typing: ifconfig -a
"no wireless extension" for typing: iwconfig

If anyone have the solution please share. thank you.


#3

Hi Robert,

I find this link http://processors.wiki.ti.com/index.php/WL12xx_NLCP_Calibration_Process . It shows that another firmware wl1271-nvs.bin should be generated from Tllinit_11.8.32bits. I can have a try tomorrow.

By the way, may I know why you ask about USB port?
It is weird that my HiKey960 USB Type-A ports will be broken if I configure Wireless for a long time. If I power off the HiKey960 and wait until it cool down, the USB port can work again.
I’d like to know if you have ever met a similar issue.

Thank you.


#4

iwconfig don’t work in my case
I don’t know why :frowning:

but this work just fine
https://fedoraproject.org/wiki/Networking/CLI


#5

Hi xlazom00,

Thanks. But it seems that Ubuntu doesn’t have nmcli.


#6

Some updates.
I finally created wl1271-nvs.bin and put it into /lib/firmware/ti-connectivity/. However wl19xx_driver still doesn’t accept it.

[   12.488547] wl18xx_driver wl18xx.1.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[   12.488713] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[   12.499170] rtc-pl031 fff04000.rtc: setting system clock to 1970-01-01 01:29:00 UTC (5340)
[   12.514323] wl18xx_driver wl18xx.1.auto: Falling back to user helper

I got this dump in dmesg:

[   72.748570] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[   72.754633] wlcore: loaded
[   84.093215] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[   84.141158] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
[   84.471972] wlcore: PHY firmware version: Rev 8.2.0.0.237
[   84.569117] wlcore: firmware booted (Rev 8.9.0.0.70)
[   84.581215] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

wlan0 is showd if ifconfig -a

 wlan0     Link encap:Ethernet  HWaddr 38:d2:69:d0:b4:79  
      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)

However, it still failed when I used iwconfig or iwlist. “No wireless extensions.”


#7

Thank you Sir, I confirmed that the wifi is working


#8

Hi tbacarrot,

the wifi is working now:

root@hikey960:~# nmcli device status
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected TPLINK 1
docker0 bridge unmanaged –
lo loopback unmanaged –
sit0 sit unmanaged –
root@hikey960:~# nmcli radio wifi
enabled
root@hikey960:~# ifconfig -a
docker0 Link encap:Ethernet HWaddr 02:42:8D:70:1C:F5
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%4817440/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1208 errors:0 dropped:0 overruns:0 frame:0
TX packets:1208 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:77234 (75.4 KiB) TX bytes:77234 (75.4 KiB)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 38:D2:69:EF:27:ED
inet addr:192.168.2.103 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::3ad2:69ff:feef:27ed%4817440/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:33 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4436 (4.3 KiB) TX bytes:10956 (10.6 KiB)

root@hikey960:~# ping google.com
PING google.com (172.217.27.142): 56 data bytes
64 bytes from 172.217.27.142: seq=0 ttl=42 time=234.865 ms
64 bytes from 172.217.27.142: seq=1 ttl=42 time=248.496 ms
64 bytes from 172.217.27.142: seq=2 ttl=42 time=227.240 ms
64 bytes from 172.217.27.142: seq=3 ttl=42 time=229.095 ms

however, I’m not using ubuntu right now.


#9

take a look, I don’t know if it is useful for u or not

root@hikey960:~# cd /lib
root@hikey960:/lib# ls
firmware ld-linux-aarch64.so.1 modules systemd udev
root@hikey960:/lib# cd firmware/
root@hikey960:/lib/firmware# ls
LICENCE.ti-connectivity wl127x-fw-4-sr.bin wl128x-fw-5-sr.bin
TIInit_7.2.31.bts wl127x-fw-5-mr.bin wl128x-fw-ap.bin
ti-connectivity wl127x-fw-5-plt.bin wl128x-fw-plt-3.bin
wl1251-fw.bin wl127x-fw-5-sr.bin wl128x-fw.bin
wl1251-nvs.bin wl127x-fw-plt-3.bin wl128x-nvs.bin
wl1271-fw-2.bin wl127x-nvs.bin wl12xx-nvs.bin
wl1271-fw-ap.bin wl128x-fw-3.bin wl18xx-fw-2.bin
wl1271-fw.bin wl128x-fw-4-mr.bin wl18xx-fw-3.bin
wl1271-nvs.bin wl128x-fw-4-plt.bin wl18xx-fw-4.bin
wl127x-fw-3.bin wl128x-fw-4-sr.bin wl18xx-fw.bin
wl127x-fw-4-mr.bin wl128x-fw-5-mr.bin
wl127x-fw-4-plt.bin wl128x-fw-5-plt.bin
root@hikey960:/lib/firmware# cd ti-connectivity/
root@hikey960:/lib/firmware/ti-connectivity# ls
TIInit_7.2.31.bts wl127x-fw-5-mr.bin wl128x-fw-5-sr.bin
wl1251-fw.bin wl127x-fw-5-plt.bin wl128x-fw-ap.bin
wl1251-nvs.bin wl127x-fw-5-sr.bin wl128x-fw-plt-3.bin
wl1271-fw-2.bin wl127x-fw-plt-3.bin wl128x-fw.bin
wl1271-fw-ap.bin wl127x-nvs.bin wl128x-nvs.bin
wl1271-fw.bin wl128x-fw-3.bin wl12xx-nvs.bin
wl1271-nvs.bin wl128x-fw-4-mr.bin wl18xx-fw-2.bin
wl127x-fw-3.bin wl128x-fw-4-plt.bin wl18xx-fw-3.bin
wl127x-fw-4-mr.bin wl128x-fw-4-sr.bin wl18xx-fw-4.bin
wl127x-fw-4-plt.bin wl128x-fw-5-mr.bin wl18xx-fw.bin
wl127x-fw-4-sr.bin wl128x-fw-5-plt.bin
root@hikey960:/lib/firmware/ti-connectivity#


#10

Hi xlazom00

Sorry. I searched for the wrong keyword. My bad.
Thanks a lot for the information.


#11

Hi Robert,

Congratulations!
I have two questions. Could you please help?

  1. May I know where you get all these firmware?
  2. Besides the firmware and nmcli, anything else to bring up wireless? Any hack to Kernel?

Thanks a lot


#12

for example I use debian rootfs from dragonboard

http://builds.96boards.org/releases/dragonboard410c/linaro/debian/latest/linaro-stretch-developer-qcom-snapdragon-arm64-20170802-260.img.gz
gunzip linaro-*.img

sudo fastboot flash system linaro-*.img

Just remove all qualcomm related stuff from modules or packages and basic stuff just work fine


#13

Hi Robert, xlazom00

With nmcli, the Wireless works.
Thanks a lot for your help!