How to install TP-Link TL-WN722N USB Wireless Adapter

Discussion in 'Debian' started by rlagonda, Oct 3, 2014.

  1. rlagonda

    rlagonda New Member

    Joined:
    Oct 3, 2014
    Messages:
    3
    Likes Received:
    0
    Hi,

    I have some problems on installing TP Link USB Dongle on my udoo. I also asked similar question here:
    http://superuser.com/questions/8200...n-usb-wireless-adapter-on-debian-wheezy-armhf

    more information:
    Code:
    root@udoo-debian-hfp:~# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
    Bus 002 Device 096: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
    Bus 002 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
    Code:
    root@udoo-debian-hfp:~# dmesg
    [    0.949320] imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
    [    0.969314] imx-ipuv3 imx-ipuv3.1: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
    [    0.977147] mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 driver probed
    [    0.983625] mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 dphy version is 0x3130302a
    [    0.991357] MIPI CSI2 driver module loaded
    [    0.995703] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [    1.002932] Bluetooth: Core ver 2.16
    [    1.006639] NET: Registered protocol family 31
    [    1.011110] Bluetooth: HCI device and connection manager initialized
    [    1.017485] Bluetooth: HCI socket layer initialized
    [    1.022385] Bluetooth: L2CAP socket layer initialized
    [    1.027540] Bluetooth: SCO socket layer initialized
    [    1.032886] cfg80211: Calling CRDA to update world regulatory domain
    [    1.040357] i2c-core: driver [max17135] using legacy suspend method
    [    1.046645] i2c-core: driver [max17135] using legacy resume method
    [    1.052874] Switching to clocksource mxc_timer1
    [    1.072878] NET: Registered protocol family 2
    [    1.077426] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    1.085354] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
    [    1.094697] TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
    [    1.102437] TCP: Hash tables configured (established 131072 bind 65536)
    [    1.109087] TCP reno registered
    [    1.112247] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    1.118232] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    1.124950] NET: Registered protocol family 1
    [    1.129650] RPC: Registered named UNIX socket transport module.
    [    1.135591] RPC: Registered udp transport module.
    [    1.140332] RPC: Registered tcp transport module.
    [    1.145052] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    1.151530] PCI: CLS 0 bytes, default 32
    [    1.152417] PMU: registered new PMU device of type 0
    [    1.157543] Static Power Management for Freescale i.MX6
    [    1.162788] wait mode is enabled for i.MX6
    [    1.167081] cpaddr = c0880000 suspend_iram_base=c08fc000
    [    1.172518] PM driver module loaded
    [    1.176412] IMX usb wakeup probe
    [    1.179777] the wakeup pdata is 0xbfed3000
    [    1.180163] add wake up source irq 75
    [    1.187476] IMX usb wakeup probe
    [    1.190791] the wakeup pdata is 0xbfda9580
    [    1.191002] cpu regulator mode:ldo_enable
    [    1.195223] i.MXC CPU frequency driver
    [    1.225574] JFFS2 version 2.2. (NAND) \xffffffc2\xffffffa9\xffffffa9 2001-2006 Red Hat, Inc.
    [    1.232468] fuse init (API version 7.16)
    [    1.237304] msgmni has been set to 1749
    [    1.242748] alg: No test for stdrng (krng)
    [    1.247012] io scheduler noop registered
    [    1.250969] io scheduler deadline registered
    [    1.255345] io scheduler cfq registered (default)
    [    1.261179] MIPI DSI driver module loaded
    [    1.265380] mxc_sdc_fb mxc_sdc_fb.0: register mxc display driver hdmi
    [    1.271893] mxc_hdmi mxc_hdmi: Detected HDMI controller 0x13:0xa:0xa0:0xc1
    [    1.278817] fbcvt: 1920x1080@60: CVT Name - 2.073M9
    [    1.283719] fb_videomode = 59 1920 1080 5780 328 128 3 32 200 5 2 0 32
    [    1.302377] imx-ipuv3 imx-ipuv3.0: WARNING: adapt panel end blank lines
    [    1.317520] imx-ipuv3 imx-ipuv3.0: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
    [    1.350830] imx-ipuv3 imx-ipuv3.0: WARNING: adapt panel end blank lines
    [    1.384212] Console: switching to colour frame buffer device 160x64
    [    1.432321] mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver ldb
    [    1.438739] _regulator_get: get() with no identifier
    [    1.450405] mxc_sdc_fb mxc_sdc_fb.2: register mxc display driver ldb
    [    1.461584] imx-sdma imx-sdma: loaded firmware 1.1
    [    1.470692] imx-sdma imx-sdma: initialized
    [    1.605377] Serial: IMX driver
    [    1.608593] imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX
    [    1.615487] imx-uart.1: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX
    [    1.621987] console [ttymxc1] enabled, bootconsole disabled
    [    1.633538] imx-uart.3: ttymxc3 at MMIO 0x21f0000 (irq = 61) is a IMX
    [    1.645699] loop: module loaded
    [    1.649242] request BOSSA_CLK IRQ
    [    1.652560] registering IRQ 419 for BOSSAC Arduino erase/reset operation
    [    1.702413] No sata disk.
    [    1.706429] GPMI NAND driver registered. (IMX)
    [    1.711972] vcan: Virtual CAN interface driver
    [    1.716423] CAN device driver interface
    [    1.720278] flexcan netdevice driver
    [    1.724016] FEC Ethernet Driver
    [    1.729478] fec_enet_mii_bus: probed
    [    1.738442] usbcore: registered new interface driver rt2800usb
    [    1.744279] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    1.750944] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
    [    1.757591] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
    [    1.787495] fsl-ehci fsl-ehci.0: irq 75, io base 0x02184000
    [    1.807473] fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
    [    1.813796] hub 1-0:1.0: USB hub found
    [    1.817577] hub 1-0:1.0: 1 port detected
    [    1.821690] add wake up source irq 72
    [    1.825389] fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
    [    1.832044] fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
    [    1.877470] fsl-ehci fsl-ehci.1: irq 72, io base 0x02184200
    [    1.907460] fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
    [    1.913656] hub 2-0:1.0: USB hub found
    [    1.917420] hub 2-0:1.0: 1 port detected
    [    1.921697] Initializing USB Mass Storage driver...
    [    1.926732] usbcore: registered new interface driver usb-storage
    [    1.932802] USB Mass Storage support registered.
    [    1.937727] usbcore: registered new interface driver usbserial
    [    1.943663] USB Serial support registered for generic
    [    1.948851] usbcore: registered new interface driver usbserial_generic
    [    1.955381] usbserial: USB Serial Driver core
    [    1.959859] USB Serial support registered for debug
    [    1.964860] usbcore: registered new interface driver debug
    [    1.970365] ARC USBOTG Device Controller driver (1 August 2005)
    [    1.976648] g_ether gadget: using random self ethernet address
    [    1.982511] g_ether gadget: using random host ethernet address
    [    1.989102] usb0: MAC 3a:26:d9:ed:27:19
    [    1.992941] usb0: HOST MAC 76:d5:f7:ef:5a:46
    [    1.997217] g_ether gadget: controller 'fsl-usb2-udc' not recognized; trying CDC Ethernet (ECM)
    [    2.005957] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    [    2.012592] g_ether gadget: g_ether ready
    [    2.016604] Suspend udc for OTG auto detect
    [    2.020808] USB Host suspend begins
    [    2.020814] will suspend roothub and its children
    [    2.020835] ehci_fsl_bus_suspend begins, DR
    [    2.020857] ehci_fsl_bus_suspend ends, DR
    [    2.020871] host suspend ends
    [    2.020877] USB Gadget resume begins
    [    2.020883] fsl_udc_resume, Wait for wakeup thread finishes
    [    2.037475] dr_controller_run: udc out low power mode
    [    2.037484] USB Gadget resume ends
    [    2.037490] fsl-usb2-udc: bind to driver g_ether
    [    2.042767] mousedev: PS/2 mouse device common for all mice
    [    2.048783] usbcore: registered new interface driver usbtouchscreen
    [    2.055478] Sitronix touch driver 2.9.1
    [    2.059333] Release date: 20120507
    [    2.063143] sitronix_reset_ic
    [    2.186328] send status reg command error (-5)
    [    2.190797] sitronix: probe of 2-0055 failed with error -5
    [    2.196733] i2c-core: driver [isl29023] using legacy suspend method
    [    2.203018] i2c-core: driver [isl29023] using legacy resume method
    [    2.209947] snvs_rtc snvs_rtc.0: rtc core: registered snvs_rtc as rtc0
    [    2.216620] i2c /dev entries driver
    [    2.220912] Linux video capture interface: v2.00
    [    2.247493] usb 2-1: new high speed USB device number 2 using fsl-ehci
    [    2.357558] ov5640_read_reg:write reg error:reg=300a
    [    2.362526] camera ov5640_mipi is not found
    [    2.367130] mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video16
    [    2.374781] mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video17
    [    2.382461] mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video18
    [    2.390102] mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video19
    [    2.397754] mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video20
    [    2.405539] vivi-000: V4L2 device registered as video2
    [    2.410697] Video Technology Magazine Virtual Video Capture Board ver 0.8.0 successfully loaded.
    [    2.420054] usbcore: registered new interface driver uvcvideo
    [    2.425833] USB Video Class driver (v1.1.0)
    [    2.430719] hub 2-1:1.0: USB hub found
    [    2.430755] i2c-core: driver [mag3110] using legacy suspend method
    [    2.430762] i2c-core: driver [mag3110] using legacy resume method
    [    2.431222] imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)
    [    2.431331] Bluetooth: Virtual HCI driver ver 1.3
    [    2.431561] Bluetooth: HCI UART driver ver 2.2
    [    2.431568] Bluetooth: HCIATH3K protocol initialized
    [    2.431574] Bluetooth: Generic Bluetooth USB driver ver 0.6
    [    2.431712] usbcore: registered new interface driver btusb
    [    2.431868] sdhci: Secure Digital Host Controller Interface driver
    [    2.431874] sdhci: Copyright(c) Pierre Ossman
    [    2.432209] mmc0: SDHCI controller on platform [sdhci-esdhc-imx.2] using DMA
    [    2.497650] hub 2-1:1.0: 4 ports detected
    [    2.497684] mxc_vdoa mxc_vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
    [    2.509154] VPU initialized
    [    2.512517] mxc_asrc registered
    [    2.536983] Thermal calibration data is 0x59350469
    [    2.541792] Thermal sensor with ratio = 185
    [    2.557468] Anatop Thermal registered as thermal_zone0
    [    2.562757] anatop_thermal_probe: default cooling device is cpufreq!
    [    2.571652] usbcore: registered new interface driver usbhid
    [    2.577231] usbhid: USB HID core driver
    [    2.581647] usbcore: registered new interface driver snd-usb-audio
    [    2.588380] mxc_hdmi_soc mxc_hdmi_soc.0: MXC HDMI Audio
    [    2.593829] Cirrus Logic CS42888 ALSA SoC Codec Driver
    [    2.599082] i2c-core: driver [cs42888] using legacy suspend method
    [    2.605266] i2c-core: driver [cs42888] using legacy resume method
    [    2.644648] mmc0: new high speed SDHC card at address e624
    [    2.650552] mmcblk0: mmc0:e624 SS08G 7.40 GiB
    [    2.656292]  mmcblk0: p1
    [    2.693946] audio_codec_ac97_cold_reset
    [    2.757677] USB Gadget resume begins
    [    2.757685] fsl_udc_resume, Wait for wakeup thread finishes
    [    2.780049] Found Audio codec AC97 vt1613, [ID = 5649 - 4123]
    [    2.798271] asoc: vt1613 <-> imx-ssi.0 mapping ok
    [    2.804637] imx_3stack asoc driver
    [    2.809633] asoc: mxc-hdmi-soc <-> imx-hdmi-soc-dai.0 mapping ok
    [    2.816303] ALSA device list:
    [    2.817690] usb 2-1.1: new high speed USB device number 3 using fsl-ehci
    [    2.825981]   #0: vt1613-audio
    [    2.829046]   #1: imx-hdmi-soc
    [    2.832303] NET: Registered protocol family 26
    [    2.837286] TCP cubic registered
    [    2.840530] NET: Registered protocol family 17
    [    2.844987] can: controller area network core (rev 20090105 abi 8)
    [    2.851246] NET: Registered protocol family 29
    [    2.855692] can: raw protocol (rev 20090105)
    [    2.859973] can: broadcast manager protocol (rev 20090105 t)
    [    2.865733] Bluetooth: RFCOMM TTY layer initialized
    [    2.870662] Bluetooth: RFCOMM socket layer initialized
    [    2.875802] Bluetooth: RFCOMM ver 1.11
    [    2.879563] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [    2.884876] Bluetooth: BNEP filters: protocol multicast
    [    2.890111] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    [    2.896203] lib80211: common routines for IEEE802.11 drivers
    [    2.901878] lib80211_crypt: registered algorithm 'NULL'
    [    2.901886] lib80211_crypt: registered algorithm 'WEP'
    [    2.901892] lib80211_crypt: registered algorithm 'CCMP'
    [    2.901899] lib80211_crypt: registered algorithm 'TKIP'
    [    2.901905] Registering the dns_resolver key type
    [    2.906661] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    [    2.914706] Bus freq driver module loaded
    [    2.918731] Bus freq driver Enabled
    [    2.924015] mxc_dvfs_core_probe
    [    2.927362] DVFS driver module loaded
    [    2.932679] snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:00:00 UTC (0)
    [    2.943470] EXT3-fs: barriers not enabled
    [    3.327499] usb 2-1.1: device not accepting address 3, error -71
    [    3.427692] usb 2-1.1: new high speed USB device number 4 using fsl-ehci
    [    3.677908] usb 2-1.3: new high speed USB device number 5 using fsl-ehci
    [    3.843729] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
    [    3.845740] Registered led device: rt2800usb-phy0::radio
    [    3.845884] Registered led device: rt2800usb-phy0::assoc
    [    3.846042] Registered led device: rt2800usb-phy0::quality
    [    8.127398] kjournald starting.  Commit interval 5 seconds
    [    8.127503] EXT3-fs (mmcblk0p1): warning: maximal mount count reached, running e2fsck is recommended
    [    8.130182] EXT3-fs (mmcblk0p1): using internal journal
    [    8.130235] ext3_orphan_cleanup: deleting unreferenced inode 131080
    [    8.130306] ext3_orphan_cleanup: deleting unreferenced inode 131079
    [    8.130337] ext3_orphan_cleanup: deleting unreferenced inode 131078
    [    8.130367] ext3_orphan_cleanup: deleting unreferenced inode 131077
    [    8.130397] ext3_orphan_cleanup: deleting unreferenced inode 131076
    [    8.130424] EXT3-fs (mmcblk0p1): 5 orphan inodes deleted
    [    8.130431] EXT3-fs (mmcblk0p1): recovery complete
    [    9.113837] EXT3-fs (mmcblk0p1): mounted filesystem with writeback data mode
    [    9.120937] VFS: Mounted root (ext3 filesystem) on device 179:1.
    [    9.129788] devtmpfs: mounted
    [    9.132811] Freeing init memory: 200K
    [    9.788302] udevd[1647]: starting version 175
    [   11.093192] ERROR: v4l2 capture: slave not found!
    [   11.094469] ERROR: v4l2 capture: slave not found!
    [   16.195157] eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:06, irq=-1)
    [   16.203309] Activating ethernet physical layer Micrel KSZ9031 Gigabit PHY.
    [   19.187852] PHY: 1:06 - Link is Up - 100/Full
    [   38.005147] [drm] Initialized drm 1.1.0 20060810
    [   38.013327] [drm] Initialized vivante 1.0.0 20120216 on minor 0
    [   38.651133] imx-ipuv3 imx-ipuv3.0: WARNING: adapt panel end blank lines
    renthro@udoo-debian-hfp:~$ vi dmesg.log
    [    1.711972] vcan: Virtual CAN interface driver
    [    1.716423] CAN device driver interface
    [    1.720278] flexcan netdevice driver
    [    1.724016] FEC Ethernet Driver
    [    1.729478] fec_enet_mii_bus: probed
    [    1.738442] usbcore: registered new interface driver rt2800usb
    [    1.744279] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    1.750944] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
    [    1.757591] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
    [    1.787495] fsl-ehci fsl-ehci.0: irq 75, io base 0x02184000
    [    1.807473] fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
    [    1.813796] hub 1-0:1.0: USB hub found
    [    1.817577] hub 1-0:1.0: 1 port detected
    [    1.821690] add wake up source irq 72
    [    1.825389] fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
    [    1.832044] fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
    [    1.877470] fsl-ehci fsl-ehci.1: irq 72, io base 0x02184200
    [    1.907460] fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
    [    1.913656] hub 2-0:1.0: USB hub found
    [    1.917420] hub 2-0:1.0: 1 port detected
    [    1.921697] Initializing USB Mass Storage driver...
    [    1.926732] usbcore: registered new interface driver usb-storage
    [    1.932802] USB Mass Storage support registered.
    [    1.937727] usbcore: registered new interface driver usbserial
    [    1.943663] USB Serial support registered for generic
    [    1.948851] usbcore: registered new interface driver usbserial_generic
    [    1.955381] usbserial: USB Serial Driver core
    [    1.959859] USB Serial support registered for debug
    [    1.964860] usbcore: registered new interface driver debug
    [    1.970365] ARC USBOTG Device Controller driver (1 August 2005)
    [    1.976648] g_ether gadget: using random self ethernet address
    [    1.982511] g_ether gadget: using random host ethernet address
    [    1.989102] usb0: MAC 3a:26:d9:ed:27:19
    [    1.992941] usb0: HOST MAC 76:d5:f7:ef:5a:46
    [    1.997217] g_ether gadget: controller 'fsl-usb2-udc' not recognized; trying CDC Ethernet (ECM)
    [    2.005957] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    [    2.012592] g_ether gadget: g_ether ready
    [    2.016604] Suspend udc for OTG auto detect
    [    2.020808] USB Host suspend begins
    [    2.020814] will suspend roothub and its children
    [    2.020835] ehci_fsl_bus_suspend begins, DR
    [    2.020857] ehci_fsl_bus_suspend ends, DR
    [    2.020871] host suspend ends
    
    So I follow this intructions to enable it on debian
    https://wiki.debian.org/ath9k_htc

    After installing the firmware, I reboot and plugged the dongle and proceed to check that whether the installation had been successful with:
    Code:
    root@udoo-debian-hfp:~# lsmod
    Module                  Size  Used by
    vivante                  943  1
    drm                   141896  2 vivante
    
    root@udoo-debian-hfp:~$ modinfo ath9k_htc
    ERROR: Module ath9k_htc not found.
    
    but it was not found, further checking
    Code:
    renthro@udoo-debian-hfp:~$ iwconfig
    lo        no wireless extensions.
    
    eth0      no wireless extensions.
    
    usb0      no wireless extensions.
    
    wlan0     IEEE 802.11bgn  Mode:Master  Frequency:2.437 GHz  Tx-Power=20 dBm
              Retry  long limit:7   RTS thr:off   Fragment thr:off
              Power Management:on
    
    mon.wlan0  IEEE 802.11bgn  Mode:Monitor  Tx-Power=20 dBm
              Retry  long limit:7   RTS thr:off   Fragment thr:off
              Power Management:on
    
    wlan0 is the wifi module that I configured earlier to be used by hostapd running nl80211 driver. I'm planning to use the dongle as a client on another network.
    So any help is really appreciated, thanks.
     
  2. wgvanveen

    wgvanveen New Member

    Joined:
    Oct 5, 2014
    Messages:
    5
    Likes Received:
    1
    I have the exact same problem on either Lubuntu and Debian Wheezy. On the raspberry pi the dongle works out of the box. After some research I think it has something to do with the kernel version. So updating Wheezy to a different kernel using backports. However, I am not completely sure how to do this, and if it is the correct awnser. Anybody a clue?
     
  3. rlagonda

    rlagonda New Member

    Joined:
    Oct 3, 2014
    Messages:
    3
    Likes Received:
    0
    I suspected that much. I don't have my board atm but my next step would be updating the kernel or trying to compile the ath9k_htc driver using compat wireless driver and load it to kernel. I'll report back when I have it back.
     
  4. wgvanveen

    wgvanveen New Member

    Joined:
    Oct 5, 2014
    Messages:
    5
    Likes Received:
    1
    Did you have some luck? I tried to compile the kernel, but everytime it crashes during the compilation. Also the command:

    Code:
    make ARCH=arm UDOO_deconfig
    
    simply doesn't work (no target for UDOO_deconfig). What am I missing here? I did manage to compile the kernel headers, however, backports, compat-drivers or compat-wirless can't seem to install.
     
  5. rlagonda

    rlagonda New Member

    Joined:
    Oct 3, 2014
    Messages:
    3
    Likes Received:
    0
    Hi, I finally got it working. Currently I don't have any complete tutorial on doing this, but let me iterate the best way I can.

    Depending on how you configure your kernel, make sure you enable this kernel configuration.
    http://wireless.kernel.org/en/users/Drivers/ath9k_htc#Configuring_your_kernel

    Exclusively to udoo, I think the kernel source from the UDOO's team is a great place to start. I follow this guideline
    http://joshua.solanes.us/operating-system-2/linux-os/2013/12/01/custom-kernel-on-the-udoo/
    Using this kernel configuration tools, I compiled the kernel with ath9k_htc driver opted as modular (M) not included in the kernel. The driver can be found when configuring using
    Code:
    make menuconfig
    I forgot the exact menu name but It should be fall under "Wireless" or "Network Support" or similar.
    After the configuration is ready, I compiled and loaded the module since I opted to load the driver in modular mode.
    The driver should be listed in
    Code:
    lsmod 
    if we successfully installed that driver.

    After the kernel is compiled and the module is loaded don't forget to install the ath9k_htc firmware
    https://wiki.debian.org/ath9k_htc#Installation
    I didn't use the backported version and installed from the debian main repo.
    Code:
    apt-get install firmware-atheros
    I think the backported firmware is not necessarily needed, but please feel free to try.
    http://backports.debian.org/Instructions/
    Code:
    apt-get -t wheezy-backports install firmware-atheros
    This two files should be listed in /lib/firmware after the successful firmware installation
    Code:
    -rw-r--r-- 1 root root  72992 Jan  6  2013 htc_7010.fw
    -rw-r--r-- 1 root root  51272 Jan  6  2013 htc_9271.fw
    
    not really sure about this two
    Code:
    -rw-r--r-- 1 root root  15944 Jan  6  2013 ar9170.fw
    -rw-r--r-- 1 root root  51312 Jan  6  2013 ar9271.fw
    but I also have those.

    And finally modinfo ath9k_htc should return something like this
    Code:
    filename:       /lib/modules/3.0.35-josolanes-nfsServer-g8a6eb06/kernel/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
    firmware:       htc_9271.fw
    firmware:       htc_7010.fw
    description:    Atheros driver 802.11n HTC based wireless devices
    license:        Dual BSD/GPL
    author:         Atheros Communications
    alias:          usb:v0CF3p20FFd*dc*dsc*dp*ic*isc*ip*
    .
    .
    alias:          usb:v0CF3p9271d*dc*dsc*dp*ic*isc*ip*
    depends:        ath9k_hw,mac80211,ath9k_common,ath,cfg80211
    vermagic:       3.0.35-josolanes-nfsServer-g8a6eb06 SMP mod_unload modversions ARMv7
    parm:           debug:Debugging mask (uint)
    parm:           nohwcrypt:Disable hardware encryption (int)
    
    Note the firmware being used by the driver, also some ppl directly downloaded the firmware and copied that to /lib/firmware but I guess I'll just have to get whatever the aptitude gave me.
    After that I plugged the device and the dongle indicator is finally turned up.
     
  6. wgvanveen

    wgvanveen New Member

    Joined:
    Oct 5, 2014
    Messages:
    5
    Likes Received:
    1
    Thank you! It was more easy then I thought. I used the following steps:

    First install required packages:

    Code:
    sudo apt-get install uboot-mkimage  git-core
    
    Clone the kernel (I didnt use the /usr/src folder, but you can if you like).

    Code:
    git clone https://github.com/UDOOboard/Kernel_Unico kernel-unico 
    Move into the folder

    Code:
    cd ./kernel-unico
    
    Make the default .config file

    Code:
    make ARCH=arm UDOO_defconfig
    
    Alter the .config by using nano

    Code:
    nano .config
    
    And add the following lines at the end of the file (use page down to get there fast).

    Code:
    CONFIG_ATH_COMMON=m
    CONFIG_ATH9K_HW=m
    CONFIG_ATH9K_COMMON=m
    CONFIG_ATH9K_HTC=m
    
    Save the file (CTL+X) and run the following command (takes a lot of time)

    Code:
    make -j5 ARCH=arm uImage modules
    
    Finally copy the file uImage created in ./arch/arm/boot to the boot location with the following command (some people say you need to backup your old uImage in boot/uImage, I didn't).

    Code:
    sudo cp -r ./arch/arm/boot/uImage /boot/uImage
    
    Run the command to copy all new modules into your modules folder.

    Code:
    sudo make install_modules
    
    Install the firmware (only works on debian)

    Code:
    sudo apt-get install firmware-atheros
    
    Now reboot, and you have a working dongle!
     
    sambrin likes this.
  7. danrosero

    danrosero New Member

    Joined:
    Sep 5, 2014
    Messages:
    2
    Likes Received:
    0
    Hi, im currently thinking in getting the Tl-wn722n usb dongle so I can Ad-hoc.

    Does this procedure will work on the UDOObuntu O.S?

    Thanks
     
  8. sirrab

    sirrab UDOOer

    Joined:
    Jul 26, 2014
    Messages:
    264
    Likes Received:
    32
    Why does this stuff create boot images for all the architectures? No wonder it takes forever! And I didn't see a uImage file. There is Image and ZImage files. These are questions for the UDOO developement team, I suspect......
     
  9. adragon202

    adragon202 New Member

    Joined:
    Aug 14, 2015
    Messages:
    1
    Likes Received:
    0
    I have two problems with this.
    1. This line doesn't work.
    Code:
    sudo make install_modules
    
    I install_modules doesn't exist, however modules_install does. So I use
    Code:
    sudo make modules_install
    
    2. System reboots, shows the UDOO logo, then goes to a blank screen and will not progress from there.
    ******UPDATE*******
    Turns out the issue I'm having is already listed as an issue on github.
    https://github.com/UDOOboard/Kernel_Unico/issues/10
    Ended up crosscompiling the kernel using these instructions.
    http://www.udoo.org/docs/Advanced_Setup/Compile_The_Linux_Kernel_And_The_Modules
    I then used scp to transfer the new uImage and lib directory from the build machine to the UDOO.
     
    Last edited: Aug 27, 2015

Share This Page