Tidak seperti di OS windows yang di manjakan oleh vendor dengan segudang pilihan driver untuk perangkat keras, di dunia opensource khususnya linux kemudahan itu masihlah sangat terbatas.
Sebagai contoh untuk driver wireless saja saya harus berkutat dengan baris-baris kode di terminal yang bahkan tidak membuahkan hasil sesuai dengan yang saya harapkan.
Semuanya berawal dari keinginan saya bisa berselancar di dunia maya menggunakan wifi di laptop, Laptop ini bukanlah seri yang terbaru dan hanya masuk ke dalam kelas menengah ke bawah sesuai dengan budget yang tersedia :D.
Saya menginstall linux mint 19.1 cinnamon yang merupakan versi stable terbaru untuk saat ini dengan asumsi versi terbaru = kernel terbaru yang memungkinkan sudah tersedia banyak driver perangkat keras yang di support kedalam kernel tree.
Manusia boleh berencana tapi takdir berkata lain internal wifi tidak terdeteksi oleh kernel alhasil tidak muncul itu yang namanya wireless device di icon network-manager di kanan bawah daripada desktop linux mint ini. sedikit kecewa tapi masih mencoba untuk bangkit he..he…
PERANGKAT LUNAK
# cat /etc/os-release NAME="Linux Mint" VERSION="19.1 (Tessa)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 19.1" VERSION_ID="19.1" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.ubuntu.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=tessa UBUNTU_CODENAME=bionic
# uname -a Linux aghe-Lenovo 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
PERANGKAT KERAS
# lshw -C network sudo lshw -C network *-network UNCLAIMED description: Network controller product: BCM43162 802.11ac Wireless Network Adapter vendor: Broadcom Inc. and subsidiaries physical id: 0 bus info: [email protected]:02:00.0 version: 02 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list configuration: latency=0 resources: memory:c2400000-c2407fff memory:c2000000-c23fffff *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: [email protected]:03:00.0 logical name: enp3s0 version: 15 serial: 54:ee:75:78:ae:21 size: 10Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII speed=10Mbit/s resources: irq:125 ioport:3000(size=256) memory:c2504000-c2504fff memory:c2500000-c2503fff # lspci -nn ........................................ 02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43162 802.11ac Wireless Network Adapter [14e4:43ae] (rev 02) .................................................
Seperti yamg terlihat PCI-ID untuk wireles Broadcom BCM43162 adalah 14e4:43ae yang setelah di cek di https://wireless.wiki.kernel.org/en belum disupport oleh kernel linux dan diwebsite resmi vendor broadcom pun driver untuk linux belum disertakan kedalam driver closed-source mereka
https://www.broadcom.com/support/download-search/?pg=&pf=Wireless+Embedded+Solutions+and+RF+Components&pn=&pa=&po=&dk=
Linux® STA 64-bit driver
These packages contain Broadcom’s IEEE 802.11a/b/g/n hybrid Linux.. device driver for use with Broadcom’s BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-, BCM43227- and BCM43228-based hardware. There are different tars for 32-bit and 64-bit x86 CPU architectures. Make sure that you download the appropriate tar because the hybrid binary file must be of the appropriate architecture type. The hybrid binary file is agnostic to the specific version of the Linux. kernel because it is designed to perform all interactions with the operating system through operating-system-specific files and an operating system abstraction layer file. All Linux. operating-system-specific code is provided in source form, making it possible to retarget to different kernel versions and fix operating system related issues. NOTE: You must read the LICENSE.TXT file in the lib directory before using this software. Support questions for the latest version of these drivers may be directed to [email protected]
Pupus sudah harapan untuk bisa menggunakan internal wifi hardware laptop saya.
Kebetulan saya memiliki USB wireless dongle pemberian dari rekan saya yang menurut dia sudah tidak terpakai lagi, spesifikasi dongle ini merk TP-LINK dengan type TL-WN727N berdasarkan data dari wireless.wiki.kernel.org sudah include didalam kernel tree seharus sudah bisa berfungsi out-of-the-box tanpa perlu menginstall driver external lagi.
Langsung saja saya colokan kedalam port usb untuk memastikan apakah bisa berfungsi dengan baik berikut hasilnya:
# dmesg |grep 7601 [ 2815.692455] usb 1-3: New USB device found, idVendor=148f, idProduct=7601 [ 2815.698745] Modules linked in: mt7601u mac80211(OE) cfg80211(OE) compat(OE) rfcomm bnep snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic rndis_host cdc_ether snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc snd_soc_acpi snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine 8250_dw snd_hda_intel snd_hda_codec intel_rapl snd_hda_core x86_pkg_temp_thermal intel_powerclamp snd_hwdep coretemp usbnet kvm snd_pcm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc snd_seq_midi snd_seq_midi_event snd_rawmidi btusb uvcvideo videobuf2_vmalloc btrtl btbcm btintel aesni_intel videobuf2_memops bluetooth aes_x86_64 crypto_simd glue_helper cryptd videobuf2_v4l2 videobuf2_core intel_cstate videodev intel_rapl_perf ecdh_generic media snd_seq joydev input_leds [ 2815.698859] mt7601u_alloc_device+0x24/0x140 [mt7601u] [ 2815.698862] mt7601u_probe+0x25/0x270 [mt7601u] [ 2815.699005] mt7601u: probe of 1-3:1.0 failed with error -12
Walaupun module kernel mt7601u sudah aktif akan perangkat ini belum bisa diaktifkan dan ketika menjalankan perintah iwlist scan
lo Interface doesn’t support scanning.
enp3s0 Interface doesn’t support scanning.
Mencoba dengan dengan mendownload drivernya langsung dari vendor mediatek httpx://d86o2zu8ugzlg.cloudfront.net/mediatek-craft/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
Dan melakukan kompilasi source code akan tetapi muncul error seperti dibawah ini.
# make ......................................................... CC [M] /home/aghe/Downloads/mt7601usta/src/os/linux/../../os/linux/sta_ioctl.o CC [M] /home/aghe/Downloads/mt7601usta/src/os/linux/../../os/linux/rt_linux.o /home/aghe/Downloads/mt7601usta/src/os/linux/../../os/linux/rt_linux.c: In function ‘__RTMP_OS_Init_Timer’: /home/aghe/Downloads/mt7601usta/src/os/linux/../../os/linux/rt_linux.c:120:3: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration] init_timer(pTimer); ^~~~~~~~~~ init_timers /home/aghe/Downloads/mt7601usta/src/os/linux/../../os/linux/rt_linux.c:121:9: error: ‘OS_NDIS_MINIPORT_TIMER {aka struct timer_list}’ has no member named ‘data’ pTimer->data = (unsigned long)data; ^~ /home/aghe/Downloads/mt7601usta/src/os/linux/../../os/linux/rt_linux.c:122:20: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] pTimer->function = function; ^ cc1: some warnings being treated as errors scripts/Makefile.build:332: recipe for target '/home/aghe/Downloads/mt7601usta/src/os/linux/../../os/linux/rt_linux.o' failed make[2]: *** [/home/aghe/Downloads/mt7601usta/src/os/linux/../../os/linux/rt_linux.o] Error 1 Makefile:1552: recipe for target '_module_/home/aghe/Downloads/mt7601usta/src/os/linux' failed make[1]: *** [_module_/home/aghe/Downloads/mt7601usta/src/os/linux] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic' Makefile:418: recipe for target 'LINUX' failed make: *** [LINUX] Error 2
Melakukan analisa lebih jauh mengenai error diatas merujuk kepada kernel api init_timer() httpx://kernel.googlesource.com/pub/scm/linux/kernel/git/kees/linux/+/for-linus-timers-conversion-final-v4.15-rc1 .
yang ternyata sudah deprecated di kernel 4.15 ke atas, sedangkan source driver ini masih menggunakan kernel api yang lama.
Solusi mudah nya adalah dengan mendowngrade kernel linux mint 19.1 ke versi di bawah 4.15.
Di synaptic package manager hanya tersedia versi kernel 4.15 dan kernel 4.18 sehingga tidak memungkinkan untuk downgrade melalui aplikasi ini.
Saya akan melakukan downgrade dengan cara manual yaitu dengan mengunduh 3 buah .deb file terlebih dahulu.
$ cd /tmp/
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-headers-4.14.0-041400_4.14.0-041400.201711122031_all.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-headers-4.14.0-041400-generic_4.14.0-041400.201711122031_amd64.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-image-4.14.0-041400-generic_4.14.0-041400.201711122031_amd64.deb
$ sudo dpkg -i *.deb
$ sudo reboot
Laptop akan restart dan pastikan kita memilih kernel 4.14 yang baru saja di install.
Kernel downgraded to 4.14
Periksa apakah kernel module mt7601.ko sudah aktif.
Kornel module aktif
Colokan kembali wireless dongle ke port usb laptop dan lihat hasilnya melalui kernel log
# dmesg 60.994514] usb 1-3: new high-speed USB device number 6 using xhci_hcd [ 61.153176] usb 1-3: New USB device found, idVendor=148f, idProduct=7601 [ 61.153184] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 61.153188] usb 1-3: Product: 802.11 n WLAN [ 61.153193] usb 1-3: Manufacturer: MediaTek [ 61.153196] usb 1-3: SerialNumber: 1.0 [ 61.635376] usb 1-3: reset high-speed USB device number 6 using xhci_hcd [ 61.784750] mt7601u 1-3:1.0: ASIC revision: 76010001 MAC revision: 76010500 [ 61.799316] mt7601u 1-3:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____ [ 62.202799] mt7601u 1-3:1.0: Warning: unsupported EEPROM version 0d [ 62.202806] mt7601u 1-3:1.0: EEPROM ver:0d fae:00 [ 62.203064] mt7601u 1-3:1.0: EEPROM country region 01 (channels 1-13) [ 62.514469] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht' [ 62.515544] usbcore: registered new interface driver mt7601u [ 62.538291] mt7601u 1-3:1.0 wlx30b5c21b595b: renamed from wlan0
# ifconfig enp3s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 54:ee:75:78:ae:21 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 6267 bytes 552765 (552.7 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 6267 bytes 552765 (552.7 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlx30b5c21b595b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.43.96 netmask 255.255.255.0 broadcast 192.168.43.255 inet6 fe80::e53a:4aec:99dc:d4da prefixlen 64 scopeid 0x20<link> ether 30:b5:c2:1b:59:5b txqueuelen 1000 (Ethernet) RX packets 25313 bytes 16294083 (16.2 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 26578 bytes 4838215 (4.8 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
connection using wifi
Wow interface wifi sudah terbentuk dengan nama wlx30b5c21b595b tanpa perlu bersusah payah lagi.
makasih gan ilmunya
Siap gan (y)
untuk versi linuxmint 20. keatas apakah sama?
Silahkan coba di downgrade kernel dulu setelah bisa booting dan wifi device terdeteksi, hapus kernel bawaan mint 20.
booting lagi.
Setelah itu install kernel terbaru dan boot dengan kernel terbaru harusnya sudah terdeteksi ini yg saya lakukan di mint 20 saya