当前位置: 首页 > 技术文章 > 正文

For English speaking readers, please visit: https://www.witimes.com/openwrt-porting-art-en/

相信本站的大部分读者都知道OpenWRT与ART:OpenWRT是一款基于Linux的开源无线路由器系统,目前广泛应用于很多厂商的无线设备;ART是Atheros Radio Test的简写,用于测试各种基于Qualcomm Atheros芯片设备的射频指标。近期有朋友寻求OpenWRT中的ART驱动程序, 笔者费了九牛二虎之力终于将其搞定,在此做简要总结,以便后续查阅。

1. 基于已有经验,移植ART驱动程序必须指定相应的内核路径与Toolchain路径,修改makefile.artmod如下


KDIR := /home/tom/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.18.7
PWD := $(shell pwd)
ROOTDIR := $(PWD)/modules
# Default architecture is MIPS
ARC :=mips
CROSS_CC :=/home/tom/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-

2. 未作任何代码的更改情况下,开始编译。

3. 出现error: unknown field 'ioctl' specified in initializer,此前在移植i.MX6 ART驱动程序时已经遇到过类似问题,在https://www.witimes.com/imx6-porting-art/一文中有介绍,修改modules/dk_func.c中dk_fops结构体中的ioctl为compat_ioctl,再次编译未报出ioctl的错误。

3. 出现error: 'SPIN_LOCK_UNLOCKED' undeclared here (not in a function),修改modules/dk_event.c中的


spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;


DEFINE_SPINLOCK(driver_lock);

4. 再次编译,顺利通过,在modules目录下出现了art.ko。

5. 将art.ko上传至web服务器,并使用wget命令下载至DUT中,并使用insmod art.ko命令插入内核模块并运行nart.out,未出现任何异常。

6. 使用artgui Load DUT,出现如下错误:

deviceInit devIndex=0 device_fn=0 pdkInfo=0
Opening device /dev/dk0
Error: get version ioctl failed !
< 6006 ERROR Anwi driver load error.
< 7502 CONTROL OFF
< 7504 INFO |set|devid||
< 7504 INFO |set|mac||
< 7504 INFO |set|customer||
< 7506 CONTROL DONE load devid=-1; caldata=auto;

截图如下

ioctl-Error

7. 又出现了可怕的错误“Error: get version ioctl failed !”,这个错误曾在我移植i.MX6 ART驱动程序时折磨了我很多天,同样记录在https://www.witimes.com/imx6-porting-art/一文中,当时更换为高版本ART后问题得到解决,然而这一次我采用同样方法却完全不奏效。既然无法避开,那就正面面对,彻查此问题。

8. 查看高版本ART代码modules/dk_func.c中的dk_fops结构体,如下


#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)
static long dk_ioctl_new(struct file *file, unsigned int cmd, unsigned long arg)
{
struct inode *inode = file->f_path.dentry->d_inode;
long ret;
ret = dk_ioctl(inode, file, cmd, arg);
return ret;
}
#endif

发现其定义了一个新的ioctl,在内核版本高于2.6.31时生效。

9. 此处引用自:http://blog.csdn.net/cbl709/article/details/7295772

今天调一个程序调了半天,发现应用程序的ioctl的cmd参数传送到驱动程序的ioctl发生改变。而根据《Linux设备驱动》这个cmd应该是不变的。因为在Kernel 2.6.36 中已经完全删除了struct file_operations 中的ioctl 函数指针,取而代之的是unlocked_ioctl ,所以我怀疑二者是不是兼容的。上网查了一些资料,很多文章只是泛泛谈了一下,说在应用程序中ioctl是兼容的,不必变化。而在驱动程序中这个指针函数变了之后最大的影响是参数中少了inode ,所以应用程序ioctl是兼容的,但驱动程序中我们的ioctl函数必须变化,否则就会发生cmd参数的变化。

10. 仿照这段代码,将低版本ART代码modules/dk_func.c中的dk_fops结构体作出修改,如下


static long dk_ioctl_new(struct file *file, unsigned int cmd, unsigned long arg)
{
struct inode *inode = file->f_path.dentry->d_inode;
long ret;
ret = dk_ioctl(inode, file, cmd, arg);
return ret;
}

static struct file_operations dk_fops = {
owner: THIS_MODULE,
open: dk_open,
release: dk_release,
mmap: dk_mmap,
unlocked_ioctl: dk_ioctl_new
};

11. 再次编译,下载至DUT,并使用artgui Load DUT,一切正常。

Final-OK

移植OpenWRT下的ART驱动程序:目前有191 条评论

  1. 0楼
    满文斌

    楼主 求具体步骤啊 是不是在Package目录下弄makefile,再把art压缩包放到dl目录,求openwrt的makefile文件啊,一直编译不对,求写个openwrt移植的具体操作步骤

    2015-11-03 11:25
    • lics

      ART源码放在哪里无所谓啊,只要在Makefile中指定Toolchain及Kernel路径就可以了~

      2015-11-03 11:58
  2. 0楼
    满文斌

    大神 看下吧http://www.right.com.cn/forum/thread-177538-1-1.html 我也根据的你的改了Toolchain及Kernel路径,还是一样的 有问题 我这个是 art2_ver_4_9_815.tar.bz2 帮看下具体怎么弄吧 我都要弄哭了

    2015-11-03 13:43
    • ivanyu

      你好,能否分享下 art2_ver_4_9_815.tar.bz2源码,我找了很久也没有找到这个, 谢谢!

      2016-07-26 13:24
  3. 0楼
    满文斌

    在线等大神的回复啊

    2015-11-03 14:16
    • lics

      我看到了你的帖子,不需要把代码弄到OpenWRT的dl目录,随便放在那个目录下都可以。

      如果你用的是art2_ver_4_9_815版本,编译art.ko应该是修改driverlinuxmakefile.artmod,编译nart.out应该是修改根目录下的makefile.nart。

      2015-11-03 14:39
    • lics

      像我在文章中写到的:

      KDIR := /home/tom/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.18.7

      CROSS_CC :=/home/tom/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-

      然后,如果是AR9344

      make -f makefile.artmod wasp

      就可以了。

      2015-11-03 14:41
  4. 0楼
    满文斌

    好 我试下 谢谢帮忙

    2015-11-03 15:07
    • lics

      不客气,有问题欢迎继续提问

      2015-11-03 15:08
  5. 0楼
    满文斌

    楼主 art.ko 是编译出来了 但是insmod art.ko 的时候有段错误 帮看下是怎么回事
    root@3Onedata:/# insmod art.ko
    [ 115.940000] CHIP REV ID: 2122
    [ 115.940000] dk_dev_init::status after register_chrdev(dk) = 0
    [ 115.950000] Error: Driver 'ath9k' is already registered, aborting...
    [ 115.960000] Base Phsycal address :0x18100000
    [ 115.960000] CPU 0 Unable to handle kernel paging request at virtual address 000000c8, epc == 801dddac, ra == 8732d2e8
    [ 115.970000] Oops[#1]:
    [ 115.970000] CPU: 0 PID: 1372 Comm: insmod Not tainted 3.10.49 #3
    [ 115.970000] task: 878b9d50 ti: 8726a000 task.ti: 8726a000
    [ 115.970000] $ 0 : 00000000 00000001 87330000 80310000
    [ 115.970000] $ 4 : 00000000 00000400 00000000 80213990
    [ 115.970000] $ 8 : 72657373 203a3078 31383130 30303030
    [ 115.970000] $12 : 00000000 00000001 00000000 61667465
    [ 115.970000] $16 : 00000000 8726bee0 80390000 00000000
    [ 115.970000] $20 : 80320000 80320000 00000001 87274124
    [ 115.970000] $24 : 00000000 8019c7d4
    [ 115.970000] $28 : 8726a000 8726bd58 00000124 8732d2e8
    [ 115.970000] Hi : 00000000
    [ 115.970000] Lo : 7848e000
    [ 115.970000] epc : 801dddac platform_get_resource+0x0/0x4c
    [ 115.970000] Not tainted
    [ 115.970000] ra : 8732d2e8 get_wmac_irq+0x1c/0x44 [art]
    [ 115.970000] Status: 1100dc03 KERNEL EXL IE
    [ 115.970000] Cause : 00800008
    [ 115.970000] BadVA : 000000c8
    [ 115.970000] PrId : 0001974c (MIPS 74Kc)
    [ 115.970000] Modules linked in: art(+) ath9k ath9k_common pppoe ppp_async iptable_nat ath9k_hw ath pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv4 mac80211 ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_string xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_id xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY ts_kmp ts_fsm ts_bm slhc nf_nat_irc nf_nat_ftp nf_nat nf_defrag_ipv4 nf_conntrack_irc nf_conntrack_ftp iptable_raw iptable_mangle iptable_filter ipt_REJECT ipt_ECN ip_tables crc_ccitt compat act_connmark act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_hfsc sch_ingress ledtrig_usbdev ip6t_REJECT ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ifb ipv6 arc4 crypto_blkcipher usb_storage uhci_hcd ohci_hcd ehci_platform ehci_hcd sd_mod scsi_mod gpio_button_hotplug usbcore nls_base usb_common
    [ 115.970000] Process insmod (pid: 1372, threadinfo=8726a000, task=878b9d50, tls=77fb5440)
    [ 115.970000] Stack : 8732df90 8726bd74 8726bd74 87274124 00000124 8732d344 00000001 18100000
    00000000 80213990 802e9744 8726bd9c 8726bd9c 8726bee0 00ffffff 8011b33c
    8726bdac 8732e024 8732e02a 00000000 18100000 00000000 8726bee0 80390000
    00000000 80320000 80320000 8732f070 00000000 00002122 00000000 8726bdd8
    00002122 87274108 8732f000 8011163c 8731aa00 8732e2e0 8726bee0 80320000
    ...
    [ 115.970000] Call Trace:
    [ 115.970000] [] platform_get_resource+0x0/0x4c
    [ 115.970000] [] get_wmac_irq+0x1c/0x44 [art]
    [ 115.970000] [] init_wmac_device+0x34/0x80 [art]
    [ 115.970000] [] init_module+0x70/0x9c [art]
    [ 115.970000] [] do_one_initcall+0xf0/0x198
    [ 115.970000] [] load_module+0x156c/0x1b34
    [ 115.970000] [] SyS_init_module+0xbc/0xd4
    [ 115.970000] [] stack_done+0x20/0x44
    [ 115.970000]
    [ 115.970000]
    Code: 8fbf0014 03e00008 27bd0018 00001821 2409001c 1068000c 70693802 8c8200cc
    [ 116.250000] ---[ end trace 2c2aa316f218682f ]---
    Segmentation fault

    2015-11-03 18:16
    • lics

      ath9k与art.ko不能同时加载,需要在insmod art.ko之前rmmod ath9k相关的模块。

      2015-11-03 18:40
      • victor

        hi lics 你好

        照着您的指导在open编译art.ko的时候 遇到点问题

        CPU 0 Unable to handle kernel paging request at virtual address 00000004, epc == 800bc3f0, ra == 800

        是9341平台, art使用的是 art2_ver_4_9_815 kernel版本是 3.18.19

        看到上面有讲这个错误是因为 ath9k相关的 module 没有卸载

        我rmmod ath9k 之后还是这样, 请教下, ath9k相关的module是就这一个吗 还有其他的要rmmod吗

        root@xcos:/# insmod art.ko
        [ 457.200000] CHIP REV ID: 21010000
        [ 457.200000] dk_dev_init::status after register_chrdev(dk) = 0
        [ 457.210000] Base Phsycal address :0x18100000
        [ 457.210000] DK::Add client 0
        [ 457.220000] DK::Reg phy addr = 18100000 vir Addr = b8100000
        [ 457.220000] DK::Irq = f
        [ 457.220000] DK::Allocated 0x200000 bytes memory
        [ 457.230000] DK::memory vir Addr = 82600000 phy Addr = 2600000
        [ 457.230000] CPU 0 Unable to handle kernel paging request at virtual address 00000004, epc == 800bc3f0, ra == 800
        [ 457.250000] Oops[#1]:
        [ 457.250000] CPU: 0 PID: 2499 Comm: insmod Not tainted 3.18.19 #167
        [ 457.250000] task: 83ba09b0 ti: 825c2000 task.ti: 825c2000
        [ 457.250000] $ 0 : 00000000 00000001 00000000 00000001
        [ 457.250000] $ 4 : 825cb390 00000000 825cb390 ffffffff
        [ 457.250000] $ 8 : 825cb4b4 00000004 20323630 30303030
        [ 457.250000] $12 : 00000000 00000031 00000000 3d203832
        [ 457.250000] $16 : 825cb390 80360000 825cb39c 80360000
        [ 457.250000] $20 : 8336a900 00000001 825cb3d8 8336a924
        [ 457.250000] $24 : 00000001 801d3ac8
        [ 457.250000] $28 : 825c2000 825c3e18 00000000 800bef50
        [ 457.250000] Hi : 00000000
        [ 457.250000] Lo : 5368a000
        [ 457.250000] epc : 800bc3f0 module_put+0xc/0x20
        [ 457.250000] Not tainted
        [ 457.250000] ra : 800bef50 load_module+0x1658/0x1b88
        [ 457.250000] Status: 1100f403 KERNEL EXL IE
        [ 457.250000] Cause : 00800008
        [ 457.250000] BadVA : 00000004
        [ 457.250000] PrId : 0001974c (MIPS 74Kc)
        [ 457.250000] Modules linked in: art pppoe ppp_async iptable_nat pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 ]
        [ 457.250000] Process insmod (pid: 2499, threadinfo=825c2000, task=83ba09b0, tls=778ea440)
        [ 457.250000] Stack : 00000010 800f134c 000002d2 00000000 825cb39c 00007fff 800bc5f0 800f1a80
        825ca7e8 00000004 00000000 00000000 00000000 00000000 800bf4d4 00000001
        006e0b10 000069a2 006e0ad0 7785bdc0 7f845fd8 00000000 00000000 00000000
        7f845e20 800f1b58 000069a2 00000000 00000000 825cb4c8 825cbcb0 000003ff
        c0933294 800bf4d4 006e0b10 000069a2 006e0ad0 7785bdc0 7f845fd8 00000000
        ...
        [ 457.250000] Call Trace:
        [ 457.250000] [] module_put+0xc/0x20
        [ 457.250000] [] load_module+0x1658/0x1b88
        [ 457.250000] [] SyS_init_module+0xb4/0xe0
        [ 457.250000] [] handle_sys+0x11c/0x140
        [ 457.250000]

        2015-12-15 14:00
        • lics

          没记错的话,要卸载三个,ath9k_common,ath9k_hw,ath9k。

          2015-12-15 14:11
  6. 0楼
    满文斌

    恩 是的 是这的问题, 我运行了./nart.out 之后 能出现 你文中最后截图那个,pc端运行artgui.exe 测试发包 会出现新的问题 2054 INFO Calibration Channel Selection Failed.
    以下是串口:
    7504 INFO |channel|6040|0|0|0|0|1|0|0|0|0|0|0|1|0|0|0|0|
    < 7504 INFO |channel|6060|0|0|1|0|0|0|0|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6060|0|0|0|1|0|0|0|0|0|0|1|0|0|0|0|0|
    < 7504 INFO |channel|6080|0|0|1|0|0|0|0|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6080|0|0|0|0|1|0|0|0|0|0|0|1|0|0|0|0|
    tx f=2412;ir=0;gi=0;txch=1;rxch=7;pc=-1;pl=1000;bc=1;retry=0;att=0;iss=0;stat= 3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macr x=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    < 7508 CONTROL BEGIN tx f=2412;ir=0;gi=0;txch=1;rxch=7;pc=-1;pl=1000;bc=1;retry= 0;att=0;iss=0;stat=3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20. 22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;p cdac=30;pdgain=3;
    START
    < 7508 CONTROL BEGIN START
    STOP
    < 7508 CONTROL BEGIN STOP
    tx f=2412;ir=0;gi=0;txch=2;rxch=7;pc=-1;pl=1000;bc=1;retry=0;att=0;iss=0;stat= 3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macr x=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    < 7508 CONTROL BEGIN tx f=2412;ir=0;gi=0;txch=2;rxch=7;pc=-1;pl=1000;bc=1;retry= 0;att=0;iss=0;stat=3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20. 22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;p cdac=30;pdgain=3;
    START
    < 7508 CONTROL BEGIN START
    < 7506 CONTROL DONE START

    以下是artgui的信息

    6101 INFO Last reference design
    4047 INFO |get|OpFlags|0x3|
    4047 INFO |get|Mask.Tx|0x7|
    4047 INFO |get|Mask.Rx|0x7|
    [0] 2054 INFO Calibration Channel Selection Failed.
    7303 INFO Command stopped.
    [0] 2054 INFO Calibration Channel Selection Failed.

    2015-11-03 19:34
    • lics

      看起来是缺少校准信息造成的,应该不是art.ko和nart.out的问题。可以从带有校准信息的板子上将art分区内容弄出来,然后写入待测板中,再试试。

      2015-11-03 19:41
  7. 0楼
    满文斌

    串口的没发好

    < 7504 INFO |channel|6080|0|0|0|0|1|0|0|0|0|0|0|1|0|0|0|0|
    tx f=2412;ir=0;gi=0;txch=1;rxch=7;pc=-1;pl=1000;bc=1;retry=0;att=0;iss=0;stat= 3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macr x=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    < 7508 CONTROL BEGIN tx f=2412;ir=0;gi=0;txch=1;rxch=7;pc=-1;pl=1000;bc=1;retry= 0;att=0;iss=0;stat=3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20. 22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;p cdac=30;pdgain=3;
    START
    < 7508 CONTROL BEGIN START
    STOP
    < 7508 CONTROL BEGIN STOP
    tx f=2412;ir=0;gi=0;txch=2;rxch=7;pc=-1;pl=1000;bc=1;retry=0;att=0;iss=0;stat= 3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macr x=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    < 7508 CONTROL BEGIN tx f=2412;ir=0;gi=0;txch=2;rxch=7;pc=-1;pl=1000;bc=1;retry= 0;att=0;iss=0;stat=3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20. 22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;p cdac=30;pdgain=3;
    START
    < 7508 CONTROL BEGIN START
    < 7506 CONTROL DONE START

    2015-11-03 19:41
  8. 0楼
    满文斌

    < 7504 INFO |channel|6080|0|0|0|0|1|0|0|0|0|0|0|1|0|0|0|0|
    tx f=2412;ir=0;gi=0;txch=1;rxch=7;pc=-1;pl=1000;bc=1;retry=0;att=0;iss=0;stat= 3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macr x=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    START
    < 7508 CONTROL BEGIN START
    < 7506 CONTROL DONE START

    2015-11-03 19:45
  9. 0楼
    满文斌

    哦 好的 你的意思是弄个art.bin 先初始化以下是吧

    2015-11-03 19:47
    • lics

      是的,先弄个art分区信息写入Flash。不客气~

      2015-11-03 19:57
  10. 0楼
    满文斌

    谢谢 明天测试一下 准备下班 谢谢楼主

    2015-11-03 19:48
  11. 0楼
    满文斌

    楼主你有openwrt添加光口的案列吗,我是qca8337交换芯片,主芯片是ar9344 ,怎么出光口啊

    2015-11-17 17:56
    • lics

      没用过QCA8337,以前用过Vitesse VSC8211,是一颗光电复用PHY,可以自适应,不需要做什么特殊的设置。

      2015-11-17 21:07
  12. 0楼
    周武

    我的是AR6341板子,但是art.ko的代码下有:default、hydra、howl、python、wasp和wasp_osprey这个几个选项。这些分别是什么意思呢??我的AR9341有应该选择那一个呢???

    2015-11-21 09:10
    • lics

      分别代表不同的芯片系列,wasp可用于AR9341,AR9344等,wasp_osprey支持PCI-e,其余的好像都是比较老的芯片的。

      2015-11-21 09:31
      • 周武

        非常感谢ALex.我手有上有art2_ver_4_9_815、art2_ver2_23.1ap_src和 art2_ver_2_61ap_src 三份代码,两个从网上下载的,有一个是从AR9331厂家拷过来的,我都不知用那一份代码比较好,这些都没有版本说明的。请问你是什么那个版本代码??

        2015-11-21 09:43
        • lics

          我用的是art2_ver2_28,我觉得你用art2_ver2_23.1ap_src,art2_ver_2_61ap_src 都可以,art2_ver_4_9_815适用于比较新的芯片。

          2015-11-21 09:51
  13. 0楼
    周武

    Alex,您好!麻烦你帮看一下下面这个问题是如何造成的:
    root@OpenWrt:/lib/modules/4.1.10# insmod art.ko
    [ 4778.617887] DK::Module init
    [ 4778.620947] CHIP REV ID: 10123
    [ 4778.624112] dk_dev_init::status after register_chrdev(dk) = 0
    [ 4778.630074] DK::Init dev table
    [ 4778.633320] Base Phsycal address :0x18100000
    [ 4778.637818] DK::Add client 0
    [ 4778.640907] Trying to free nonexistent resource
    [ 4778.648810] DK:: unable to request irq
    [ 4778.652791] DK:: unable to add client
    [ 4778.656659] Error in initializing wmac
    由于直接编译art2_ver_2_61ap_src代码运行的,有些细节地方不好修改。

    2015-11-21 10:04
    • lics

      请求不到中断,改个中断号试试。

      2015-11-21 10:14
      • 周武

        代码如下:
        #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
        if (request_irq(irq,(void *)dk_intr_handler,SA_SHIRQ,DRV_NAME,(void *)dev) != 0) {
        #else
        if (request_irq(irq,(void *)dk_intr_handler,IRQF_SHARED,DRV_NAME,(void *)dev) != 0) {
        #endif
        for(iIndex=0; iIndex<numBars; iIndex++) {
        iounmap((VOID *)reg_vir_addr[iIndex]);
        release_mem_region(baseaddr[iIndex],len[iIndex]);
        }
        printk(KERN_ERR "DK:: unable to request irq n");
        return -1;
        }
        irq的值是2,我修改1或者3都出现系统报错。请指点一下,谢谢~~

        2015-11-21 10:58
        • lics

          改成大一点的数,我忘了我的改成多少了,好像是40多。

          2015-11-21 11:02
        • lics

          我的改成15了。

          2015-11-21 11:06
          • 周武

            Alex,我把irq值修改成1、3、7、8、15、43、45、47、48和49都已经试过,都不能把问题解决掉。有别的方法吗??

            2015-11-21 11:28
  14. 0楼
    周武

    Alex,我把irq值修改成1、3、7、8、15、43、45、47、48和49都已经试过,都不能把问题解决掉。有别的方法吗??

    2015-11-21 11:28
    • lics

      那我就不知道了,我的当时改了就好了。

      2015-11-21 12:04
  15. 0楼
    周武

    Alex:
    您好!由于我这边注册中断失败,修改了好几个地方,都解决不了。你能提供art2_ver2_28版本的art.ko和nart.out代码吗??我想调试一下,谢谢~~!

    2015-11-23 17:01
    • lics

      兄弟,很抱歉,代码我不能给你,小站从不提供任何机密内容,包括代码,Datasheet,硬件资料,客户信息,望理解!

      我修改的是modules/main.c中irq号,你改的也是这里吗?

      2015-11-23 20:16
      • 周武

        Alex:
        我也是在modules/main.c中修改irq号。如下代码:
        numBars = iIndex;
        irq=2; //在此修改。
        if (add_client(dev,(A_UINT_PTR *)baseaddr,len,irq, numBars, sIndex,0) < 0) {
        我试了很多组数字,都是注册不上。同时我也看一下/proc/interrupts,没有出现相同的中断号。

        2015-11-24 09:15
        • lics

          跟我的改动方法完全一致,实在不行你试试4_9_815版本的。

          2015-11-24 09:59
          • leo2

            很感谢Alex 的耐心和专业的解答,从中解决了不少问题,
            关于[ 4778.648810] DK:: unable to request irq
            [ 4778.652791] DK:: unable to add client
            [ 4778.656659] Error in initializing wmac
            的情况,其实 Alex 在上文就已提到了解决办法,我也做了相应的测试是可以的。如下:Alex
            2015-11-03 at 18:40 回复
            ath9k与art.ko不能同时加载,需要在insmod art.ko之前rmmod ath9k相关的模块。

            2015-11-26 13:53
  16. 0楼
    leo2

    很感谢Alex 的耐心和专业的解答,从中解决了不少问题,
    关于[ 4778.648810] DK:: unable to request irq
    [ 4778.652791] DK:: unable to add client
    [ 4778.656659] Error in initializing wmac
    的情况,其实 Alex 在上文就已提到了解决办法,我也做了相应的测试是可以的。如下:Alex
    2015-11-03 at 18:40 回复
    ath9k与art.ko不能同时加载,需要在insmod art.ko之前rmmod ath9k相关的模块。

    2015-11-26 13:47
    • lics

      周武的Log信息不完整,没看出来。。。

      2015-11-26 13:53
  17. 0楼
    leo2

    我想请教Alex 的是:
    运行nart.out 时报错:./nart.out: can't load library 'libfield.so'

    2015-11-26 13:49
    • lics

      这是缺少库文件,或者没有指定库文件的路径。

      2015-11-26 13:54
      • leo2

        是指在路由器的固件上缺这个文件,或者是我在编译nart.out 时的所指的路径不正确。是这个意思吗?

        2015-11-26 14:06
        • lics

          是指路由器的固件中缺少这个文件。

          2015-11-26 14:17
  18. 0楼
    leo2

    因为按原厂提供的资料,我只是把编译出来的两个文件art.ko &nart.out 下载到路由器中运行,就出现了上述报错

    2015-11-26 14:10
    • lics

      你用的是哪颗芯片?如果编译得到的nart.out是2MB多一些,那么就不需要库文件;如果编译得到的nart.out是200多KB,就需要库文件。

      2015-11-26 14:19
      • leo2

        用了ar9341 ,编译得到的nart.out 文件只有200多KB, 也就是说需要重新编译固件。或修改makefile.nart 把需要的库编译进去。

        2015-11-26 15:11
  19. 0楼
    leo2

    Alex ,
    如何才能把nart.out 编译到2M多。 我觉得还是重新编译nart.out 省事点,对固件的大小也不会产生影响。

    谢谢!

    2015-11-26 15:18
    • lics

      重新编译好一些,但我当时没有修改makefile.nart,编译直接得到了2MB多的nart.out。

      2015-11-26 15:48
  20. 0楼
    leo2

    非常感谢Alex 提供的解决思路!从此鄙视原厂FAE !!

    2015-11-26 15:57
    • lics

      不客气,我很少找FAE ^_^

      2015-11-26 16:21
  21. 0楼
    leo2

    Alex, 重新编译NART 时出现了问题,请问:makefile.nart 需要修改重新指定内核和工具链的路径吗。能提供一下具体的修改代码吗? ART 按上文的修改能编译通过。

    2015-11-28 14:20
  22. 0楼
    leo2

    补充一下,错误为:mips-linux-uclibc-gcc :命令没找到。

    路径跟ART 设的是一样

    2015-11-28 14:43
    • lics

      OpenWRT的gcc名称应该是mips-openwrt-linux-uclibc-gcc,你再检查一下~

      我在外出差,代码没在这台电脑上,不方便查看。

      2015-11-28 15:19
  23. 0楼
    leo2

    Alex, 谢谢百忙中的回应!

    2015-11-28 16:06
    • lics

      不客气~

      2015-11-28 16:24
  24. 0楼
    edna

    我编译出wasp_oprey的art.ko。
    root:/# insmod art.ko
    [ 175.040000] CHIP REV ID: 12123
    [ 175.040000] Writing value 0x6 to Merlin PCI command register
    [ 175.050000] Resetting bit 16 of Python register 0xb80f001c
    [ 175.050000] dk_dev_init::status after register_chrdev(dk) = 0
    [ 175.060000] Base Phsycal address :0x18100000
    [ 175.070000] DK::Add client 0
    [ 175.070000] DK::Reg phy addr = 18100000 vir Addr = b8100000
    [ 175.070000] DK::Irq = f
    [ 175.080000] DK::Allocated 0x200000 bytes memory
    [ 175.080000] DK::memory vir Addr = 86800000 phy Addr = 6800000
    [ 175.090000] Base Phsycal address :0x10000000
    [ 175.090000] Base Phsycal address :0x00000000
    [ 175.100000] Class code = 2:start search index=0
    [ 175.100000] DK::Add client 1
    [ 175.100000] DK:: Requesting MEM region=10000000:range=131072
    [ 175.110000] DK::Reg phy addr = 10000000 vir Addr = b0000000
    [ 175.120000] DK::Irq = 28
    [ 175.120000] DK::Allocated 0x200000 bytes memory
    [ 175.120000] DK::memory vir Addr = 86a00000 phy Addr = 6a00000
    [ 175.130000] DK::Reg write @ 0xb0000024 : 0x0000
    [ 175.130000] DK::Reg write @ 0xb000704c : 0x0001
    [ 175.140000] DK::Reg write @ 0xb0007040 : 0x0000
    [ 175.140000] DK::Reg write @ 0xb0007040 : 0x0001
    [ 175.150000] Data bus error, epc == 872c1648, ra == 872c1754
    [ 175.150000] Oops[#1]:
    [ 175.150000] CPU: 0 PID: 1064 Comm: insmod Not tainted 3.14.25 #21
    [ 175.150000] task: 87b81320 ti: 87296000 task.ti: 87296000
    [ 175.150000] $ 0 : 00000000 00000001 deadbeef 00000001
    [ 175.150000] $ 4 : 872c422c b0007044 87297b70 0000009c
    [ 175.150000] $ 8 : 00000020 30373034 30203a20 30783030
    [ 175.150000] $12 : 00000000 ffffff80 00000000 30303730
    [ 175.150000] $16 : 00000001 872c4190 00000001 00000000
    [ 175.150000] $20 : 87297c30 00000028 872c4174 8786e000
    [ 175.150000] $24 : 00000003 801b3d68
    [ 175.150000] $28 : 87296000 87297b60 87297c18 872c1754
    [ 175.150000] Hi : 00000000
    [ 175.150000] Lo : 7848e000
    [ 175.150000] epc : 872c1648 cli_reg_read+0x54/0x60 [art]
    [ 175.150000] Not tainted
    [ 175.150000] ra : 872c1754 cli_reg_write+0x100/0x170 [art]
    [ 175.150000] Status: 1100fc03 KERNEL EXL IE
    [ 175.150000] Cause : 0080001c
    [ 175.150000] PrId : 0001974c (MIPS 74Kc)
    [ 175.150000] Modules linked in: art(+) pppoe ppp_async iptable_nat pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_MASQUERADE xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT slhc nf_nat_irc nf_nat_ftp nf_nat nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_irc nf_conntrack_ftp nf_conntrack iptable_raw iptable_mangle iptable_filter ipt_REJECT ip_tables crc_ccitt ledtrig_usbdev ip6t_REJECT ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables ipv6 ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common
    [ 175.150000] Process insmod (pid: 1064, threadinfo=87296000, task=87b81320, tls=779b8440)
    [ 175.150000] Stack : 00000004 8786e000 87297b70 80092ec4 02800001 87297b8c 87297b8c 872c422c
    00000001 872c2074 00000000 86a00000 06a00000 06a00000 872c34cc 872c422c
    b0000000 80122de4 8786e000 00000001 00000000 00000028 02000006 872c38cc
    872c4174 00000001 06a00000 00000009 8786e000 00000001 00000000 00000028
    00000006 872c38cc 00000001 87b448a4 00000124 872c26d0 00000001 00000002
    ...
    [ 175.150000] Call Trace:
    [ 175.150000] [] cli_reg_read+0x54/0x60 [art]
    [ 175.150000]
    [ 175.150000]
    Code: 8c820060 00a22821 8ca20000 03e00008 00001021 2403009c 70833802 3c02872c
    [ 175.360000] ---[ end trace 742d7f21f2a7e735 ]---
    Segmentation fault


    然后使用
    第一个ar9344芯片出的设备跑artgui没问题,但使用板载pcie那部分的射频就会出现出错。
    是不是加载art.ko时[ 175.150000] Data bus error, epc == 872c1648, ra == 872c1754这部分出错了。
    应该怎么解决呢

    2015-12-10 16:08
    • lics

      另一个Radio是什么芯片?硬件确定OK吗?

      2015-12-10 16:59
      • edna

        另一个是qca9582,使用原厂SDK编译db120固件,然后加载art都是调试通过了,现在转到openwrt一个射频就出错,很奇怪

        2015-12-11 09:40
        • lics

          我以前遇到Data bus error大多是由于5GHz没有写入校准信息造成的,你可以写入校准信息试试。

          2015-12-11 10:02
          • edna

            非常感谢lics啊,换成barrier_breake版本后art.ko就没有出错信息了。
            不过跑artgui时连第二个射频还是出现
            < 6008 ERROR Device attach error 13.
            < 7502 CONTROL OFF
            < 7504 INFO |set|devid||
            < 7504 INFO |set|mac||
            < 7504 INFO |set|customer||
            < 7506 CONTROL DONE load devid=-1; caldata=auto;
            真是奇怪

            2015-12-11 11:02
          • lics

            看看串口中有没有错误提示。

            2015-12-11 11:15
          • edna

            root@openwrt:/# Setting instance to 1
            5108 INFO Waiting for connection from control process.
            5109 INFO Accepted control connection from client 0.
            7504 INFO |set|NartVersion|2.27|
            7504 INFO |set|NartBuildDate|120201100000|
            7504 INFO |set|devid||
            7504 INFO |set|mac||
            7504 INFO |set|customer||
            > hello
            < 7508 CONTROL BEGIN hello
            < 7504 INFO |set|NartVersion|2.27|
            < 7504 INFO |set|NartBuildDate|120201100000|
            < 7504 INFO |set|devid||
            < 7504 INFO |set|mac||
            < 7504 INFO |set|customer||
            load devid=-1; caldata=auto;
            < 7508 CONTROL BEGIN load devid=-1; caldata=auto;
            < 7501 CONTROL ON
            deviceInit devIndex=0 device_fn=0 pdkInfo=0
            Opening device /dev/dk1
            @Error opening device /dev/dk1:-1
            Error: Unable to open the device !
            < 6006 ERROR Anwi driver load error.
            < 7502 CONTROL OFF
            < 7504 INFO |set|devid||
            < 7504 INFO |set|mac||
            < 7504 INFO |set|customer||
            load devid=-1; caldata=auto;
            < 7508 CONTROL BEGIN load devid=-1; caldata=auto;
            < 7501 CONTROL ON
            deviceInit devIndex=0 device_fn=0 pdkInfo=0
            Opening device /dev/dk1
            @Error opening device /dev/dk1:-1
            Error: Unable to open the device !
            < 6006 ERROR Anwi driver load error.
            < 7502 CONTROL OFF
            < 7504 INFO |set|devid||
            < 7504 INFO |set|mac||
            < 7504 INFO |set|customer||
            < 7506 CONTROL DONE load devid=-1; caldata=auto;

            2015-12-11 11:25
          • lics

            打不开dk1,/dev下面有dk1吗?

            2015-12-11 11:33
          • edna

            忘记打
            mknod /dev/dk0 c 63 0
            mknod /dev/dk1 c 63 1
            了,不过使用nart.out还是出现错误

            5108 INFO Waiting for connection from control process.
            5109 INFO Accepted control connection from client 0.
            7504 INFO |set|NartVersion|2.27|
            7504 INFO |set|NartBuildDate|120201100000|
            7504 INFO |set|devid||
            7504 INFO |set|mac||
            7504 INFO |set|customer||
            > hello
            < 7508 CONTROL BEGIN hello
            < 7504 INFO |set|NartVersion|2.27|
            < 7504 INFO |set|NartBuildDate|120201100000|
            < 7504 INFO |set|devid||
            < 7504 INFO |set|mac||
            < 7504 INFO |set|customer||
            load devid=-1; caldata=auto;
            < 7508 CONTROL BEGIN load devid=-1; caldata=auto;
            < 7501 CONTROL ON
            deviceInit devIn[ 60.470000] DK::Regsitering client 1
            dex=0 device_fn=[ 60.470000] DK::Reg write @ 0xb0000024 : 0x0000
            0 pdkInfo=0
            Ope[ 60.480000] DK::Reg write @ 0xb000704c : 0x0001
            ning device /dev[ 60.490000] DK::Reg write @ 0xb0007040 : 0x0000
            /dk1
            [ 60.490000] DK::Reg write @ 0xb0007040 : 0x0001
            [ 60.500000] Device Status is : 0x11
            pDrv Maj Ver=1:Min Ver=2
            driverVer Maj Ver=1:Min Ver=2
            rpa=10000000:rr=20000:nB=1:mpa=6600000:ms=200000:irq=28:dma_addr=0
            reg vir addr[0]=77846000
            reg range[0]=20000
            memsize=200000:mem phy addr = 6600000: mem vir addr=77646000
            Num bars = 1
            + f2MapAddress = 10000000
            + aregPhyAddr[0]= 10000000
            + aregVirAddr[0]= 77846000
            + aregRange[0]= 00020000
            + Allocated memory in the driver.
            + VirtAddress = 77646000
            + PhysAddress = 06600000
            + Size = 00200000
            < 6008 ERROR Device attach error 13.
            < 7502 CONTROL OFF
            < 7504 INFO |set|devid||
            < 7504 INFO |set|mac||
            < 7504 INFO |set|customer||
            < 7506 CONTROL DONE load devid=-1; caldata=auto;

            2015-12-11 12:07
  25. 0楼
    edna

    我们加载的art校准信息在原厂固件里测试脚本是跑完了的,在openwrt里两个无线也能正常工作。
    今天发现cc版的和trunk版的openwr在无线在monitor模式下加电启动运行时会出现。
    [ 55.690000] WARNING: CPU: 0 PID: 1263 at /home/edna/chaos_calmer/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/compat-wireless-2015-03-09/net/mac80211/driver-ops.h:222 ieee80211_bss_info_change_notify+0x98/0x140 [mac80211]()
    [ 55.720000] Modules linked in: pppoe ppp_async option iptable_nat ath9k usb_wwan pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_REJECT ipt_MASQUERADE ath9k_common xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT usbserial ts_kmp ts_fsm ts_bm slhc nf_reject_ipv4 nf_nat_masquerade_ipv4 nf_nat_ftp nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_ftp nf_conntrack iptable_raw iptable_mangle iptable_filter ip_tables crc_ccitt cdc_acm ath9k_hw ath5k ath10k_pci ath10k_core ath mac80211 cfg80211 compat ledtrig_usbdev ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables nls_utf8 ipv6 arc4 crypto_blkcipher uhci_hcd ohci_platform ohci_hcd ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common
    [ 55.800000] CPU: 0 PID: 1263 Comm: iw Not tainted 3.18.23 #3
    [ 55.800000] Stack : 00000000 00000000 00000000 00000000 803b4292 00000030 00000000 872016bc
    00000001 00000000 80301968 803589e3 000004ef 803b34d0 8782a908 00000000
    00000004 00000000 00000008 800a35cc 00000003 800803bc 000000de 00000000
    80304f60 86b6da8c 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    ...
    [ 55.840000] Call Trace:
    [ 55.840000] [] show_stack+0x50/0x84
    [ 55.850000] [] warn_slowpath_common+0x84/0xb4
    [ 55.850000] [] warn_slowpath_null+0x18/0x24
    [ 55.860000] [] ieee80211_bss_info_change_notify+0x98/0x140 [mac80211]
    [ 55.870000] [] ieee80211_csa_finish+0x1ce0/0x398c [mac80211]
    而barrier_breaker版本不会。
    等下我在barrier_breaker编译个art再试试

    2015-12-11 10:29
  26. 0楼
    lics

    这个情况就不清楚了,多加点打印信息调试吧。

    2015-12-11 12:20
  27. 0楼
    edna

    谢谢lics的耐心解答啊,这是详细的打印信息:
    root@openwrt:/# insmod art.ko
    [ 1436.170000] CHIP REV ID: 2122
    [ 1436.180000] Writing value 0x6 to Merlin PCI command register
    [ 1436.180000] Resetting bit 16 of VIRIAN register 0xb80f0000
    [ 1436.190000] dk_dev_init::status after register_chrdev(dk) = 0
    [ 1436.190000] Base Phsycal address :0x18100000
    [ 1436.200000] DK::Add client 0
    [ 1436.200000] DK::Reg phy addr = 18100000 vir Addr = b8100000
    [ 1436.210000] DK::Irq = f
    [ 1436.210000] DK::Allocated 0x200000 bytes memory
    [ 1436.210000] DK::memory vir Addr = 86400000 phy Addr = 6400000
    [ 1436.220000] Base Phsycal address :0x10000000
    [ 1436.220000] Base Phsycal address :0x00000000
    [ 1436.230000] Class code = 2:start search index=0
    [ 1436.230000] DK::Add client 1
    [ 1436.240000] DK:: Requesting MEM region=10000000:range=131072
    [ 1436.240000] DK::Reg phy addr = 10000000 vir Addr = b0000000
    [ 1436.250000] DK::Irq = 28
    [ 1436.250000] DK::Allocated 0x200000 bytes memory
    [ 1436.260000] DK::memory vir Addr = 86600000 phy Addr = 6600000
    [ 1436.260000] DK::Reg write @ 0xb0000024 : 0x0000
    [ 1436.270000] DK::Reg write @ 0xb000704c : 0x0001
    [ 1436.270000] DK::Reg write @ 0xb0007040 : 0x0000
    [ 1436.280000] DK::Reg write @ 0xb0007040 : 0x0001
    [ 1436.280000] Device Status is : 0x11
    [ 1436.280000] DK::bus_module_init:status=0 from dkpci_driver
    root@openwrt:/# mknod /dev/dk0 c 63 0
    root@openwrt:/# mknod /dev/dk1 c 63 1
    root@openwrt:/# ./nart.out -instance 0 -port 2390 -console&
    root@openwrt:/# Setting instance to 0
    5108 INFO Waiting for connection from control process.

    root@openwrt:/# ./nart.out -instance 1 -port 2391 -console&
    root@openwrt:/# Setting instance to 1
    5108 INFO Waiting for connection from control process.
    5109 INFO Accepted control connection from client 0.
    7504 INFO |set|NartVersion|2.27|
    7504 INFO |set|NartBuildDate|120201100000|
    7504 INFO |set|devid||
    7504 INFO |set|mac||
    7504 INFO |set|customer||
    > hello
    < 7508 CONTROL BEGIN hello
    < 7504 INFO |set|NartVersion|2.27|
    < 7504 INFO |set|NartBuildDate|120201100000|
    < 7504 INFO |set|devid||
    < 7504 INFO |set|mac||
    < 7504 INFO |set|customer||
    load devid=-1; caldata=auto;
    < 7508 CONTROL BEGIN load devid=-1; caldata=auto;
    < 7501 CONTROL ON
    deviceInit devIn[ 1592.900000] DK::Regsitering client 1
    dex=0 device_fn=[ 1592.910000] DK::Reg write @ 0xb0000024 : 0x0000
    0 pdkInfo=0
    Ope[ 1592.910000] DK::Reg write @ 0xb000704c : 0x0001
    ning device /dev[ 1592.920000] DK::Reg write @ 0xb0007040 : 0x0000
    /dk1
    [ 1592.920000] DK::Reg write @ 0xb0007040 : 0x0001
    [ 1592.930000] Device Status is : 0x11
    pDrv Maj Ver=1:Min Ver=2
    driverVer Maj Ver=1:Min Ver=2
    rpa=10000000:rr=20000:nB=1:mpa=6600000:ms=200000:irq=28:dma_addr=0
    reg vir addr[0]=773cc000
    reg range[0]=20000
    memsize=200000:mem phy addr = 6600000: mem vir addr=771cc000
    Num bars = 1
    + f2MapAddress = 10000000
    + aregPhyAddr[0]= 10000000
    + aregVirAddr[0]= 773cc000
    + aregRange[0]= 00020000
    + Allocated memory in the driver.
    + VirtAddress = 771cc000
    + PhysAddress = 06600000
    + Size = 00200000
    < 6008 ERROR Device attach error 13.
    < 7502 CONTROL OFF
    < 7504 INFO |set|devid||
    < 7504 INFO |set|mac||
    < 7504 INFO |set|customer||
    < 7506 CONTROL DONE load devid=-1; caldata=auto;

    2015-12-11 12:41
    • lics

      是不是开了debug模式,把debug模式关掉试试。

      2015-12-11 12:57
      • edna

        nart.out的debug模式吗,怎么关啊

        2015-12-11 13:07
        • lics

          art.ko的debug模式,编译时注意把DEBUG设置为0就可以关掉。

          2015-12-11 13:14
  28. 0楼
    edna

    设成0还是不行,一样的错误

    2015-12-11 13:37
    • lics

      我没啥想法了。。。

      2015-12-11 13:41
      • edna

        已经非常感谢了,现在ar9344的射频art能在openwrt上跑的通了。我再找找问题看

        2015-12-11 13:44
        • lics

          不客气~

          2015-12-11 14:00
  29. 0楼
    leo2

    lics ,
    还是请教ART 调试的问题:在ARTGUI 的界面中不知如何调整载波频点,看不到可调的选项。在发射测试状态下。选项都被禁止,只能查看发射的中心频点,没法进入到选项。

    2015-12-17 15:29
    • lics

      Load DUT没报错吗?

      2015-12-17 15:48
  30. 0楼
    leo2

    能控制信号发射,就是不能调试。加载没问题。接仪器可看到频谱。

    2015-12-17 16:07
    • lics

      那应该是ART分区没有内容导致的,可以写入校准数据试试。

      2015-12-17 16:11
  31. 0楼
    leo2

    发射调试界面有两个主要选项 (O continuous O single carrier) 第一个可步进调发射功率,如果想校准频点的话,选第二个,却没有调整的选项出来,(难道高通的片子不用效准频点)

    2015-12-17 16:14
    • lics

      哦,你是说这个啊。单载波模式下不支持功率调整,频率调整没注意。一般频偏校准都是自动完成的,不需要手动的。

      2015-12-17 16:17
  32. 0楼
    leo2

    芯片是AR9341

    2015-12-17 16:22
    • lics

      与芯片无关的,都是在Manufacture Test时通过XTAL CAL完成频偏校准的。

      2015-12-17 16:28
  33. 0楼
    leo2

    自动调整是另外写效准脚本上实现,还是artgui本身自带的开始脚本文件就有这个效准功能功能。 在2.4 G 下看到有+20KHz 的频偏,不知能否接受,按标准算出来应该在+- 12.5KHz 。

    谢谢!

    2015-12-17 16:36
    • lics

      ART2本身就有这个脚本,在运行Calibration时会使用相应的XTAL CAL脚本。频偏+/-20ppm以下就可以,算算吧。

      2015-12-17 16:44
  34. 0楼
    leo2

    谢谢 Lics

    2015-12-17 16:56
  35. 0楼
    colin

    HI,我参考Lics的方法已经load板了
    请教一个问题:我的只有2.4G,修改2GHz.XpaBiasLevel的值的时候出现如下错误信息:

    [ 104.000000] dk_dev_init::status after register_chrdev(dk) = 0
    [ 104.010000] Base Phsycal address :0x18100000
    [ 104.010000] DK::Add client 0
    [ 104.010000] DK::Reg phy addr = 18100000 vir Addr = b8100000
    [ 104.020000] DK::Irq = 2
    [ 104.020000] DK::Allocated 0x200000 bytes memory
    [ 104.030000] DK::memory vir Addr = 82a00000 phy Addr = 2a00000
    [ 150.650000] DK::Regsitering client 0
    [ 150.660000] DK::Unregsitering client 0
    [ 151.510000] DK::Regsitering client 0
    [ 151.520000] DK::Unregsitering client 0
    [ 151.530000] DK::Regsitering client 0
    [ 689.830000] Data bus error, epc == 7775c930, ra == 7775d810
    [ 689.840000] DK::Unregsitering client 0

    2015-12-24 15:50
    • colin

      请Lics和各位朋友帮助看一下,非常感谢!!

      2015-12-24 15:53
    • lics

      你在做这个操作时点击commit了吗?还是点击set就出现了?

      2015-12-24 16:40
      • colin

        点击commit才出现

        2015-12-24 16:41
        • lics

          那很可能是art分区不可写的原因,重新编译一下openwrt吧,把art分区的ro属性去掉。

          2015-12-24 16:44
          • colin

            是编UBOOT还是OPENWRT??

            2015-12-24 16:47
  36. 0楼
    colin

    我的是QCA9531 ,
    不知道是不是ART分区不允许写,
    我在网上DOWN了一个art.bin文件在UBOOT下面更新了ART分区。

    2015-12-24 16:10
  37. 0楼
    colin

    这个参数是主芯片控制外置PA使能
    范围是0x0---0xf
    现在是0x0,使能方波是2.2V
    要提高这个方波,就得修改这个参数

    2015-12-24 16:14
  38. 0楼
    lics

    是openwrt

    2015-12-24 16:48
    • colin

      存在同样的问题:Data bus error, epc == 7774c930, ra == 7774d810
      下面是分析信息:
      console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(mib0),64k(art),7744k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd

      2015-12-24 17:46
      • lics

        你修改的是./target/linux/ar71xx/image/Makefile文件吗?

        2015-12-24 17:53
        • colin

          是的

          2015-12-24 18:07
          • lics

            再写个校准信息到ART分区试试吧。

            2015-12-24 19:10
  39. 0楼
    colin

    刚重新写了ART分区,真的就可以了。进程nart.out进程也没有挂掉。
    但是我之前是已经写过ART分区的,不然无线就无法使用,为什么要重写呢??
    真的非常感谢lics的指点。。。。

    2015-12-24 19:32
    • lics

      你是去掉ART分区ro属性后写入ART分区信息吗?按理说只写一次就可以了,不需要重写才对啊

      2015-12-24 20:15
  40. 0楼
    jihj

    Alex,您好!麻烦你帮看一下下面这个问题是如何造成的:
    > setconfig EEPROM_FILE=boardData_2_QC98XX_cus223_gld.bin;
    < 7508 CONTROL BEGIN setconfig EEPROM_FILE=boardData_2_QC98XX_cus223_gld.bin;
    < |setconfig|EEPROM_FILE|boardData_2_QC98XX_cus223_gld.bin|
    setconfig DEVDRV_INTERFACE=5;
    < 7508 CONTROL BEGIN setconfig DEVDRV_INTERFACE=5;
    < |setconfig|DEVDRV_INTERFACE|5|
    load devid=0x3c; memory=file;
    < 7508 CONTROL BEGIN load devid=0x3c; memory=file;
    < 7501 CONTROL ON
    osDllLoad[45] library name = libqc98xx.so
    osDllLoad[76] FullName = /tmp/libqc98xx.so
    < 6606 INFO Link control functions loaded for "Qc9K" from "/tmp/libLinkQc9K.so".
    < 6506 INFO Device control functions loaded for "Qc98xx" from "/tmp/libqc98xx.so". Version "1.0" built on "120301121212".
    < 7504 INFO |set|DeviceName|Qc98xx|
    < 7504 INFO |set|DeviceVersion|1.0|
    < 7504 INFO |set|DeviceBuildDate|120301121212|
    < 7504 INFO |set|DeviceLibrary|/tmp/libqc98xx.so|
    /tmp/nart.out: ioctl: No such device

    2016-01-05 10:40
    • lics

      /dev下面有dk0,dk1吗?

      2016-01-05 10:42
      • jihj

        都有的,每次加载到5g部分就出现这个问题

        2016-01-05 10:52
        • lics

          板子上运行的完整命令发一下吧,11ac的确实比较麻烦。

          2016-01-05 10:59
          • jihj

            2.4g:
            connect 192.168.1.1
            load i=0;memory=flash
            5g:
            connect i=1;192.168.1.1:2391
            setconfig i=1;EEPROM_FILE=boardData_2_QC98XX_cus223_gld.bin
            setconfig i=1;DEVDRV_INTERFACE=5
            load i=1; devid=0x3c; memory=file
            这就是原厂提供的命令,原厂固件这样就输入命令就没有问题,现在我们是移植到openwert就出现问题了

            2016-01-05 11:13
          • lics

            PC侧的命令看起来都是OK的,待测板那边的命令也是原厂提供的吧?

            2016-01-05 12:43
  41. 0楼
    jihj

    待测板这边是没有命令的,直接通过PC端输入命令进行校验

    2016-01-05 13:13
    • lics

      待测板那边应该是有很多命令才对,如果待测板命令OK,那么就是art.ko的问题。

      2016-01-05 13:21
      • jihj

        我们这边就是先在openwert上编译生成art.ko,然后在加载art.ko模块,然后再pc侧输入命令进行无线叫校准的,
        下面是加载art.ko模块的信息,麻烦Alex看看有什么问题吗

        DK::Module init
        CHIP REV ID: 1150
        Writing value 0x6 to PCI_2 command register
        Bit 16 of 0xb8280000 need not be reset
        dk_dev_init::status after register_chrdev(dk) = 0
        DK::Init dev table
        Base Phsycal address :0x18100000
        DK::Add client 0
        dk:: the irq num 47
        dk::dev point irq 0
        DK::Reg phy addr = 18100000 vir Addr = b8100000
        DK::Irq = 2f
        DK::Allocated 0x200000 bytes memory
        DK::memory vir Addr = 86000000 phy Addr = 6000000
        DK::Disable the interrupts and reset the device
        DK::Reg read @ 0xb8104020 : 0x0000
        Device Mac Rev : 0x0
        DK::Bus module init
        DK::MODULE
        DK::Pci probe
        Base Phsycal address :0x12000000
        Base Phsycal address :0x00000000
        DK::num bars = 1
        DK::Vendor Id=3c168c:Device id = 0
        Class code = 2:start search index=0
        DK::Add client 1
        DK:: Requesting MEM region=12000000:range=2097152
        dk:: the irq num 40
        dk::dev point irq 0
        DK::Reg phy addr = 12000000 vir Addr = b2000000
        DK::Irq = 28
        DK::Allocated 0x200000 bytes memory
        DK::memory vir Addr = 85600000 phy Addr = 5600000
        DK::Disable the interrupts and reset the device
        DK::Reg read @ 0xb2004020 : 0x0002
        Device Mac Rev : 0x2
        DK::Reg write @ 0xb2000024 : 0x0000
        DK::Reg write @ 0xb2000024 : 0x0000
        DK::Reg write @ 0xb200704c : 0x0001
        DK::Reg write @ 0xb200704c : 0x0001
        DK::Reg write @ 0xb2007040 : 0x0000
        DK::Reg write @ 0xb2007040 : 0x0000
        DK::Reg write @ 0xb2007040 : 0x0001
        DK::Reg write @ 0xb2007040 : 0x0001
        DK::Reg read @ 0xb2007044 : 0x0000
        Device Status is : 0x0
        DK::bus_module_init:status=0 from dkpci_driver
        change to ART mode.
        5108 INFO Waiting for connection from control process.
        5108 INFO Waiting for connection from control process.

        2016-01-05 13:38
        • lics

          建议看一下ART文档,11ac情况下,待测板那边需要输入很多命令的,与之前的都不太一样。

          2016-01-05 13:47
          • jihj

            好的,谢谢

            2016-01-05 13:56
  42. 0楼
    colin

    Lics,新年好!
    请教一个跟硬件有关系的问题
    同样的9531硬件,我用原厂的软件进行射频校准的时候发现EVM值达到-32.3(无线信号质量非常好)
    用自己做的软件进行射频校准的时候发现EVM值是-17.7(无线信号质量非常差)
    分析认为可能是软件的问题
    EVM理论上至少要达到-25,工厂出厂的标准是-28

    请教软件上哪些修改会影响到EVM的指标?
    注:软件我没有用QSDK,用的是开源的OPENWRT代码。。

    2016-02-20 16:18
    • lics

      新年好!

      这种问题我没遇到过,可能是art.ko的问题。试过手动tx99吗?

      2016-02-22 08:38
      • colin

        怀疑是ART.KO模块的问题,移植原厂提供的ART.KO模块,/etc/init.d/art start正常
        用atheros Radio Test 2软件load的时候出现如下错误信息:
        admin@ZK-S5:/# /etc/init.d/art start
        [ 67.080000] br-lan: port 2(wlan0) entered disabled state
        [ 67.090000] device wlan0 left promiscuous mode
        [ 67.100000] br-lan: port 2(wlan0) entered disabled state
        [ 67.110000] ath9k: ath9k: Driver unloaded
        module is not loaded
        module is not loaded
        module is not loaded
        module is not loaded
        module is not loaded
        module is not loaded
        [ 67.220000] CHIP REV ID: 160
        [ 67.230000] dk_dev_init::status after register_chrdev(dk) = 0
        [ 67.230000] Base Phsycal address :0x18100000
        [ 67.240000] irp=47
        [ 67.240000] DK::Add client 0
        [ 67.240000] DK::Reg phy addr = 18100000 vir Addr = b8100000
        [ 67.250000] DK::Irq = 2f
        [ 67.250000] DK::Allocated 0x200000 bytes memory
        [ 67.260000] DK::memory vir Addr = 82000000 phy Addr = 2000000
        admin@ZK-S5:/# [ 94.600000] DK::Regsitering client 0
        [ 94.610000] Unhandled kernel unaligned access[#1]:
        [ 94.610000] CPU: 0 PID: 2463 Comm: nart.out Not tainted 3.18.23 #28
        [ 94.610000] task: 838d4e88 ti: 82b3a000 task.ti: 82b3a000
        [ 94.610000] $ 0 : 00000000 00000001 8327c0e4 82b5c3c0
        [ 94.610000] $ 4 : 82b5c3c0 00000001 7f862fd8 7f862fd8
        [ 94.610000] $ 8 : 00000001 84080018 8010c4d4 6e672063
        [ 94.610000] $12 : 7f862fa8 779713a0 7f862bb0 7f862fc8
        [ 94.610000] $16 : 82b5c3c0 7f862fd8 82b3c2b0 00000001
        [ 94.610000] $20 : 00000005 ffffffff 00000000 00432450
        [ 94.610000] $24 : 779951d0 779517d0
        [ 94.610000] $28 : 82b3a000 82b3be10 00440000 8010c3c8
        [ 94.610000] Hi : 00000369
        [ 94.610000] Lo : 00001be5
        [ 94.610000] epc : 8327c0fc 0x8327c0fc
        [ 94.610000] Not tainted
        [ 94.610000] ra : 8010c3c8 do_vfs_ioctl+0x4d0/0x5dc
        [ 94.610000] Status: 1000f403 KERNEL EXL IE
        [ 94.610000] Cause : 00800010
        [ 94.610000] BadVA : 00000079
        [ 94.610000] PrId : 00019374 (MIPS 24Kc)
        [ 94.610000] Modules linked in: art ath9k_common pppoe ppp_async nf_tables_inet iptable_nat ath9k_hw ath pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_rbtree nft_meta nft_log nft_limit nft_hash nft_exthdr nft_ct nft_counter nft_chain_route_ipv6 nft_chain_route_ipv4 nf_tables_ipv6 nf_tables_ipv4 nf_tables nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 mac80211 iptable_raw iptable_mangle iptable_filter ipt_REJECT ipt_MASQUERADE ipt_ECN ip_tables cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_quota xt_pkttype xt_physdev xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_id xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_addrtype xt_TCPMSS xt_REDIRECT xt_NETMAP xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY x_tables slhc nft_reject nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_nat_masquerade_ipv4 nf_nat_ftp nf_nat nf_log_ipv4 nf_log_common nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_ftp crc_ccitt compat atl2 atl1 act_connmark nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_hfsc sch_ingress msdos ifb tun vfat fat ntfs nls_iso8859_1 nls_cp437 ipv6 arc4 crypto_blkcipher usb_storage ohci_platform ohci_hcd ehci_platform ehci_hcd sd_mod scsi_mod gpio_button_hotplug ext4 jbd2 mbcache usbcore nls_base usb_common crc16 mii crypto_hash [last unloaded: ath9k]
        [ 94.610000] Process nart.out (pid: 2463, threadinfo=82b3a000, task=838d4e88, tls=77b61750)
        [ 94.610000] Stack : 83bc60d0 835a7aa0 00000002 00000000 82b3bef0 00000001 828df000 ffffff9c
        00000000 ffffffff 00000000 00432450 00440000 80109da0 82ab4790 83bfc934
        83bfc900 00000001 00000041 00000fff 83bc60d0 835a7aa0 00000003 0023eb19
        828df015 8035e7a8 00000000 83458908 82b3c2b0 00000101 00000004 82b5c3c0
        7f862fd8 82b3c2b0 00000001 8010c3c8 00000012 801152d8 0000000a 00000004
        ...
        [ 94.610000] Call Trace:
        [ 94.610000] [] 0x8327c0fc
        [ 94.610000]
        [ 94.610000]
        Code: afb0007c afbf008c afb10080 00c09821 00e08021 0cc9f1d3 02202021 14400004
        [ 94.890000] ---[ end trace 610b498738285dd4 ]---
        [ 94.910000] DK::Unregsitering client 0

        2016-02-24 09:23
        • lics

          这个肯定是art.ko的问题了,你也可以分析一下/etc/init.d/art 脚本,我还没移植过9531的art,过段时间可能会接触到。

          2016-02-24 14:53
  43. 0楼
    shizhai

    @lics,你好,我近期也在做openwrt下的校验,硬件是AR9344(2.4G)+AR9380(5G),在openwrt下能正常使用WIFI(ART分区使用的是网上下载的(AR9344+AR9382)),目前遇到的问题与现象如下:
    1. 程序加载正常
    2. 2.4G测试正常
    3. 5G测试报错
    另外:能否单独测试minipci AR9380的5G呢?(仅运行./nart.out -instance 1 -port 2391 -console),如果我同时加载了instance 0 与 instance 1,那么在artgui.exe里面可能看到5G的相关设置,但是直接配置没有任何输出,并且硬件重启或者死机,单独测试的步骤与错误信息如下:
    运行驱动加载脚本:
    ./module.sh
    ./nart.out -instance 1 -port 2391 -console
    artgui.exe 仅加载Golden192.168.3.1:2391
    artgui.exe出现如下信息:
    ******************************************
    * INITIALIZATION DONE...PLEASE, CONTINUE *
    ******************************************
    7170 INFO CartVersion: 2.29;CartBuildDate: 120515; CartBuildTime: 100000
    5000 INFO Trying to connect to nart[1] on 192.168.3.1:2391.
    5001 INFO Connected to nart[1] on 192.168.3.1:2391.
    7300 INFO Command in progress. Try "pause", "continue", or "stop". "load" command queued for later processing.
    [1] 6010 INFO No calibration information found.
    4047 INFO |load|devid|memaddr|memsize|mac|
    4047 INFO |load|abcd|6400000|200000|00:02:03:04:05:06|
    [1] 6024 INFO Free memory for initialization and calibration is 991 (1023 - 32) bytes.
    [1] 6000 INFO Loaded card.
    5013 ERROR No connection to nart[0].
    4047 INFO |get|OpFlags|0x3|
    4047 INFO |get|Mask.Tx|0x7|
    4047 INFO |get|Mask.Rx|0x7|
    nart.out出现如下信息:
    Setting instance to 1
    5108 INFO Waiting for connection from control process.
    5109 INFO Accepted control connection from client 0.
    7504 INFO |set|NartVersion|2.27|
    7504 INFO |set|NartBuildDate|120201100000|
    7504 INFO |set|devid||
    7504 INFO |set|mac||
    7504 INFO |set|customer||
    > hello
    < 7508 CONTROL BEGIN hello
    < 7504 INFO |set|NartVersion|2.27|
    < 7504 INFO |set|NartBuildDate|120201100000|
    < 7504 INFO |set|devid||
    < 7504 INFO |set|mac||
    < 7504 INFO |set|customer||
    load devid=-1; caldata=auto;
    < 7508 CONTROL BEGIN load devid=-1; caldata=auto;
    < 7501 CONTROL ON
    deviceInit devIn[ 629.330000] DK::Regsitering client 1
    dex=0 device_fn=[ 629.330000] DK::Reg write @ 0xb0000024 : 0x0000
    0 pdkInfo=0
    Ope[ 629.340000] DK::Reg write @ 0xb000704c : 0x0001
    ning device /dev[ 629.340000] DK::Reg write @ 0xb0007040 : 0x0000
    /dk1
    [ 629.350000] DK::Reg write @ 0xb0007040 : 0x0001
    [ 629.360000] Device Status is : 0x11
    pDrv Maj Ver=1:Min Ver=2
    driverVer Maj Ver=1:Min Ver=2
    rpa=10000000:rr=20000:nB=1:mpa=6400000:ms=200000:irq=28:dma_addr=0
    reg vir addr[0]=774d4000
    reg range[0]=20000
    memsize=200000:mem phy addr = 6400000: mem vir addr=772d4000
    Num bars = 1
    + f2MapAddress = 10000000
    + aregPhyAddr[0]= 10000000
    + aregVirAddr[0]= 774d4000
    + aregRange[0]= 00020000
    + Allocated memory in the driver.
    + VirtAddress = 772d4000
    + PhysAddress = 06400000
    + Size = 00200000
    Could not open flash
    : No such file or directory
    ath_hal_attach duration: 7=-312536460--312536467 ms
    < 6010 INFO No calibration information found.
    < 7502 CONTROL OFF
    < 7503 INFO |load|devid|memaddr|memsize|mac|
    < 7504 INFO |load|abcd|6400000|200000|00:02:03:04:05:06|
    < 7504 INFO |set|devid|abcd|
    < 7504 INFO |set|mac|00:02:03:04:05:06|
    < 7504 INFO |set|customer||
    < 6024 INFO Free memory for initialization and calibration is 991 (1023 - 32) bytes.
    < 6000 INFO Loaded card.
    get opflags;
    < 7508 CONTROL BEGIN get opflags;
    < 7504 INFO |get|OpFlags|0x3|
    get txMask;
    < 7508 CONTROL BEGIN get txMask;
    < 7504 INFO |get|Mask.Tx|0x7|
    get rxMask;
    < 7508 CONTROL BEGIN get rxMask;
    < 7504 INFO |get|Mask.Rx|0x7|
    < 7506 CONTROL DONE get rxMask;

    自动加载脚本(module.sh):
    #!/bin/bash
    rmmod ath9k
    rmmod ath
    rmmod ath9k_common
    rmmod ath9k_hw
    [[ -n $(lsmod | grep 'art') ]] && rmmod art
    sleep 1
    insmod art.ko
    sleep 1
    mknod /dev/dk0 c 63 0
    mknod /dev/dk1 c 63 1
    加载信息:
    [ 120.170000] br-lan: port 3(wlan0) entered disabled state
    [ 120.170000] device wlan0 left promiscuous mode
    [ 120.180000] br-lan: port 3(wlan0) entered disabled state
    [ 120.210000] br-lan: port 2(wlan1) entered disabled state
    [ 120.220000] device wlan1 left promiscuous mode
    [ 120.220000] br-lan: port 2(wlan1) entered disabled state
    [ 120.250000] ath9k: ath9k: Driver unloaded
    kmod: unloading the module failed
    [ 121.360000] CHIP REV ID: 2122
    [ 121.360000] Writing value 0x6 to Merlin PCI command register
    [ 121.370000] Resetting bit 16 of VIRIAN register 0xb80f0000
    [ 121.380000] dk_dev_init::status after register_chrdev(dk) = 0
    [ 121.380000] Base Phsycal address :0x18100000
    [ 121.390000] DK::Add client 0
    [ 121.390000] DK::Reg phy addr = 18100000 vir Addr = b8100000
    [ 121.400000] DK::Irq = 27
    [ 121.400000] DK::Allocated 0x200000 bytes memory
    [ 121.400000] DK::memory vir Addr = 86e00000 phy Addr = 6e00000
    [ 121.410000] IRSHAD!!!!!!
    [ 121.410000] IRSHAD2!!!!!!
    [ 121.410000] Base Phsycal address :0x10000000
    [ 121.420000] Base Phsycal address :0x00000000
    [ 121.420000] Class code = 2:start search index=0
    [ 121.430000] DK::Add client 1
    [ 121.430000] DK:: Requesting MEM region=10000000:range=131072
    [ 121.440000] DK::Reg phy addr = 10000000 vir Addr = b0000000
    [ 121.440000] DK::Irq = 28
    [ 121.440000] DK::Allocated 0x200000 bytes memory
    [ 121.450000] DK::memory vir Addr = 86400000 phy Addr = 6400000
    [ 121.460000] DK::Reg write @ 0xb0000024 : 0x0000
    [ 121.460000] DK::Reg write @ 0xb000704c : 0x0001
    [ 121.460000] DK::Reg write @ 0xb0007040 : 0x0000
    [ 121.470000] DK::Reg write @ 0xb0007040 : 0x0001
    [ 121.470000] Device Status is : 0x11
    [ 121.480000] DK::bus_module_init:status=0 from dkpci_driver

    2016-02-25 11:06
    • shizhai

      编译环境与源码版本:
      art源码版本为:art2_ver_2_28_6ap_src
      编译环境为barrier_breaker,linux-3.10.49
      编译nart.out: make -f makefile.nart clean all
      编译art.ko:make -f makefile.artmod clean wasp_osprey

      2016-02-25 11:19
    • lics

      看起来是/dev下面没有caldata造成的,你手动mknod一个试试。

      2016-02-25 11:38
      • shizhai

        @lics,非常感谢,已经解决了。
        步骤:
        1. 查看设备主设备号
        2. 查看ART分区号作为次设备号
        3. 创建相关分区

        2016-02-25 19:51
        • lics

          解决了就好 ^_^

          2016-02-25 19:59
          • shizhai

            AR9344+AR8327+AR9380的硬件配置能用art2_ver_2_28_6ap_src吗?我编译之后貌似5G不能校验呢?错误始终为功率出不来。

            2016-07-25 19:28
          • lics

            把评论中所有讨论的内容都看过之后,或许你就会找到答案。^_^

            2016-07-26 07:27
  44. 0楼
    jammy

    @lics,我用ar7161做的主控板,通过minipci接口接了两块WiFi网卡,系统用的是openwrt,最近有需要控制无线网卡为单载波发射状态,我用你说的art方法可以吗?

    2016-03-01 19:41
    • lics

      不行的,AR7161芯片太老了,只能使用老版本的art驱动与老版本的PC测art。

      2016-03-01 19:51
    • jammy

      追问,根目录下的makefile.nart没有kdir和CC选项,应该怎么改呢?

      2016-03-01 20:14
      • lics

        什么版本的ART?

        2016-03-01 20:37
        • jammy

          我用的是 art2_ver_4_9_815.tar.bz2版本

          2016-03-02 09:44
          • lics

            看了一下,这个版本应该是修改一下根目录的makefile.nart,指定toolchain及kernel路径,然后在根目录下直接make -f makefile.nart就可以。

            2016-03-02 10:00
          • jammy

            当我编译art.ko时还出现了
            “trunk/feeds/art2_ver_4_9_815/driver/linux/modules/dk_pci_bus.c:249:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dk_id_tbl'
            static struct pci_device_id __devinitdata dk_id_tbl[] = {
            ^
            /home/qin/OpenWrt/trunk2015/trunk/feeds/art2_ver_4_9_815/driver/linux/modules/dk_pci_bus.c:284:13: error: 'dk_id_tbl' undeclared here (not in a function)
            id_table: dk_id_tbl,
            ^
            ”的问题,还麻烦帮忙啦

            2016-03-02 10:26
        • jammy

          但是在根目录下的makefile.nart里面貌似没有指定toolchain及kernel路径的地方啊,我这方面比较菜,还请大神继续指导~

          2016-03-02 10:29
          • lics

            你先自己看一下,我忙完手头的工作再来帮你看这个问题。

            2016-03-02 11:19
  45. 0楼
    search

    请问下art2_ver_4_9_815这个源码在哪里 我用的是U11 sdk

    2016-03-11 18:39
    • lics

      正常的话都是需要向高通索要的。

      2016-03-11 20:49
  46. 0楼
    liang

    请教一个问题,我最近做ar9344出5g,有些板子load card时会大概率load 不成功,nart.out进程没有了,板子都是K过值的,重新开启art也是经常load不成功的,导致的原因有哪些呢?

    2016-04-19 20:04
  47. 0楼
    jame

    大神.~~~我编译出现这样的问题,请大神指教
    /home/edna/art2/driver/linux/modules/dk_pci_bus.c:249:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dk_id_tbl'
    static struct pci_device_id __devinitdata dk_id_tbl[] = {
    ^
    /home/edna/art2/driver/linux/modules/dk_pci_bus.c:284:13: error: 'dk_id_tbl' undeclared here (not in a function)
    id_table: dk_id_tbl,
    ^
    make[2]: *** [/home/edna/art2/driver/linux/modules/dk_pci_bus.o] 错误 1
    make[1]: *** [_module_/home/edna/art2/driver/linux/modules] 错误 2
    make[1]:正在离开目录 `/home/edna/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.14.25'
    make: *** [default] 错误 2

    2016-05-14 21:41
    • woody

      我遇到过类似问题,原因是我使用了default编译选项,你可以试试不用default

      2016-05-31 18:49
  48. 0楼
    woody

    请教一下,在测试结束后,是不是应该删除nart.bin与art.bin,就是说恢复到正常状态需要做的工作,这些工作 pc端的软件是不是有类似的功能,还是说需要芯片系统端完成这些恢复?

    2016-05-31 18:47
  49. 0楼
    lics

    正常产品出货时都不会带art.ko与nart.out,除非是特殊软件版本。

    需要在设备侧完成这些恢复,PC端没有这个功能。

    2016-05-31 19:25
  50. 0楼
    hustwu

    大神,我硬件用的是qca9557,想同时出2.4G和5G,用的是art2工具,调试2.4G正常,但是5G怎么都调不出来,请教大神是什么导致的

    2016-06-19 12:32
    • lics

      具体是什么现象呢?

      2016-06-20 08:18
      • hustwu

        大神你好,经过这几天测试,发现其实基带有出来,但是很微弱,最大情况下经过PA放大之后才-14dBm,之前从前面测一直没测到所以以为没有,而且使用TX power发送时输出功率最大只能到-15dbm,而用TX gain设为100时输出功率才可以达到-5dbm,串口打印信息如下,请帮忙分析下,谢谢
        ....> STOP
        42980 Stop ON OFF 42980 Done
        < 7502 CONTROL OFF
        chain: 0 nfc: -112 nfcal: 1 nfpower: 1 nfTemp: -6500
        chain: 1 nfc: -118 nfcal: 1 nfpower: 1 nfTemp: -6500
        LinkTransmitStatPrint(): temp 134 _LinkChipTemperature 0
        < 7503 INFO |tx|frequency|tp|txchain|iss|att|pdgain|txgain|rate|pl|pc|agg||correct|throughput|error|fifo|excess|retry|dretry|rssi|rssi00|rssi01|rssi02|rssi10|rssi11|rssi12|txgi|dacg|byte|duration|temp|volt|
        < 7504 INFO |tx|5180|-1.0|2|0|0|3|60|54|1500|-1|0||42981|40983|0|0|0|0.0:42981|0.0:42981|0.0|0.0|0.0|0.0:10|0.0|0.0|0.0|17|3|63439956|12383125|134|0|
        tx f=5180;ir=0;gi=0;txch=2;rxch=7;pc=-1;pl=1500;bc=1;retry=0;att=0;iss=0;stat=3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=0;ht40=0;r=54;pcdac=70;pdgain=3;
        < 7508 CONTROL BEGIN tx f=5180;ir=0;gi=0;txch=2;rxch=7;pc=-1;pl=1500;bc=1;retry=0;att=0;iss=0;stat=3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=0;ht40=0;r=54;pcdac=70;pdgain=3;
        < 6004 CONTROL Device reset successfully. frequency=5180, ht40=20, tx chain=2, rx chain=3.
        < 7500 CONTROL OK
        _LinkTpcm 0
        using gain entry 19
        Error::PCI Config read32 failed::co.value=0
        TxGainIndex=19 TxDacGain=2
        OFF OFFTxMany=-1 TxStatusMany=-1 TxBatchMany=200 TxDescriptorMany=400
        npattern=0 pattern=44fb70
        npattern=64 pattern=2b0cd08c
        pattern: ff 87 b8 59 b7 a1 cc 24 57 5e 4b 9c e e9 ea 50 2a be b4 1b b6 b0 5d f1 e6 9a e3 45 fd 2c 53 18 c ca c9 fb 49 37 e5 a8 51 3b 2f 61 aa 72 18 84 2 23 23 ab 63 89 51 b3 e7 8b 72 90 4c e8 fb c0
        Packet: 8 0 0 0 ff ff ff ff ff ff 20 22 22 22 22 2 50 55 55 55 55 5 0 0 ff 87 b8 59 b7 a1 cc 24 57 5e 4b 9c e e9 ea 50 2a be b4 1b b6 b0 5d f1 e6 9a e3 45 fd 2c 53 18 c ca c9 fb

        2016-06-22 11:29
        • lics

          将tx gain table设置为no xpa那种,再看看

          2016-06-22 11:34
          • hustwu

            不行哦,No XPA 模式是没有外置PA的情况吧,这个基带出来太小,没有外置PA就测不到了,而且重新导入校准数据后,load卡时老是出错,cannot connect to nart

            2016-06-22 17:24
  51. 0楼
    Linker

    请大神给看看我的问题:

    芯片: AR9331 OPENWRT 内核:linux-3.18.23
    art源码: art2_ver2_23.1ap_src_all
    ART工具版本:art2_ver_2_28_7BIN

    连接后启动发射模式后出现 : Device reset error 14

    < 7504 INFO |channel|6060|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6060|0|0|0|1|0|0|0|0|0|
    < 7504 INFO |channel|6080|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6080|0|0|0|0|1|0|0|0|0|
    tx f=2412;ir=0;gi=0;txch=1;rxch=7;pc=-1;pl=1000;bc=1;retry=0;att=0;iss=0;stat=3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    < 7508 CONTROL BEGIN tx f=2412;ir=0;gi=0;txch=1;rxch=7;pc=-1;pl=1000;bc=1;retry=0;att=0;iss=0;stat=3;ifs=1;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    < 6018 WARNING Device reset error 14. frequency=2412, ht40=20, tx chain=1, rx chain=1. Retryin[ 4562.610000] DK:: dk_release
    [ 4562.610000] DK::Unregsitering client 0
    [ 4562.620000] DK::Disable the interrupts and reset the device
    [ 4562.620000] DK::Reg read @ 0xb8104020 : 0x2000ff
    [ 4562.630000] Device Mac Rev : 0x2000ff
    [ 4562.630000] DK::Reg write @ 0xb8100024 : 0x0000
    [ 4562.640000] DK::Reg write @ 0xb81`0024 : 0x0000
    [ 4562.640000] Device Status is : 0x11

    在代码中具体是这里有个超时错误,不知道根本原因是什么,谁给指点一下是什么问题?

    /* Calibrate the AGC */
    OS_REG_WRITE(ah, AR_PHY_AGC_CONTROL,
    OS_REG_READ(ah, AR_PHY_AGC_CONTROL) |
    AR_PHY_AGC_CONTROL_CAL);

    /* Poll for offset calibration complete */
    if (!ath_hal_wait(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL, 0,
    AH_WAIT_TIMEOUT)) {
    HDPRINTF(ah, HAL_DBG_CALIBRATE,
    "%s: offset calibration failed to complete in 1ms; "
    "noisy environment?n", __func__);
    return AH_FALSE;
    }
    return AH_FALSE;

    2016-07-05 15:38
    • lics

      看上去应该是没有art分区信息造成的,拿一个校准好的板子,把校准信息dd出来,然后写在这个板子中试试。

      2016-07-05 18:42
      • Linker

        大神,这个问题我解决了。art2_ver2_23.1ap_src_all这个版本的搞了很久都没搞好,后来用了了个高点的版本从供应商那拿的就好了。 ^-^.

        现在的问题是发出的功率太弱,log里面有如下的信息:
        Could not open flash
        : No such file or directory
        HAL:: Using Cal data from Driver Default Settings
        MyRegisterWrite , address=b8040030, value=71000
        ath_hal_attach duration: 18=1230770342-1230770324 ms
        < 6010 INFO No calibration information found.
        < 7502 CONTROL OFF
        这个是不是说我板上并没有校准的文件,然后程序自个用了个默认的数据, 这里是不是有什么问题呢? (需要创建caldata文件吗? 这个文件从哪取得呢?)

        2016-07-06 11:38
        • lics

          /dev下面有caldata吗?最好是用一个带有校准信息的板子,将其校准信息dd出来,然后写入没有校准信息的板子,或者直接运行calibration。

          2016-07-06 11:44
          • Linker

            OpenWRT系统下似乎自己并没有这个caldata文件。就是说我要找个“好"的板子把/dev/caldata 文件先拷过来吗?

            2016-07-06 11:52
  52. 0楼
    lics

    这个需要手动创建的,caldata(或者art)通常是Flash的最后一个分区,你要看一下caldata(或者art)是mtdblock多少,例如我的板子是7,那么就在/dev/下创建caldata

    mknod caldata b 31 7

    对于有校准信息的板子,创建完成caldata之后,就可以使用dd命令将caldata信息导出,再将这个信息写入未校准的板子,就可以了。当然,还有其他的方法,需要配合图文说明,比较麻烦,这个是相对简单的一种方式。

    2016-07-06 12:00
  53. 0楼
    Linker

    照着这个做,果然功率上来了 ^_^

    2016-07-06 13:46
    • lics

      嗯,这就对了。

      2016-07-06 15:00
      • Linker

        (void) ioctl (fd, MEMUNLOCK, &erase_info);
        if (ioctl (fd, MEMERASE, &erase_info) != 0)
        {
        fprintf(stderr, "flash erase errorn");
        close(fd);
        return;
        }

        我现在已经能做完TX RX的测试了,但是在写入FLASH的时候 art报错,是flash erase error. 源代码在上面这段,我暂时也看不出什么问题,大神有没有经验是什么地方有问题或者怎么调试?

        2016-07-18 16:47
        • lics

          去掉art分区的只读属性了吗?默认应该是只读的。

          2016-07-18 17:16
          • Linker

            确实是 art分区默认是只读,要改firmware代码 ~~~

            2016-07-20 16:12
          • Linker

            还有最后一个问题, 我的ART unload 卡的时候 总是有 5007 ERROR Closed connection to nart[0]。 不过没什么致命的,就是看的不爽, 大神有遇见过吗?

            2016-07-20 16:25
  54. 0楼
    lics

    改firmware代码很简单的,去掉art分区的ro属性即可,Google一下,就能找到。unload card时报错不用理会。

    2016-07-20 20:30
  55. 0楼
    ivanyu

    各位大神好, 我用art2_ver_2_28_6ap_src, 和art2_ver_2_67BIN,出现的问题与Linker一样, 不知是不是版本问题啊。 我的平台也是ar9331. 主要log如下, 求指点, 谢谢, 谢谢
    < 7504 INFO |channel|5920|0|0|0|0|1|0|0|0|0|
    < 7504 INFO |channel|5940|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|5940|0|0|0|1|0|0|0|0|0|
    < 7504 INFO |channel|5960|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|5960|0|0|0|0|1|0|0|0|0|
    < 7504 INFO |channel|5980|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|5980|0|0|0|1|0|0|0|0|0|
    < 7504 INFO |channel|6000|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6000|0|0|0|0|1|0|0|0|0|
    < 7504 INFO |channel|6020|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6020|0|0|0|1|0|0|0|0|0|
    < 7504 INFO |channel|6040|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6040|0|0|0|0|1|0|0|0|0|
    < 7504 INFO |channel|6060|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6060|0|0|0|1|0|0|0|0|0|
    < 7504 INFO |channel|6080|0|0|1|0|0|0|0|0|0|
    < 7504 INFO |channel|6080|0|0|0|0|1|0|0|0|0|
    load caldata=flash;
    < 7508 CONTROL BEGIN load caldata=flash;
    < 7501 CONTROL ON
    < 7502 CONTROL OFF
    Error::PCI Config read32 failed::co.value=0
    00000000: deadbeef
    < 7503 INFO |load|devid|memaddr|memsize|mac|
    < 7504 INFO |load|dead|2000000|200000|00:02:03:04:05:06|
    Error::PCI Config read32 failed::co.value=0
    00000000: deadbeef
    < 7504 INFO |set|devid|dead|
    < 7504 INFO |set|mac|00:02:03:04:05:06|
    < 7504 INFO |set|customer||
    < 6024 INFO Free memory for initialization and calibration is 479 (511 - 32) bytes.
    < 6000 INFO Loaded card.
    hello
    < 7508 CONTROL BEGIN hello
    < 7504 INFO |set|NartVersion|2.27|
    < 7504 INFO |set|NartBuildDate|120201100000|
    Error::PCI Config read32 failed::co.value=0
    00000000: deadbeef
    < 7504 INFO |set|devid|dead|
    < 7504 INFO |set|mac|00:02:03:04:05:06|
    < 7504 INFO |set|customer||
    get opflags;
    < 7508 CONTROL BEGIN get opflags;
    < 7504 INFO |get|OpFlags|0x3|
    hello
    < 7508 CONTROL BEGIN hello
    < 7504 INFO |set|NartVersion|2.27|
    < 7504 INFO |set|NartBuildDate|120201100000|
    Error::PCI Config read32 failed::co.value=0
    00000000: deadbeef
    < 7504 INFO |set|devid|dead|
    < 7504 INFO |set|mac|00:02:03:04:05:06|
    < 7504 INFO |set|customer||
    get mac;
    < 7508 CONTROL BEGIN get mac;
    < 7504 INFO |get|Mac|00:02:03:04:05:06|
    get customer;
    < 7508 CONTROL BEGIN get customer;
    < 7504 INFO |get|Customer||
    hello
    < 7508 CONTROL BEGIN hello
    < 7504 INFO |set|NartVersion|2.27|
    < 7504 INFO |set|NartBuildDate|120201100000|
    Error::PCI Config read32 failed::co.value=0
    00000000: deadbeef
    < 7504 INFO |set|devid|dead|
    < 7504 INFO |set|mac|00:02:03:04:05:06|
    < 7504 INFO |set|customer||
    set ssid=a121;
    < 7508 CONTROL BEGIN set ssid=a121;
    < 7504 INFO |set|SSID|0xa121|
    set svid=168c;
    < 7508 CONTROL BEGIN set svid=168c;
    < 7504 INFO |set|SVID|0x168c|
    set devicetype=4;
    < 7508 CONTROL BEGIN set devicetype=4;
    < 7504 INFO |set|DeviceType|0x4|
    set regdmn=0,0x1f;
    < 7508 CONTROL BEGIN set regdmn=0,0x1f;
    < 7504 INFO |set|RegulatoryDomain|0x0,0x1f|
    set txmask=1;
    < 7508 CONTROL BEGIN set txmask=1;
    < 7504 INFO |set|Mask.Tx|0x1|
    set rxmask=1;
    < 7508 CONTROL BEGIN set rxmask=1;
    < 7504 INFO |set|Mask.Rx|0x1|
    set opflags=2;
    < 7508 CONTROL BEGIN set opflags=2;
    < 7504 INFO |set|OpFlags|0x2|
    set swregenable=1;
    < 7508 CONTROL BEGIN set swregenable=1;
    < 7504 INFO |set|FeatureEnable.SwitchingRegulator|1|
    set antCtrlChain2g=150,150,150;
    < 7508 CONTROL BEGIN set antCtrlChain2g=150,150,150;
    < 7504 INFO |set|2GHz.AntennaControlChain|0x150,0x150,0x150|
    set txgainTable=1;
    < 7508 CONTROL BEGIN set txgainTable=1;
    < 7504 INFO |set|GainTable.Tx|0x1|
    set rxgainTable=1;
    < 7508 CONTROL BEGIN set rxgainTable=1;
    < 7504 INFO |set|GainTable.Rx|0x1|
    set temperatureCompensation=1;
    < 7508 CONTROL BEGIN set temperatureCompensation=1;
    < 7504 INFO |set|FeatureEnable.TemperatureCompensation|1|
    set tempSlope2g=30;
    < 7508 CONTROL BEGIN set tempSlope2g=30;
    < 7504 INFO |set|2GHz.TemperatureSlope|+30|
    set spurchans2g=2464;
    < 7508 CONTROL BEGIN set spurchans2g=2464;
    < 7504 INFO |set|2GHz.Spur|2464|
    set PapdEnable=1;
    < 7508 CONTROL BEGIN set PapdEnable=1;
    < 7504 INFO |set|FeatureEnable.PaPredistortion|1|
    set papd2gRateMaskHt20=0x080000e0;
    < 7508 CONTROL BEGIN set papd2gRateMaskHt20=0x080000e0;
    < 7504 INFO |set|2GHz.PaPredistortion.Ht20|0x80000e0|
    set papd2gRateMaskHt40=0x080000e0;
    < 7508 CONTROL BEGIN set papd2gRateMaskHt40=0x080000e0;
    < 7504 INFO |set|2GHz.PaPredistortion.Ht40|0x80000e0|
    set antDivCtrl=0x09;
    < 7508 CONTROL BEGIN set antDivCtrl=0x09;
    < 7504 INFO |set|AntennaDiversityControl|0x9|
    set TuningCapsEnable=0;
    < 7508 CONTROL BEGIN set TuningCapsEnable=0;
    < 7504 INFO |set|FeatureEnable.TuningCaps|0|
    set caltgtfreqcck=2412,2472;
    < 7508 CONTROL BEGIN set caltgtfreqcck=2412,2472;
    < 7504 INFO |set|2GHz.Target.Frequency.Cck|2412,2472|
    set caltgtpwrcck=v.(17,17,17,17),f.0;
    < 7508 CONTROL BEGIN set caltgtpwrcck=v.(17,17,17,17),f.0;
    < 7504 INFO |set|2GHz.Target.Power.Cck[0]|17.0,17.0,17.0,17.0|
    set caltgtpwrcck=v.(17,17,17,17),f.1;
    < 7508 CONTROL BEGIN set caltgtpwrcck=v.(17,17,17,17),f.1;
    < 7504 INFO |set|2GHz.Target.Power.Cck[1]|17.0,17.0,17.0,17.0|
    set caltgtfreq2g=2412,2437,2472;
    < 7508 CONTROL BEGIN set caltgtfreq2g=2412,2437,2472;
    < 7504 INFO |set|2GHz.Target.Frequency.Legacy|2412,2437,2472|
    set caltgtpwr2g=v.(17,16,15,13),f.0;
    < 7508 CONTROL BEGIN set caltgtpwr2g=v.(17,16,15,13),f.0;
    < 7504 INFO |set|2GHz.Target.Power.Legacy[0]|17.0,16.0,15.0,13.0|
    set caltgtpwr2g=v.(17,16,15,13),f.1;
    < 7508 CONTROL BEGIN set caltgtpwr2g=v.(17,16,15,13),f.1;
    < 7504 INFO |set|2GHz.Target.Power.Legacy[1]|17.0,16.0,15.0,13.0|
    set caltgtpwr2g=v.(17,16,15,13),f.2;
    < 7508 CONTROL BEGIN set caltgtpwr2g=v.(17,16,15,13),f.2;
    < 7504 INFO |set|2GHz.Target.Power.Legacy[2]|17.0,16.0,15.0,13.0|
    set caltgtfreqht202g=2412,2437,2472;
    < 7508 CONTROL BEGIN set caltgtfreqht202g=2412,2437,2472;
    < 7504 INFO |set|2GHz.Target.Frequency.Ht20|2412,2437,2472|
    set caltgtpwrht202g=v.(17,17,15,14,13,12,13,13,11,10,13,13,11,10),f.0;
    < 7508 CONTROL BEGIN set caltgtpwrht202g=v.(17,17,15,14,13,12,13,13,11,10,13,13,11,10),f.0;
    < 7504 INFO |set|2GHz.Target.Power.Ht20[0]|17.0,17.0,15.0,14.0,13.0,12.0,13.0,13.0,11.0,10.0,13.0,13.0,11.0,10.0|
    set caltgtpwrht202g=v.(17,17,15,14,13,12,13,13,11,10,13,13,11,10),f.1;
    < 7508 CONTROL BEGIN set caltgtpwrht202g=v.(17,17,15,14,13,12,13,13,11,10,13,13,11,10),f.1;
    < 7504 INFO |set|2GHz.Target.Power.Ht20[1]|17.0,17.0,15.0,14.0,13.0,12.0,13.0,13.0,11.0,10.0,13.0,13.0,11.0,10.0|
    set caltgtpwrht202g=v.(17,17,15,14,13,12,13,13,11,10,13,13,11,10),f.2;
    < 7508 CONTROL BEGIN set caltgtpwrht202g=v.(17,17,15,14,13,12,13,13,11,10,13,13,11,10),f.2;
    < 7504 INFO |set|2GHz.Target.Power.Ht20[2]|17.0,17.0,15.0,14.0,13.0,12.0,13.0,13.0,11.0,10.0,13.0,13.0,11.0,10.0|
    set caltgtfreqht402g=2412,2437,2472;
    < 7508 CONTROL BEGIN set caltgtfreqht402g=2412,2437,2472;
    < 7504 INFO |set|2GHz.Target.Frequency.Ht40|2412,2437,2472|
    set caltgtpwrht402g=v.(15,15,15,14,13,12,13,13,11,10,13,13,11,10),f.0;
    < 7508 CONTROL BEGIN set caltgtpwrht402g=v.(15,15,15,14,13,12,13,13,11,10,13,13,11,10),f.0;
    < 7504 INFO |set|2GHz.Target.Power.Ht40[0]|15.0,15.0,15.0,14.0,13.0,12.0,13.0,13.0,11.0,10.0,13.0,13.0,11.0,10.0|
    set caltgtpwrht402g=v.(15,15,15,14,13,12,13,13,11,10,13,13,11,10),f.1;
    < 7508 CONTROL BEGIN set caltgtpwrht402g=v.(15,15,15,14,13,12,13,13,11,10,13,13,11,10),f.1;
    < 7504 INFO |set|2GHz.Target.Power.Ht40[1]|15.0,15.0,15.0,14.0,13.0,12.0,13.0,13.0,11.0,10.0,13.0,13.0,11.0,10.0|
    set caltgtpwrht402g=v.(15,15,15,14,13,12,13,13,11,10,13,13,11,10),f.2;
    < 7508 CONTROL BEGIN set caltgtpwrht402g=v.(15,15,15,14,13,12,13,13,11,10,13,13,11,10),f.2;
    < 7504 INFO |set|2GHz.Target.Power.Ht40[2]|15.0,15.0,15.0,14.0,13.0,12.0,13.0,13.0,11.0,10.0,13.0,13.0,11.0,10.0|
    set 2GHz.ctl.Index[0]=0x11;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[0]=0x11;
    < 7504 INFO |set|2GHz.Ctl.Index[0]|0x11|
    set 2GHz.ctl.Frequency[0]=2412,2417,2457,2462;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[0]=2412,2417,2457,2462;
    < 7504 INFO |set|2GHz.Ctl.Frequency[0]|2412,2417,2457,2462|
    set 2GHz.ctl.Power[0]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[0]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[0]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[0]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[0]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[0]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[1]=0x12;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[1]=0x12;
    < 7504 INFO |set|2GHz.Ctl.Index[1]|0x12|
    set 2GHz.ctl.Frequency[1]=2412,2417,2457,2462;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[1]=2412,2417,2457,2462;
    < 7504 INFO |set|2GHz.Ctl.Frequency[1]|2412,2417,2457,2462|
    set 2GHz.ctl.Power[1]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[1]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[1]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[1]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[1]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[1]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[2]=0x15;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[2]=0x15;
    < 7504 INFO |set|2GHz.Ctl.Index[2]|0x15|
    set 2GHz.ctl.Frequency[2]=2412,2417,2457,2462;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[2]=2412,2417,2457,2462;
    < 7504 INFO |set|2GHz.Ctl.Frequency[2]|2412,2417,2457,2462|
    set 2GHz.ctl.Power[2]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[2]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[2]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[2]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[2]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[2]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[3]=0x17;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[3]=0x17;
    < 7504 INFO |set|2GHz.Ctl.Index[3]|0x17|
    set 2GHz.ctl.Frequency[3]=2422,2427,2432,2452;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[3]=2422,2427,2432,2452;
    < 7504 INFO |set|2GHz.Ctl.Frequency[3]|2422,2427,2432,2452|
    set 2GHz.ctl.Power[3]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[3]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[3]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[3]=0 ,1 ,1 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[3]=0 ,1 ,1 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[3]|0x0,0x1,0x1,0x1|
    set 2GHz.ctl.Index[4]=0x41;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[4]=0x41;
    < 7504 INFO |set|2GHz.Ctl.Index[4]|0x41|
    set 2GHz.ctl.Frequency[4]=2412,2417,2472,2484;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[4]=2412,2417,2472,2484;
    < 7504 INFO |set|2GHz.Ctl.Frequency[4]|2412,2417,2472,2484|
    set 2GHz.ctl.Power[4]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[4]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[4]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[4]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[4]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[4]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[5]=0x42;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[5]=0x42;
    < 7504 INFO |set|2GHz.Ctl.Index[5]|0x42|
    set 2GHz.ctl.Frequency[5]=2412,2417,2467,2472;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[5]=2412,2417,2467,2472;
    < 7504 INFO |set|2GHz.Ctl.Frequency[5]|2412,2417,2467,2472|
    set 2GHz.ctl.Power[5]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[5]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[5]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[5]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[5]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[5]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[6]=0x45;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[6]=0x45;
    < 7504 INFO |set|2GHz.Ctl.Index[6]|0x45|
    set 2GHz.ctl.Frequency[6]=2412,2417,2467,2472;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[6]=2412,2417,2467,2472;
    < 7504 INFO |set|2GHz.Ctl.Frequency[6]|2412,2417,2467,2472|
    set 2GHz.ctl.Power[6]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[6]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[6]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[6]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[6]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[6]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[7]=0x47;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[7]=0x47;
    < 7504 INFO |set|2GHz.Ctl.Index[7]|0x47|
    set 2GHz.ctl.Frequency[7]=2422,2427,2432,2462;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[7]=2422,2427,2432,2462;
    < 7504 INFO |set|2GHz.Ctl.Frequency[7]|2422,2427,2432,2462|
    set 2GHz.ctl.Power[7]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[7]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[7]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[7]=0 ,1 ,1 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[7]=0 ,1 ,1 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[7]|0x0,0x1,0x1,0x1|
    set 2GHz.ctl.Index[8]=0x31;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[8]=0x31;
    < 7504 INFO |set|2GHz.Ctl.Index[8]|0x31|
    set 2GHz.ctl.Frequency[8]=2412,2417,2467,2472;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[8]=2412,2417,2467,2472;
    < 7504 INFO |set|2GHz.Ctl.Frequency[8]|2412,2417,2467,2472|
    set 2GHz.ctl.Power[8]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[8]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[8]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[8]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[8]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[8]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[9]=0x32;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[9]=0x32;
    < 7504 INFO |set|2GHz.Ctl.Index[9]|0x32|
    set 2GHz.ctl.Frequency[9]=2412,2417,2467,2472;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[9]=2412,2417,2467,2472;
    < 7504 INFO |set|2GHz.Ctl.Frequency[9]|2412,2417,2467,2472|
    set 2GHz.ctl.Power[9]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[9]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[9]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[9]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[9]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[9]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[10]=0x35;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[10]=0x35;
    < 7504 INFO |set|2GHz.Ctl.Index[10]|0x35|
    set 2GHz.ctl.Frequency[10]=2412,2417,2467,2472;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[10]=2412,2417,2467,2472;
    < 7504 INFO |set|2GHz.Ctl.Frequency[10]|2412,2417,2467,2472|
    set 2GHz.ctl.Power[10]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[10]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[10]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[10]=0 ,1 ,0 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[10]=0 ,1 ,0 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[10]|0x0,0x1,0x0,0x1|
    set 2GHz.ctl.Index[11]=0x37;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Index[11]=0x37;
    < 7504 INFO |set|2GHz.Ctl.Index[11]|0x37|
    set 2GHz.ctl.Frequency[11]=2422,2427,2432,2462;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Frequency[11]=2422,2427,2432,2462;
    < 7504 INFO |set|2GHz.Ctl.Frequency[11]|2422,2427,2432,2462|
    set 2GHz.ctl.Power[11]=30 ,30 ,30 ,30;
    < 7508 CONTROL BEGIN set 2GHz.ctl.Power[11]=30 ,30 ,30 ,30;
    < 7504 INFO |set|2GHz.Ctl.Power[11]|30.0,30.0,30.0,30.0|
    set 2GHz.ctl.BandEdge[11]=0 ,1 ,1 ,1;
    < 7508 CONTROL BEGIN set 2GHz.ctl.BandEdge[11]=0 ,1 ,1 ,1;
    < 7504 INFO |set|2GHz.Ctl.BandEdge[11]|0x0,0x1,0x1,0x1|
    get opflags;
    < 7508 CONTROL BEGIN get opflags;
    < 7504 INFO |get|OpFlags|0x2|
    set mac=00:03:7f:be:f1:54
    < 7508 CONTROL BEGIN set mac=00:03:7f:be:f1:54
    mac address = 00:03:7f:be:f1:54
    < 7504 INFO |set|Mac|00:03:7f:be:f1:54|
    set mac=00:03:7f:aa:bb:11;
    < 7508 CONTROL BEGIN set mac=00:03:7f:aa:bb:11;
    mac address = 00:03:7f:aa:bb:11
    < 7504 INFO |set|Mac|00:03:7f:aa:bb:11|
    hello
    < 7508 CONTROL BEGIN hello
    < 7504 INFO |set|NartVersion|2.27|
    < 7504 INFO |set|NartBuildDate|120201100000|
    Error::PCI Config read32 failed::co.value=0
    00000000: deadbeef
    < 7504 INFO |set|devid|dead|
    < 7504 INFO |set|mac|00:03:7f:aa:bb:11|
    < 7504 INFO |set|customer||
    tx f=2412;ir=0;gi=0;txch=1;rxch=1;pc=8000;pl=1000;bc=1;retry=0;att=0;iss=0;stat=3;ifs=1;dur=600000;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=2;r=t0;pcdac=90;pdgain=3;
    < 7508 CONTROL BEGIN tx f=2412;ir=0;gi=0;txch=1;rxch=1;pc=8000;pl=1000;bc=1;retry=0;att=0;iss=0;stat=3;ifs=1;dur=600000;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=1;cal=0;ht40=2;r=t0;pcdac=90;pdgain=3;
    < 6018 WARNING Device reset error 14. frequency=2412, ht40=20, tx chain=1, rx chain=1. Retrying.
    [15483.260000] DK::Unregsitering client 0
    Bus error

    2016-07-26 13:22
    • lics

      向art分区写入校准信息试试。

      2016-07-26 13:26
  56. 0楼
    hslcpf

    你好,我的artgui不能运行?art2的版本是art2_ver_4_9_849.zip。

    2016-08-08 15:41
    • lics

      support目录下的文件安装了吗?

      2016-08-08 15:44
  57. 0楼
    shizhai

    @lics,你好,目前我正在做QCA9558+QCA9880的ART2兼容openWRT移植,在启动的时候出现如下错误,请问大神是否遇到过呢^_^
    [ 5276.840000] DK:legacy_pci_device 0
    [ 5276.840000] DK:pcie init 1
    [ 5276.840000] CHIP REV ID: 1130
    [ 5276.840000] No link on PCIe_2
    [ 5276.850000] Writing value 0x6 to PCI_1 command register
    [ 5276.850000] Skipping pcie init
    [ 5276.860000] dk_dev_init::status after register_chrdev(dk) = 0
    [ 5276.860000] Base Phsycal address :0x18100000
    [ 5276.870000] DK::Add client 0
    [ 5276.870000] DK::Reg phy addr = 18100000 vir Addr = b8100000
    [ 5276.880000] DK::Irq = 2f
    [ 5276.880000] DK::Allocated 0x200000 bytes memory
    [ 5276.880000] DK::memory vir Addr = 85600000 phy Addr = 5600000
    [ 5276.890000] No Legacy PCIe device found. Returning

    art2驱动包使用的是QSDK的CS10.2v4.9.396

    2016-08-12 13:37
    • lics

      11ac的art使用方法很不一样,请仔细阅读官方文档。

      2016-08-12 13:42
      • shizhai

        噢噢,请问ART2这块的文档大致有哪些呢?谢谢了!

        2016-08-12 14:33
  58. 0楼
    shizhai

    @lics, 因为做9344有时候,仅仅遇到源码上的编译错误,还是比较顺利的解决了,也没有拿到详细的官方说明资料,请问您在ART2移植过程上的官方参考文档大致有哪些呢?我好整理后申请呢,十分感谢了!

    2016-08-12 14:49
    • lics

      主要用到的有:

      ART2 Reference Design for AR93xx/94xx/95xx & QCA98xx

      QCA98xx ART2 Non Volatile Memory Structure Reference Guide

      2016-08-12 14:56
      • shizhai

        好的,十分感谢。

        2016-08-12 19:49
  59. 0楼
    victor_tudou

    博主您好
    请教下 art2_v4.9 版本上
    编译qca9531 art 的时候 default、hydra、howl、python、wasp和wasp_osprey 应该用哪一个选项呢

    是否有文档介绍

    2016-09-18 01:48
    • lics

      nart.out及库文件,配置好toolchain之后,直接make -f makefile.nart即可;art.ko,配置好toolchain及kernel path,make -f makefile.artmod honeybee即可。

      没有相关的文档。

      2016-09-18 08:15
      • victor_tudou

        非常感谢博主, 按照您的建议编译后,正常使用了

        再多请教下博主, 这几个

        default、hydra、howl、python、wasp和wasp_osprey 都是怎么跟主芯片型号配套起来的,
        是不是有啥文档中会有介绍

        2016-09-18 14:40
        • lics

          pathon好像是AR9331,wasp是AR9341/AR9344,wasp_osprey是AR9341/AR9344+PCIe,其他的不清楚。

          2016-09-18 14:45
          • victor_tudou

            非常感谢

            2016-09-18 14:59
  60. 0楼
    shizhai

    @lics,你好
    目前在做QCA9558+QCA9880的ART校验,但是现在程序启动的时候感觉始终不正常,只有加载了一个卡,请问楼主是否有解决办法呢?
    [ 1772.510000] DK:legacy_pci_device 0
    [ 1772.510000] DK:pcie init 1
    [ 1772.510000] CHIP REV ID: 1130
    [ 1772.520000] No link on PCIe_2
    [ 1772.520000] Writing value 0x6 to PCI_1 command register
    [ 1772.520000] Skipping pcie init
    [ 1772.530000] dk_dev_init::status after register_chrdev(dk) = 0
    [ 1772.530000] Base Phsycal address :0x18100000
    [ 1772.540000] DK::Add client 0
    [ 1772.540000] DK::Reg phy addr = 18100000 vir Addr = b8100000
    [ 1772.550000] DK::Irq = 2f
    [ 1772.550000] DK::Allocated 0x200000 bytes memory
    [ 1772.550000] DK::memory vir Addr = 84800000 phy Addr = 4800000
    [ 1772.560000] No Legacy PCIe device found. Returning

    2016-09-21 17:41
    • lics

      11ac真心不熟悉啊,我自己还没一直弄过驱动,只做过硬件的设计。。。

      2016-09-21 17:49
      • shizhai

        噢噢,好迷惑啊,我再想想办法吧 -_-!!

        2016-09-21 19:51
  61. 0楼
    Droid

    lics,你好!
    认真看了全部评论,但是还是没有明白怎么把art2_ver_4_9_815编译进openwrt进去;不用make menuconfig 去选择编译ART2了吗?
    我之前想到的是想添加一个组建包一样,将art2_ver_4_9_815代码放在/package/下面,再弄一个Makefile,在make menuconfig中选择是否编译ART2组件。这样的话是不是可行的?这个Makefile又该怎么写呢?
    或者不安上述的要求做,怎么编译出来呢?

    2016-10-20 19:34
    • lics

      art2_ver_4_9_815源码放在哪里都可以,只要指定了kernel path及toolchain path就可以的,然后把编译得到的文件放在rootfs中或者临时下载到内存中,就可以用了。我不太清楚怎样弄才能通过make menuconfig来选择art2。

      2016-10-21 08:13
  62. 0楼
    Droid

    lics,你好!
    再次打扰你,你还存有9531的校准数据吗?能够给一份吗?谢谢

    2016-10-20 20:16
    • lics

      我有9531的校准数据,但是只能配合我自己设计的板子,别的人的板子很可能用不了。

      2016-10-21 08:14
  63. 0楼
    kflying

    楼主你好,请教个问题:
    我这边是移植art到imx6板子上,编译好art.ko和nart.out之后,在artgui load dut时,报了如下错误:
    osDllLoad[45] library name = libar9287.so
    osDllLoad[76] FullName = //libar9287.so
    osDllLoad[45] library natest: into function dk_open
    me = liblinkAr9k.so
    osDllLoad[76DK:: dk_open
    ] FullName = //liblinkAr9k.so
    < DK:: dk_open:minor=0
    6606 INFO Link control functions DK::get_client_id:major=63:minor=0
    loaded for "Link" from "//liblinktest:get_client_id: dk-uart cli_id=-1, dk cli_id=-1
    Ar9k.so".
    irq;
    sIndex = 0;

    if (add_client(dev,baseaddr,len,irq, numBars, sIndex,0) 132098
    // pci_disable_device(dev);
    #endif
    return -ENODEV;
    }
    #endif
    #endif

    }
    看了下,可能是add_client没有被执行导致的,insmod art.ko的结果如下:
    DK:legacy_pci_device 1
    DK::Module init
    dk_dev_init::status after register_chrdev(dk) = 0
    DK::Init dev table
    DK::Bus module init
    DK::MODULE
    DK::bus_module_init:status=0 from dkpci_driver
    因为没有定义DUAL_PCIE,所有走到了bus_module_init的分支,并没有执行add_client。但是我试着加了DUAL_PCIE定义后,又报错说是函数get_pci_reg_addr没有定义。搜了下代码,确实找不到这个函数的定义。
    请教下楼主,这个问题是不是跟add_client有关?我看到之前的评论中日志显示都有这个函数的打印。但函数get_pci_reg_addr又很奇怪找不到定义,请楼主帮忙看下能否提供下解决问题的线索,先谢谢了!
    我用的是LinuxART2CS10.2v4.9.379.tar.bz2这个版本。

    2016-10-28 13:09
    • lics

      我为i.MX6处理器移植过ART驱动,用的art2_ver_4_9_830中的源代码,可以参考这篇文章:

      http://www.zencheer.com/imx6-porting-art/

      2016-10-28 13:34
      • kflying

        感谢回复!
        其实我就是参照你的那篇文章做的,可能我用的这个版本代码有问题吧,我先找新版本代码看看,有问题再请教。

        2016-10-28 14:08
        • lics

          好的。

          2016-10-28 17:15
  64. 0楼
    kflying

    不好意思,上面的帖子可能内容太多,一部分没有显示,我重新贴下:
    错误打印:
    me = liblinkAr9k.so
    osDllLoad[76DK:: dk_open
    ] FullName = //liblinkAr9k.so
    < DK:: dk_open:minor=0
    6606 INFO Link control functions DK::get_client_id:major=63:minor=0
    loaded for "Link" from "//liblinktest:get_client_id: dk-uart cli_id=-1, dk cli_id=-1
    Ar9k.so".
    < 6506 INFO Device coDK::register_client:Device not found
    ntrol functions loaded for "Ar928test: function dk_open, register_client res =-19
    7" from "//libar9287.so". Version "4.0" built on "110602124500".
    deviceInit devIndex=0 device_fn=0 pdkInfo=0
    Opening device /dev/dk0
    @Error opening device /dev/dk0:-1
    Error: Unable to open the device !

    2016-10-28 13:12
  65. 0楼
    kflying

    insmod art.ko时的一段代码相关:
    static INT32 __init dk_module_init(void)
    {
    ......
    #if defined(OWL_PB42) || defined(PYTHON_EMU)
    #if !defined(DUAL_PCIE)
    error = bus_module_init();
    #endif
    #if defined(DUAL_PCIE)
    iIndex=0;
    #if (CFG_64BIT == 1)
    baseaddr[iIndex] = (resource_size_t)get_pci_reg_addr(iIndex);
    printk(KERN_ERR" Base Phsycal address :0x%llxn", baseaddr[iIndex]);
    #else
    baseaddr[iIndex] = (A_UINT_PTR)get_pci_reg_addr(iIndex);
    printk(KERN_ERR" Base Phsycal address :0x%08lxn", baseaddr[iIndex]);
    #endif
    len[iIndex] = 0x20000;
    numBars = 1;
    //irq = get_pci_irq(iIndex); 10.4 does not have get_pci_irq
    irq = pdev->irq;
    sIndex = 0;

    if (add_client(dev,baseaddr,len,irq, numBars, sIndex,0) 132098
    // pci_disable_device(dev);
    #endif
    return -ENODEV;
    }
    #endif
    #endif

    }

    2016-10-28 13:13
  66. 0楼
    shizhai

    lics,你好!
    目前我们这边遇到一个无线方面的问题,麻烦您帮忙看看呢(我们的方案是:AR9344+AR9582+QCA8334),在系统启动到最后的时候出现Unable to reset hardware; reset status -5(freq 2412 MHz)的错误。详细日志如下:

    [ 131.720000] device wlan1 entered promiscuous mode
    [ 131.750000] br-lan: port 2(wlan1) entered forwarding state
    [ 131.760000] br-lan: port 2(wlan1) entered forwarding state
    [ 131.770000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
    [ 132.080000] ath: phy0: Unable to reset hardware; reset status -5 (freq 2412 MHz)
    [ 132.300000] ath: phy0: Unable to reset channel, reset status -5
    [ 132.310000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [ 132.530000] ath: phy0: Unable to reset channel, reset status -5
    [ 132.630000] br-lan: port 1(eth0.1) entered forwarding state
    [ 132.640000] br-lan_probe: port 1(eth0.10) entered forwarding state
    [ 132.810000] device wlan0 entered promiscuous mode
    [ 133.030000] ath: phy0: Unable to reset channel, reset status -5
    [ 133.250000] ath: phy0: Unable to reset channel, reset status -5
    非常感谢!!

    2016-12-15 11:17
    • lics

      已邮件回复你。

      2016-12-16 09:03
  67. 0楼
    Linker

    > tx f=2412;ir=0;gi=0;txch=7;rxch=7;pc=-1;pl=1500;bc=1;retry=0;att=0;iss=0;stat=3;ifs=0;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=0;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    < 7508 CONTROL BEGIN tx f=2412;ir=0;gi=0;txch=7;rxch=7;pc=-1;pl=1500;bc=1;retry=0;att=0;iss=0;stat=3;ifs=0;dur=-1;dump=0;pro=0;bssid=50.55.55.55.55.05;mactx=20.22.22.22.22.02;macrx=10.11.11.11.11.01;deaf=0;reset=-1;agg=0;cal=0;ht40=0;r=54;pcdac=30;pdgain=3;
    cant find field tx_gain_table_max
    using gain entry 383
    cant find field force_dac_gain
    cant find field forced_dac_gain
    cant find field force_tx_gain
    cant find field forced_txbb1dbgain
    cant find field forced_txbb6dbgain
    cant find field forced_txmxrgain
    cant find field forced_padrvgnA
    cant find field forced_padrvgnB
    cant find field forced_padrvgnC
    cant find field forced_padrvgnD
    cant find field forced_enable_PAL
    cant find field forced_dac_gain
    TxGainIndex=383 TxDacGain=12245933
    OFFcant find field MAC_DMA_CR.RXD
    OFF1.AR_PHY_PAPRD_CTRL1_B0_PAPRD_POWER_AT_AM2AM_CAL_0=0
    TxMany=1 TxStatusMany=1 TxBatchMany=1 TxDescriptorMany=1
    npattern=0 pattern=621248
    npattern=64 pattern=5145c4
    pattern: ff 87 b8 59 b7 a1 cc 24 57 5e 4b 9c e e9 ea 50 2a be b4 1b b6 b0 5d f1 e6 9a e3 45 fd 2c 53 18 c ca c9 fb 49 37 e5 a8 51 3b 2f 61 aa 72 18 84 2 23 23 ab 63 89 51 b3 e7 8b 72 90 4c e8 fb c0
    Packet: ff 87 b8 59 b7 a1 cc 24 57 5e 4b 9c e e9 ea 50 2a be b4 1b b6 b0 5d f1 e6 9a e3 45 fd 2c 53 18 c ca c9 fb 49 37 e5 a8 51 3b 2f 61 aa 72 18 84 2 23 23 ab 63 89 51 b3 e7 8b 72 90
    cant find field MAC_DCU_LCL_IFS[0].CW_MIN
    cant find field MAC_DCU_LCL_IFS[0].CW_MAX
    cant find field MAC_DCU_LCL_IFS[1].CW_MIN
    cant find field MAC_DCU_LCL_IFS[1].CW_MAX
    cant find field MAC_DCU_LCL_IFS[2].CW_MIN
    cant find field MAC_DCU_LCL_IFS[2].CW_MAX
    cant find field MAC_DCU_LCL_IFS[3].CW_MIN
    cant find field MAC_DCU_LCL_IFS[3].CW_MAX
    cant find field MAC_DCU_LCL_IFS[4].CW_MIN
    cant find field MAC_DCU_LCL_IFS[4].CW_MAX
    cant find field MAC_DCU_LCL_IFS[5].CW_MIN
    cant find field MAC_DCU_LCL_IFS[5].CW_MAX
    cant find field MAC_DCU_LCL_IFS[6].CW_MIN
    cant find field MAC_DCU_LCL_IFS[6].CW_MAX
    cant find field MAC_DCU_LCL_IFS[7].CW_MIN
    cant find field MAC_DCU_LCL_IFS[7].CW_MAX
    cant find field MAC_DCU_LCL_IFS[8].CW_MIN
    cant find field MAC_DCU_LCL_IFS[8].CW_MAX
    cant find field MAC_DCU_LCL_IFS[9].CW_MIN
    cant find field MAC_DCU_LCL_IFS[9].CW_MAX
    cant find field MAC_DCU_GBL_IFS_SIFS.DURATION
    cant find field BB_cca_b0.cf_thresh62
    cant find field BB_ext_chan_pwr_thr_1.thresh62_ext
    cant find field BB_test_controls.force_agc_clear
    cant find field BB_timing_control_5.cycpwr_thr1
    cant find field BB_ext_chan_pwr_thr_2_b0.cycpwr_thr1_ext
    cant find field BB_timing_control_5.rssi_thr1a
    START
    OFF ON ONtx start done
    OFF< 7501 CONTROL ON

    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .cant find field BB_agc_control.do_noisefloor
    .timeout.< 6017 WARNING Bad noise floor value: (4886060,0) (2130640639,3) (3,0).
    cant find field BB_multichain_enable.rx_chain_mask
    cant find field BB_cal_chain_mask.cal_chain_mask

    Lics 请帮我看看我是用AR9344 ,然后用art2_ver_2_67ap_src编译,不知道为什么出现很多这种找不到field的情况,请问大概什么可能?

    2017-01-05 21:22
    • Linker

      修改了nart 的编译和头文件 现在好了

      2017-01-05 22:59
      • lics

        OK,那就好

        2017-01-06 09:23