armstraptools / ap6210 Goto Github PK
View Code? Open in Web Editor NEWWifi and Bluetooth driver for CubieTruck
License: GNU General Public License v2.0
Wifi and Bluetooth driver for CubieTruck
License: GNU General Public License v2.0
Hello, I've tried compiling a 3.4.90+ kernel with the patches included on this page: http://linux-sunxi.org/Cubietruck/AP6210
The kernel boots fine, all the modules work fine... except for the AP6210 module.
When I try to modprobe it, I get this error:
~ # modprobe -v ap6210
insmod /lib/modules/3.4.90+/kernel/drivers/net/wireless/ap6210/ap6210.ko
ERROR: could not insert 'ap6210': Operation not permitted
Here is what dmesg has to say about the problem: http://pastie.org/pastes/9287752/text?key=dx5htwslbdyipajy5mbfqa
I see some interesting lines in that dmesg log:
[ 56.313236] [ap6210] select wifi ap6210
[ 56.324039] [ap6210] Initializing ap6210.
[ 56.337317] [ap6210] platform device registered successfully.
[ 56.352059] [ap6210] Using ap6210 configuration.
[ 56.363222] [ap6210] [dhd_module_init] get wl_host_wake gpio failed
[ 58.082059] [ap6210] select wifi ap6210
Maybe it's a GPIO error? My script.bin looks fine (it's the default one), so I'm not sure what it could be.
More information here: http://www.cubieforums.com/index.php?topic=2668.msg17482#msg17482
I managed to patch my sources and also try yours. My compilers v4.6 and 4.8 outputs this error: cc1: error: unrecognized command line option ‘-fno-aggressive-loop-optimizations’
Which compiler do you use?
Hi, Eddy,
Thanks for the driver and which I tried hard to leverage :) , during progress, I eventually can insert the ap6210, but some confusing thing is when mod loaded, and I tried 'sudo ifconfig wlan0 up', after some 'normal log' and then after the firmware & nvram downloaded, I got error ..
cubie@Cubian:~$ sudo ifconfig wlan0 up
[sudo] password for cubie:
<3>[ap6210] Dongle Host Driver, version 1.28.23.3 (r).
<3>[ap6210] Compiled in drivers/net/wireless/ap6210 on Dec 17 2014 at 20:49:27.
<3>[ap6210] WLAN going back to live
sdio_reset_comm():
<6>[mmc-msg] sdc3 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set round clock 400000, src 24000000
<6>[mmc-msg] sdc3 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<4>mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
<6>[mmc-msg] sdc3 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set round clock 43636363, src 480000000
<6>[mmc-msg] sdc3 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<3>[ap6210] dhd_bus_devreset: WLAN ON
<3>[ap6210] Final fw_path=/lib/firmware/ap6210/fw_bcm40181a2.bin
<3>[ap6210] Final nv_path=/lib/firmware/ap6210/nvram_ap6210.txt
<3>[ap6210] download firmware /lib/firmware/ap6210/fw_bcm40181a2.bin
<3>[ap6210] dhd_bus_devreset: dhd_bus_start fail with -5
<3>[ap6210] dhd_dev_reset: dhd_bus_devreset: -5
<4>[sched_delayed] sched: RT throttling activated
<3>[ap6210] dhdcdc_set_ioctl: dhdcdc_msg failed w/status -5
<3>[ap6210] bcmsdh_sdmmc: F0 Wr:0x04: write disallowed
<3>[ap6210] dhd_bus_devreset: WLAN OFF DONE
<3>[ap6210] WLAN placed in RESET
<3>[ap6210] dhd_open: failed with code -5
SIOCSIFFLAGS: Operation not permitted
But most strange thing is , if I immediately do it again, then it show some OK status like:
cubie@Cubian:~$ sudo ifconfig wlan0 up
<3>[ap6210] Dongle Host Driver, version 1.28.23.3 (r).
<3>[ap6210] Compiled in drivers/net/wireless/ap6210 on Dec 17 2014 at 20:49:27.
<3>[ap6210] WLAN going back to live
sdio_reset_comm():
<6>[mmc-msg] sdc3 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set round clock 400000, src 24000000
<6>[mmc-msg] sdc3 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<4>mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
<6>[mmc-msg] sdc3 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>[mmc-msg] sdc3 set round clock 43636363, src 480000000
<6>[mmc-msg] sdc3 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<3>[ap6210] dhd_bus_devreset: WLAN ON
<3>[ap6210] Final fw_path=/lib/firmware/ap6210/fw_bcm40181a2.bin
<3>[ap6210] Final nv_path=/lib/firmware/ap6210/nvram_ap6210.txt
<3>[ap6210] download firmware /lib/firmware/ap6210/fw_bcm40181a2.bin
<3>[ap6210] dhd_bus_devreset: WLAN ON DONE
<3>[ap6210] Dongle ready, protocol version 4
<3>[ap6210] Dongle ready, protocol version 4
<3>[ap6210] Firmware up: op_mode=0x0005, Broadcom Dongle Host Driver mac=98:3b:16:de:c6:fe
<3>[ap6210] Firmware version = wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d
<3>[ap6210] Chip: a962 Rev 1 Pkg 9<3>[ap6210] p2p0: p2p_dev_addr=9a:3b:16:de:c6:fe
and I can check as
cubie@Cubian:~$ ifconfig
wlan0 Link encap:Ethernet HWaddr 98:3b:16:de:c6:fe
inet6 addr: fe80::9a3b:16ff:fede:c6fe/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:3107 (3.0 KiB)
but I know there must be something wrong.. and then try to scan and it can't work:
cubie@Cubian:~$ sudo iwlist wlan0 scan
wlan0 Interface doesn't support scanning.
I tried to seek any clues online, but never found similar situation, and do you have any rough idea can guide me some direction?
Thanks!
BR, Claud
Hello,
I'm trying to compile the driver for A10/sun4i, it stops at
CLK_SYS_LOSC , CLK_MOD_OUTA , both being undeclared.
Looking at sun4i clock definitions I replaced CLK_SYS_LOSC with AW_SYS_CLK_LOSC, but I don't know what to replace CLK_MOD_OUTA with?
Any help is appreciated
Is this driver supposed to support the bluetooth part? I can make the wifi work, but not the bluetooth.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.