Jetbot WiFi Module 调试过程
2019-04-15 本文已影响28人
童年雅趣
硬件: Jetson Nano
接口: USB
软件: Ubuntu18.04(Kernel 4.9)
WIFI: TTIT-1021XP5 Spec (USB Interface 2T2R 5G-High Power wifi mdulel)
!!!未解决死机重启问题,暂不可用!!!
- 插入USB WIFI 模块后,查询USB 模块信息以及是否识别
lsusb
Bus 001 Device 005: ID 0cf3:1022 Atheros Communications, Inc.
- cfg80211.c 和 wmi.c 编译报错, 类型不匹配(size_t ---32位系统下为4字节,64系统下是8字节 和 int在32位和64位系统均为4字节),从而导致编译报错。
解决:
void ath6kl_p2p_ps_user_app_ie(struct p2p_ps_info *p2p_ps, u8 mgmt_frm_type, u8 **ie,int
*len);
改为
void ath6kl_p2p_ps_user_app_ie(struct p2p_ps_info *p2p_ps, u8 mgmt_frm_type, u8 **ie,size_t
*len);
make ARCH=arm64 CROSS_COMPILE=/usr/bin/aarch64-linux-gnu- -C /lib/modules/4.9.140-tegra/build SUBDIRS=/home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl KBUILD_EXTRA_SYMBOLS=/Module.symvers modules
make[2]: Entering directory '/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9'
LD /home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/built-in.o
CC [M] /home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/debug.o
CC [M] /home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/htc_pipe.o
CC [M] /home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/bmi.o
CC [M] /home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/cfg80211.o
/home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/cfg80211.c: In function ‘ath6kl_ap_beacon’:
/home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/cfg80211.c:5473:8: error: passing argument 4 of ‘ath6kl_p2p_ps_user_app_ie’ from incompatible pointer type [-Werror=incompatible-pointer-types]
&beacon_ies_len);
^
In file included from /home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/core.h:59:0,
from /home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/cfg80211.c:25:
/home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/p2p.h:293:6: note: expected ‘int *’ but argument is of type ‘size_t * {aka long unsigned int *}’
void ath6kl_p2p_ps_user_app_ie(struct p2p_ps_info *p2p_ps, u8 mgmt_frm_type,
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:335: recipe for target '/home/jetbot/ws_dennis/WLAN-AIO/WLAN-AIO-BP/build/../drivers/ath6kl/cfg80211.o' failed
../src/drivers/driver_nl80211.c:20:10: fatal error: netlink/genl/genl.h: No such file or directory
#include <netlink/genl/genl.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:1516: recipe for target '../src/drivers/driver_nl80211.o' failed
- Insmod driver KO 报错
jetbot@jetbot:~/ws_dennis/aio_usb_wlan_bsp4.9/rootfs.arm64.build$ sudo insmod lib/modules/ath6kl_usb.ko
insmod: ERROR: could not insert module lib/modules/ath6kl_usb.ko: Unknown symbol in module
解决:
sudo modprobe cfg80211
[ 3908.892779] ath6kl_usb: Unknown symbol cfg80211_inform_bss_frame_data (err 0)
[ 3908.899937] ath6kl_usb: Unknown symbol cfg80211_sched_scan_results (err 0)
[ 3908.906909] ath6kl_usb: Unknown symbol cfg80211_scan_done (err 0)
[ 3908.913064] ath6kl_usb: Unknown symbol cfg80211_remain_on_channel_expired (err 0)
[ 3908.920656] ath6kl_usb: Unknown symbol regulatory_hint (err 0)
[ 3908.926527] ath6kl_usb: Unknown symbol cfg80211_roamed_bss (err 0)
[ 3908.932927] ath6kl_usb: Unknown symbol cfg80211_find_ie_match (err 0)
[ 3908.939391] ath6kl_usb: Unknown symbol cfg80211_new_sta (err 0)
[ 3908.945340] ath6kl_usb: Unknown symbol cfg80211_disconnected (err 0)
[ 3908.951773] ath6kl_usb: Unknown symbol wiphy_new_nm (err 0)
[ 3908.957359] ath6kl_usb: Unknown symbol cfg80211_connect_bss (err 0)
[ 3908.963642] ath6kl_usb: Unknown symbol cfg80211_ready_on_channel (err 0)
[ 3908.970395] ath6kl_usb: Unknown symbol wiphy_register (err 0)
[ 3908.976174] ath6kl_usb: Unknown symbol cfg80211_put_bss (err 0)
[ 3908.982106] ath6kl_usb: Unknown symbol cfg80211_ch_switch_notify (err 0)
[ 3908.988871] ath6kl_usb: Unknown symbol cfg80211_gtk_rekey_notify (err 0)
[ 3908.995612] ath6kl_usb: Unknown symbol cfg80211_ibss_joined (err 0)
[ 3909.001930] ath6kl_usb: Unknown symbol cfg80211_michael_mic_failure (err 0)
[ 3909.008929] ath6kl_usb: Unknown symbol cfg80211_del_sta_sinfo (err 0)
[ 3909.015385] ath6kl_usb: Unknown symbol wiphy_unregister (err 0)
[ 3909.021353] ath6kl_usb: Unknown symbol cfg80211_get_bss (err 0)
[ 3909.027296] ath6kl_usb: Unknown symbol __ieee80211_get_channel (err 0)
[ 3909.033855] ath6kl_usb: Unknown symbol cfg80211_pmksa_candidate_notify (err 0)
[ 3909.041321] ath6kl_usb: Unknown symbol cfg80211_mgmt_tx_status (err 0)
[ 3909.047911] ath6kl_usb: Unknown symbol cfg80211_rx_mgmt (err 0)
[ 3909.053873] ath6kl_usb: Unknown symbol cfg80211_chandef_create (err 0)
[ 3909.060419] ath6kl_usb: Unknown symbol cfg80211_inform_bss_data (err 0)
[ 3909.067055] ath6kl_usb: Unknown symbol ieee80211_frequency_to_channel (err 0)
[ 3909.074224] ath6kl_usb: Unknown symbol wiphy_free (err 0)
- 动态加载ath6kl_usb.ko 成功,但系统卡死,无响应,必须关机或等待2分钟左右,系统自动重启(Watchdog)
sudo insmod lib/modules/ath6kl_usb.ko
未解决
[ 145.704177] ath6kl: 3VAP/1, P2P enable, concurrent on , with dedicate p2p-device, multi-channel-concurrent enable, p2p-compat disable, sta-p2p-ie removed, p2p_wise_scan enable
[ 145.705591] ath6kl: target bootstrap: 0x00000810
[ 145.705616] ath6kl: Get firmware ath6k/AR6004/hw3.0/bdata.bin !!
[ 145.705620] ath6kl: ath6kl: Get firmware ath6k/AR6004/hw3.0/softmac.bin fail!!
[ 145.705624] ath6kl: Get firmware ath6k/AR6004/hw3.0/fw.ram.bin !!
[ 145.705627] ath6kl: target's subtype is 0x3, HT20-only 2SS Dual-band
[ 145.706560] ath6kl: wmi is not ready
[ 145.708030] ath6kl: wmi is not ready
[ 145.709380] ath6kl: Create HTC cookie, type 1 num 1640, loc 0 0
[ 145.709397] ath6kl: Create HTC cookie, type 2 num 66, loc 0 0
[ 145.709403] ath6kl: RX aggregation drop disabled
[ 145.709406] ath6kl: Using driver's regdb.
[ 145.784929] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 145.785155] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 145.785163] ath6kl: wmi is not ready
[ 145.785887] ath6kl: wmi is not ready
[ 145.801584] ath6kl: wmi is not ready
[ 145.801646] ath6kl: wmi is not ready
[ 145.801940] ath6kl: wmi is not ready
[ 145.801994] ath6kl: wmi is not ready
[ 145.802331] ath6kl: wmi is not ready
[ 145.802380] ath6kl: wmi is not ready
[ 145.802418] ath6kl: wmi is not ready
[ 145.802454] ath6kl: wmi is not ready
[ 145.802490] ath6kl: wmi is not ready
[ 145.802524] ath6kl: wmi is not ready
[ 145.802557] ath6kl: wmi is not ready
[ 145.802591] ath6kl: wmi is not ready
[ 145.802627] ath6kl: wmi is not ready
[ 145.802662] ath6kl: wmi is not ready
[ 145.802697] ath6kl: wmi is not ready
[ 145.802731] ath6kl: wmi is not ready
[ 145.802766] ath6kl: wmi is not ready
[ 145.802802] ath6kl: wmi is not ready
[ 145.802837] ath6kl: wmi is not ready
[ 145.802872] ath6kl: wmi is not ready
[ 145.802905] ath6kl: wmi is not ready
[ 145.802939] ath6kl: wmi is not ready
[ 145.803335] ath6kl: wmi is not ready
[ 145.828838] ath6kl: wmi is not ready
[ 145.862412] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 145.864027] ath6kl: wmi is not ready
[ 145.972902] ath6kl: MAC ADDRESS 38:e2:6e:0c:04:26
[ 145.972979] ath6kl: ar6004 hw 3.0 usb fw 5.1.0.38
[ 145.979951] usbcore: registered new interface driver ath6kl_usb
[ 145.980200] ath6kl: Create dedicated p2p interface
[ 146.043085] IPv6: ADDRCONF(NETDEV_UP): p2p0: link is not ready
[ 146.043303] IPv6: ADDRCONF(NETDEV_UP): p2p0: link is not ready
[ 146.099709] IPv6: ADDRCONF(NETDEV_UP): p2p0: link is not ready