0% found this document useful (0 votes)
440 views13 pages

Team BasicsforEngineer 220920 0333 1720 PDF

The document provides guidelines for coding changes to the QCA driver software. It outlines conventions for marking Ruckus-specific code, creating new compilation flags, and organizing new files. It notes key files and directories that have been modified for the Ruckus driver, including new RSM and hostapd files. Locations are also provided for accessing QCA software releases and related resources.

Uploaded by

arunasirigere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
440 views13 pages

Team BasicsforEngineer 220920 0333 1720 PDF

The document provides guidelines for coding changes to the QCA driver software. It outlines conventions for marking Ruckus-specific code, creating new compilation flags, and organizing new files. It notes key files and directories that have been modified for the Ruckus driver, including new RSM and hostapd files. Locations are also provided for accessing QCA software releases and related resources.

Uploaded by

arunasirigere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Basics for Engineer

More cups of water, more time in Gym.

Coding guildelines

1. Any generic ruckus change to the host driver needs to be wrapped under the RKS_UMAC_NG_AX compile flag. We do NOT modify the QCA
code without indicating that it is a ruckus change.
a. For the fw, use RKS_FW_NG for generic changes.
b. This demarcation makes code merges a lot easier.
2. If you’re developing a new feature with substantial changes, create a new compile define for the feature. You can see all the existing examples in
Atheros/linux/driver/Makefile
a. Ex. RKS_11V_BTM, RKS_LBS, RKS_DFS_AX etc
b. For the firmware, do the same by creating new defines in fwconfig_QCA8074.
3. If the feature requires lots of additional code, create separate .c and .h files as needed.
a. Examples can be found in 11axwifi/umac/rks/
4. New rsm files have been created for those rsm files which interact heavily with the wifi driver.
a. These are named similar to their madwifi counterparts, with an additional *_ng appended to the name.
b. Examples include rsm_wlan_init_ng.c, rsm_wlan_ng.c, rsm_wifi_ng.c etc
c. You can check librsm/src/makefile and search for RKS_UMAC_NG to see all the new files.
5. The hostapd file which interacts with the new driver is called driver_ngwifi.c (replacing driver_madwifi.c).

Location of QCA release:

\\sv-fs2\engineering\Technology\Qualcomm(QTI)\Hawkeye\QCA_releases\CS_U2_r8.0_00006.1

Sometimes sv-fs2 dns is not resolved.. So use \\172.16.200.22\engineering\Technology\Qualcomm(QTI)\Hawkeye\QCA_releases


JIRA Board:
https://jira.ruckuswireless.com/secure/RapidBoard.jspa?rapidView=369&selectedIssue=SCG-62024&sprint=1881
AP- Firmware Image Types and HW Specs:
https://jira-wiki.ruckuswireless.com/pages/viewpage.action?spaceKey=Team&title=AP-+Firmware+Image+Types+and+HW+Specs
Taget Core File Debug:
R710-Target Core File Debug
Bayshore testbed info:
Bayshore Setup
vSCG servers:
https://jira-wiki.ruckuswireless.com/display/Team/vSCG+and+VSA+Access+Information+for+AP+teams

Macbook console:

https://www.packetgeek.net/2016/02/using-a-serial-console-on-mac-os-x/

How to build image:

http://chonggang-lnx-vm/wiki/doku.php?id=wiki:build_image

Disable/enable nss offload:

echo 0 /proc/rflow/offload

echo 1 > /proc/rflow/offload

802.11 Client-AP Connectivity Flow:


Linux Kernel Map:

SmartCast Related:

rkscli:

get qos wlan32

set directed-thr wlan32 0

get qos eth1

set qos eth1 directed multicast disable

set qos eth0 directed multicast disable

set qos eth0 igmp disable

set qos wlan32 igmp disable

set qos wlan32 classification enable

AP linux console:

ifconfig eth0

Run multicast from Control PC through AP to client:

route -n # list the routing table

route add 224.1.1.1 dev eth2 # direct the mcast traffic to a specific interface (here eth2 is for connect AP)

iperf -c 224.1.1.1 -u -T 32 -t 30 -i 1& # iperf mcast client

iperf -s -u -B 224.1.1.1 -i 1 # iperf mcast server

sudo tcpdump -ieth2 -v -e | grep 224.1.1.1 # use tcpdump to check whether the traffic goes

Debug ping issue

Capture from the AP:

tcpdump on different layers (br0, wlan0, wifi0)

(1) wlan0:

tcpdump -i wlan0 -w /tmp/wlan0_ap.pcap

(2) wifi0:

rkscli: set capture wifi0 stream

tcpdump -i wlan100 -w /tmp/wifi0_ap.pcap

Then, we can scp it to a machine with Wireshark, e.g.:

scp /tmp/wlan0_ap.pcap [email protected]:


Enable/Disable wifi nss offload

E.g. 2.4G

put "no_wifi_offload_2g" to /writable

to verify whether it take effect, use below command to check whether nss stats increase:

cat /sys/kernel/debug/qca-nss-drv/stats/wifili1 # wifili1 checks 2.4G, wifili0 checks 5G

11ax pktlog capture and analysis

R730 and 802.11ax

Capture from the AP:

pktlogconf -a wifi1 -elite -s 10000000

pktlogconf -d wifi1

cp /proc/ath_pktlog/wifi1 /tmp/pktlog_example.dat

tftp -p -r pktlog_example.dat -l /tmp/pktlog_example.dat 192.168.1.4

Analysis from control PC:

perl pktlogdecoder_lithium.pl -i <input dat file> -o <output txt file> -f

Multicast debug:

rkscli:

get qos

get qos wlan32

set qos

wifistats wifi1 3

tcpdump -i eth1 -w /tmp/p.pcap

scp /tmp/p.pcap [email protected]:/tmp

How to check QCA reference board wlans' passwords?

cd /etc/config

vi wireless

How to save 11ax R730 target assert dump automatically to PC through tftp?

In u-boot:

setenv serverip <tftpserverip>

setenv ipaddr <ip in the same rang of the serverip>

setenv paniconwcssfatal 0

From the PC tftp folder, run Prem's python script to remain capturing dump file and rename it with time stamp.

Then, can run "wifitool athX setunittestcmd )x47 1 14" to enable a dump directly

How to add a daemon application in our system?

How to check whether the rsm layer .o file has been compiled succesfully or not?

ls build/ap-arm-qca-wsg/build_arm_release/librsm/

How to change board data for updating the power levels (e.g., R720)?

1. Chang the .csv board data file, e.g. "TgtPwr_R720" in ~/xiaofu.ma_0608/atheros/linux/driver/madwifi/ath/offload-AR900B/bin/BDF


2. Generate the nessary files from the updated .csv files
a. Run the R720 related scripts in the following two files in ~/xiaofu.ma_0608/atheros/linux/driver/madwifi/ath/offload-AR900B/bin
/QConnBDFUtil
i.
2.
a.

i. setTargetPower.bat
ii. Txt2Bin.bat
3. Then, rebuild the image.
4. Check the power levels: iwpriv wifiX disp_tpc 3
5. To make new power table actually work, "control limit??" should also be diabled by
a. iwpriv wifi1 enable_ctl 0 // 0 means off, 1 means on
b. For checking the ctl table, please use: iwpriv wifi1 disp_ctl 3

Trigger a management frame using btm-request command

MBO Client/AP Instructions

e.g., set btm-request {wlanx} {sta-mac} P A //generate a basic request to be capture in a sniffer

Stats Info:

athstats -i wifi1 -a 1

nodestats wifi1 -m -c

capstats -i wifi1 1

Partial compiling:

e.g.: to compile sessionMgr.c

First to find the target name. Usually it can be guessed by the directory of the file.

Method 1:

~/xiaofu.ma_1130/release/ap_108.1/buildroot/package$ grep -R sessionMgr .

Then find from .mk file and locate what target it belongs to:

./sessionMgr.mk:TARGETS+=sessionMgr

Method 2:

Simply guess it from the directory, and compile it partially.

e.g.:

make PROFILE=ap-arm-qca-wsg sessionMgr

Correct linking for branches' SCG:

Step 1: look at the branch info

Branching and Release info

Step 2: link the SCG to the correct one

e.g.:

cd ~/xiaofu.ma_1130/release/ap_108.1

ln -sf ~/xiaofu.ma_1130/release/sz_3.6.1/scg scg

.o file wrong format issue across platforms:

method 1:

cd video54/common/txctrl/

rm *.o

cd ..

rm *.o

method 2:

make ... build clean

TCPdump:

tcpdump -i wifi1 -w /tmp/cap1.pcap -s 0

then, move the file to the control linux machine:

scp /tmp/souce_filename [email protected]:/tmp/destination/


ZD connnection: (Only ZD image or solo image can work)

// If don't want ZD overwrites AP image.

set rpmkey apmgr-ignore-ver t

set director ip 172.18.182.8 // Set the desired ZD IP Herman's: 172.18.182.8.

get director // Get the status

One time BGscan:

iwlist wlanx scanning test ${channel} ${dwell-time} 0 0 > /dev/null

e.g. iwlist wlan32 scanning test 36 200 0 0 > /dev/null

to reset: iwpriv wifi1 pdev_reset 2

Enable BGscan Scan Time Log:

iwpriv wifi1 dl_loglevel 1

iwpriv wifi1 dl_modoff 10

iwpriv wifi1 dl_modoff 12

iwpriv wifi1 dl_modoff 13

iwpriv wifi1 dl_modoff 14

iwpriv wifi1 dl_modon 22

iwpriv wifi1 dl_modon 15

printk 7

QCA driver configuration on RKS board:

(1) Step 1: cd /etc/init.d/iwpriv wifi1 txchainmask 5

(2) Step 2: cat wlan

iwpriv wifi1 txchainmask 5

iwpriv wifi1 rxchainmask 5

wlanconfig wlan8 create wlandev wifi1 wlanmode ap

iwpriv wlan8 mode 11ACVHT80

iwpriv wlan8 shortgi 1

iwconfig wlan8 essid qca_mu_mimo

iwpriv wlan8 wds 1

iwpriv wlan8 ldpc 1

iwpriv wlan8 set_cactimeout 2

brctl addif br0 wlan8

sleep 1

ifconfig eth0 up

ifconfig eth1 up

ifconfig wlan0 up

ifconfig wlan8 up
QCA driver configuration on QCA board:
uci show wireless
uci set wireless.wifi0.channel='36'
uci set wireless.wifi0.htmode='HT80'
uci commit wireless
iwconfig ath0 ssid VPT5G
iwconfig ath0 essid VPT5G
brctl show
ifconfig br-lan

How to use AP as sniffer (e.g. Bug SCG-70830)?


set capture wifi1

set capture wifi1 stream //set it as sniffer

set capture wifi1 idle //set it back as AP

How to access Brocade ICX switch through serial port in Linux terminal:

sudo mincom ttyS0 //could be ttySX, X=1, 2, 3, ...


How to setup DVLAN testing environment?

1. A VLAN-supported Switch (e.g. ICX7450):


a. set one port (e.g. ethernet 1/1/1 and connect this with AP) in ICX console (Step1: "en" to enable configure, Step2: "conf t" for config
terminal). The script is in xiaofu@xiaofu-lnx:~/pythonwork/dvlan.
b. set another port (e.g. ethernet 1/1/23 and connect this with AP)
2. AP: connect the AP with the SCG and set the radius server to the target server.
3. free radius server settings: the script is in "xiaofu@xiaofu-lnx:~/pythonwork/dvlan".
4. VW using WaveDynamics: the script is in "xiaofu@xiaofu-lnx:~/pythonwork/dvlan".
5. You can use rkscli -c "get station wlan32 stats"|grep "tx_data_frm" | cut -d " " -f "2"|grep "1" -c
to check how many vlans have data traffic

How to use WaveDynamix-Veriwave?

Using WaveDynamix-Veriwave

How to locate the where the Kernel panic happens (e.g. Bug SCG-74051)?
Step 1: Build a image the same as the one that was tested with issue (From support log and search "version" to find the branch and CL number).

Step 2: find the exact tool of the objdump to use:

cd ML/buildroot

find . -name objdump*

// the exact one to use in this case is : ./tools/3.14.43_gcc-linaro-4.8-2014.04/arm-linux-uclibcgnueabi/bin/objdump

Step 3: find the *.o file in the correct build path

in this case, it is "ML/video54/common/txctrl/txctrl_cache.o"

Step 4: use the objdump tool to decode symbols in the .o file


./tools/3.14.43_gcc-linaro-4.8-2014.04/arm-linux-uclibcgnueabi/bin/objdump -S ../video54/common/txctrl/txctrl_cache.o > txctrl_cacge.txt
Step 5: cat the .txt file to locate the problem based on the Kernel panic information, and infer where the problematic line is.
Further learninghttps://sanjeevsharmaengg.wordpress.com/tag/debug-kernel-panics/
How to locate the where the Kernel panic happens (e.g. Bug SCG-63588)?
When Kernel panic happens, use the following to capture the log:
cat /proc/v54bsp/oops
If it shows the following, it means encountering a NULL pointer for the virtual addresss 00000000
<1>CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == c07ca34c, ra == c07ca2d8 ...
Then, look up where the issue happens by finding information like:
Call Trace:
[<c07ca34c>] ieee80211_add_htinfo+0x2f4/0x400 [wlan]
Since there are many pointer in that function, in order to locate which line crashes, image needs to be rebuilded.
Step1: find the exact same image.
Step2: add the following in the Makefile.inc to enable symbol association, and then build the image (for debugging only, cannot be loaded because (1) it's
much larger and (2) reverse complication can release the codes to others):
COPTS+= -g
Step3: Search the function (e.g: ieee80211_add_htinfo+0x2f4) in to code to locate where the .c file is,
e.g. it is in "ieee80211_output.c"
Step4: Find the gdb location of the particular system from the log when make the image, e.g.:
/home/xiaofu/xiaofu.ma_5409/depot/release/ap_104.0/buildroot/tools/2.6.32.24_gcc4.3.5/bin/mips-linux-uclibc-gdb
Step4: Go to the dir of the .c file, run gdb + the .o file
/home/xiaofu/xiaofu.ma_5409/depot/release/ap_104.0/buildroot/tools/2.6.32.24_gcc4.3.5/bin/mips-linux-uclibc-gdb ieee80211_output.o
Step5: link or list the function name plus the offsite, e.g.
l *(ieee80211_add_htinfo+0x2f4)
Then, the issue is located to the specific line.
How to configure and debug VW testing issues:
How to debug SCG related issues:
How to integrate other USB device into our AP linux system:
How ioctl works:
Userspace codes (such as rsm_xxx ) call ioctl function through vector number (such as "IEEE80211_IOCTL_GETMODE");
The exact value of the vector number is defined in "ieee80211_ioctl.h"; Then, the offsite from the address can be known (such as SIOCIWFIRSTPRIV+17).
The driver code can then be found in "ieee80211_wireless.c" based on the address name and offsite, such as (iw_handler) ieee80211_ioctl_getmode,
/* SIOCIWFIRSTPRIV+18 */
Running iperf in Linux and Windows:
Linux: cd Downloads/jperf-2.0.2/ sh jperf.sh
Windows: go to Documents/jperf-2.0.2 click jperf.bat
Use Wireshark to sniff:
Using Macbook, Alt+click Wifi logo, then click "Open wireless diagnostics"
Click "Window"->"Sniffer", then select bandwidth and channel
Use Wireshark open the file, filter the packet by either (1) enter the filter or (2) right click any interested field to "apply as filter".
You may also want to right click to add column for further information.
Enable Ruckus Shell:
in rkscli: enter "get boarddata", and copy serial number to http://sesame.video54.local/sec.asp to get the shell key
in rkscli: enter "ruckus", and paste the shell key
Use USB-console in Ubuntu:
sudo picocom -b 115200 /dev/ttyUSB0
Copy screen info fro picocom to a file:
script -f -c "sudo picocom -b 115200 /dev/ttyUSB0" ./workspace/session.log
Copy file from one AP to another AP using PC as relay:
Step1: on AP1: scp filename xiaofu@172...:/tmp
Step2: on AP2: scp xiaofu@172...:/tmp ./filename
Set AP ip address:
set ipaddr wan dynamic
set ipaddr wan 192...
R610 AP and STA communication:
wlanconfig wlan8 list sta
nodestats wifi1
nodestats wifi1 15 //to see the detail transmission info
Enable auto DHCP:
Macbook: sudo ipconfig set en1 DHCP
Build for different platform:
checkout athwlan.bin for target code
AR900B: Beeliner R710, T710
AR9888: Perigrine R700, X300
IPQ4019: Dakota R510, H510
QCA9984: Cascade R610, R720
Build with different profile, eg.
make PROFILE=ap-arm-dakota-solo BR2_JLEVEL=8 all
make PROFILE=ap-arm-qca-wsg BR2_JLEVEL=8 all
In the code tree:
Search file in "sublime"
Search string in "cscope" cscope -d
iwpriv commands and others:
iwconfig wlan8 channel 36
iwpriv wlan8 cfreq2 149
CLI commands:
set countrycode US //AU, NL
Use solo image:
to avoid scg's previous pushing configurations, in rkscli, enter "set factory" and then reboot.
remove the cable physically to avoid scg pushing information.
ZD related:
set director ip 192.168.0.2
SCG related:
set scg <ip>
get scg
set scg enable
set scg disable
rkscli -c "set rpmkey apmgr-ignore-ver t" // set rpmkey wsgclient/ignore-fw 1 // rpm -p wsgclient/ignore-fw=1
set scg gwloss timeout 0
set scg serverloss timeout 0

To flash custom image in SCG mode using tftp:


fw set control rks_fw.bl7
fw set proto tftp
fw set host 172.16.108.87
fw update
Print kernel information:
printk 7
printk 3
logread -f &

Fast Transition Feature:

FT design.docx

Airtime Fairness (ATF) Feature:


ATFdesigndocument.docx

Management Frame Power Adaptation:

PerPacket_TxPower.docx

TOI_Presentation_Per_Packet_Adaptation.pdf

Ruckus DBDC Enhancement.

DBDC Workaround_v01.docx

DBDC Workaround_v02.docx

Ruckus PowerSave Mechanism.

Power Save Basics.pptx

Channelfly:
Debug commands:

cd /tmp
ls channel*
rm channelfl-wifi1.quiet
rpm -a | grep chan
logread -f | grep channel

Some documents:

channelfly_knowledgetransfer.pdf

Channelfly_review.pptx

Channelfly_TOI.pptx

Ruckus-BIG-DOGS-Channelfly.pptx

Transient Client Management (TCM) and Probe Suppression Feature in 11ax.

Presentaion on KDDI Requirements.pptx

Probe Suppression Functional Spec.docx


The codes have been merged to 11ax branches, and all the basic functions are verified. There is a potential issue of the maximum allowed users for TCM,
e.g., the current TCM table for 802.11ax with 200 capacity is easier to be full compared with 802.11ac platforms. One of the potential root cause is that in
802.11ac there is a periodical clearing of the table based on the time stamps, and in 802.11ax, we may need to add a similar timer for the cleaning.

TCM feature could be conflict with the smart roam feature. The solution for the coexistence of two features can be seem in CL-682198.

There are many differences between 802.11ax and 802.11ac codes. Please see the follow CLs for details in fisheye.

CL-682198, 679493, 677861, 675978, 675636, 673381, 672709, 672504, 667793, 666397, 664246, 664239, 648558

tftp server:
sudo service tftpd-hpa restart
Code review and submission:
Step1: find bug index from Jira: such as AP-4325
Step2: find the change list index from p4v: such as 490266
Step3: cd to */depot/releng-tools/crucibles and run
./rks-crucible.py -u xiaofu.ma -c 490266 -m AP-4325 and get review number, such as CR-15568 (may need to execute StepX first)
Step4: go to fisheye: http://fisheye.video54.local/cru/CR-15568 and add reviewer as needed.
Step5: finish the change description in P4V based on previous authors' description
Step6: shelve the code, and check the status in http://jenkins.video54.local:8080/
StepX: This following commands may be needed for p4:
p4 info
export P4CLIENT=xiaofu.ma_5409
export P4USER=xiaofu.ma
U-boot Configuration:

set ipaddr 172.16.108.123


set serverip 172.16.108.195

set bootbg bootnet ap-arm-qca-wsg/uImage.multi


set bootcmd run bootbg
saveenv

reset

or simply:
bootnet ap-arm-qca-wsg/uImage.multi

RCP-1340
How to write a CLI to set/get firmware configuration?
Method #1:
(1) add and register cli_set/get function (register it in function "cli_register_wlangroup")
in mainline/video54/apps/rkscli/rkscli_radiogroup.c
eg. cli_set_sensitivity_level()
(a) check the wlanid
(b) check missing argument
(c) call function(s) in RSM layer
(2) add RSM layer service function to use iwpriv
in mainline/video54/lib/librsm/src/rsm_wifi_channel.c
(3) add corresponding string in
in /mainline/atheros/linux/driver/madwifi/ath/ath_iw_handler.c
and /depot/atheros/linux/driver/madwifi/ath/offload-AR900B/host/include/ol_params.h

SCG-63994

Description: MU2 throughput for R720 drops to 680M for 106 branch to 104.

Root cause: PPDU duration is 4ms instead of 2ms for MU, PPDU number is 2 instead of 10.

Code Review: http://fisheye.video54.local/cru/CR-19195

Solution:

(1) add field of "WAL_PDEV_PARAM_SET_PPDU_MU_DURATION" in wal_phy_dev.h,

add pdev->ppdu_mu_dur_limit_us for MU in "ar_wal_phy_dev_ds.h",

initiate the default value for pdev->ppdu_mu_dur_limit_us in "ar_wal_tx_send.c" function of

_tx_send_attach

allow the driver to load values for pdev->ppdu_mu_dur_limit_us in "ar_wal_phy_dev.c"

_wal_set_pdev_param

(2) set the txime_us to be 2ms by using ppdu_mu_dur_limit_us for MU in "ar_wal_tx_seq.c"

_tx_send_seq_start_sequence

(3) set the num_ppdu for MU in "tx_sched_wifi_ip02.c", the two functions being changed are:

tx_sched_post_prefetch_sched_cmd

tx_sched_trigger_waitq

Trigger a management frame using btm-request command

MBO Client/AP Instructions

Stats Info:

athstats -i wifi1 -a 1

nodestats wifi1 -m -c

capstats -i wifi1 1

Partial compiling:

e.g.: to compile sessionMgr.c

First to find the target name. Usually it can be guessed by the directory of the file.

Method 1:

~/xiaofu.ma_1130/release/ap_108.1/buildroot/package$ grep -R sessionMgr .

Then find from .mk file and locate what target it belongs to:

./sessionMgr.mk:TARGETS+=sessionMgr

Method 2:

Simply guess it from the directory, and compile it partially.

e.g.:
make PROFILE=ap-arm-qca-wsg sessionMgr

Correct linking for branches' SCG:

Step 1: look at the branch info

Branching and Release info

Step 2: link the SCG to the correct one

e.g.:

cd ~/xiaofu.ma_1130/release/ap_108.1

ln -sf ~/xiaofu.ma_1130/release/sz_3.6.1/scg scg

.o file wrong format issue across platforms:

method 1:

cd video54/common/txctrl/

rm *.o

cd ..

rm *.o

method 2:

make ... build clean

TCPdump:

tcpdump -i wifi1 -w /tmp/cap1.pcap -s 0

then, move the file to the control linux machine:

scp /tmp/souce_filename [email protected]:/tmp/destination/

ZD connnection: (Only ZD image or solo image can work)

// If don't want ZD overwrites AP image.

set rpmkey apmgr-ignore-ver t

set director ip 172.18.182.8 // Set the desired ZD IP Herman's: 172.18.182.8.

get director // Get the status

One time BGscan:

iwlist wlanx scanning test ${channel} ${dwell-time} 0 0 > /dev/null

e.g. iwlist wlan32 scanning test 36 200 0 0 > /dev/null

to reset: iwpriv wifi1 pdev_reset 2

Enable BGscan Scan Time Log:

iwpriv wifi1 dl_loglevel 1

iwpriv wifi1 dl_modoff 10

iwpriv wifi1 dl_modoff 12

iwpriv wifi1 dl_modoff 13

iwpriv wifi1 dl_modoff 14

iwpriv wifi1 dl_modon 22

iwpriv wifi1 dl_modon 15

printk 7

QCA driver configuration on RKS board:

(1) Step 1: cd /etc/init.d/iwpriv wifi1 txchainmask 5


(2) Step 2: cat wlan

iwpriv wifi1 txchainmask 5

iwpriv wifi1 rxchainmask 5

wlanconfig wlan8 create wlandev wifi1 wlanmode ap

iwpriv wlan8 mode 11ACVHT80

iwpriv wlan8 shortgi 1

iwconfig wlan8 essid qca_mu_mimo

iwpriv wlan8 wds 1

iwpriv wlan8 ldpc 1

iwpriv wlan8 set_cactimeout 2

brctl addif br0 wlan8

sleep 1

ifconfig eth0 up

ifconfig eth1 up

ifconfig wlan0 up

ifconfig wlan8 up

QCA driver configuration on QCA board:


uci show wireless
uci set wireless.wifi0.channel='36'
uci set wireless.wifi0.htmode='HT80'
uci commit wireless
iwconfig ath0 ssid VPT5G
iwconfig ath0 essid VPT5G
brctl show
ifconfig br-lan
How to use AP as sniffer (e.g. Bug SCG-70830)?
set capture wifi1

set capture wifi1 stream //set it as sniffer

set capture wifi1 idle //set it back as AP

How to access Brocade ICX switch through serial port in Linux terminal:

sudo mincom ttyS0 //could be ttySX, X=1, 2, 3, ...


How to setup DVLAN testing environment?
WLAN VLANs Enhancement.docx
Dynamic VLAN-64.pptx

1. A VLAN-supported Switch (e.g. ICX7450):


a. set one port (e.g. ethernet 1/1/1 and connect this with AP) in ICX console (Step1: "en" to enable configure, Step2: "conf t" for config
terminal). The script is in xiaofu@xiaofu-lnx:~/pythonwork/dvlan.
b. set another port (e.g. ethernet 1/1/23 and connect this with AP)
2. AP: connect the AP with the SCG and set the radius server to the target server.
3. free radius server settings: the script is in "xiaofu@xiaofu-lnx:~/pythonwork/dvlan".
4. VW using WaveDynamics: the script is in "xiaofu@xiaofu-lnx:~/pythonwork/dvlan".
5. You can use rkscli -c "get station wlan32 stats"|grep "tx_data_frm" | cut -d " " -f "2"|grep "1" -c
to check how many vlans have data traffic

How to use WaveDynamix-Veriwave?

Using WaveDynamix-Veriwave
How to locate the where the Kernel panic happens (e.g. Bug SCG-74051)?
Step 1: Build a image the same as the one that was tested with issue.

Step 2: find the exact tool of the objdump to use:

cd ML/buildroot

find . -name objdump*

// the exact one to use in this case is : ./tools/3.14.43_gcc-linaro-4.8-2014.04/arm-linux-uclibcgnueabi/bin/objdump


Step 3: find the *.o file in the correct build path

in this case, it is "ML/video54/common/txctrl/txctrl_cache.o"

Step 4: use the objdump tool to decode symbols in the .o file


./tools/3.14.43_gcc-linaro-4.8-2014.04/arm-linux-uclibcgnueabi/bin/objdump -S ../video54/common/txctrl/txctrl_cache.o > txctrl_cacge.txt
Step 5: cat the .txt file to locate the problem based on the Kernel panic information, and infer where the problematic line is.
Further learninghttps://sanjeevsharmaengg.wordpress.com/tag/debug-kernel-panics/
How to locate the where the Kernel panic happens (e.g. Bug SCG-63588)?
When Kernel panic happens, use the following to capture the log:
cat /proc/v54bsp/oops
If it shows the following, it means encountering a NULL pointer for the virtual addresss 00000000
<1>CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == c07ca34c, ra == c07ca2d8 ...
Then, look up where the issue happens by finding information like:
Call Trace:
[<c07ca34c>] ieee80211_add_htinfo+0x2f4/0x400 [wlan]
Since there are many pointer in that function, in order to locate which line crashes, image needs to be rebuilded.
Step1: find the exact same image.
Step2: add the following in the Makefile.inc to enable symbol association, and then build the image (for debugging only, cannot be loaded because (1) it's
much larger and (2) reverse complication can release the codes to others):
COPTS+= -g
Step3: Search the function (e.g: ieee80211_add_htinfo+0x2f4) in to code to locate where the .c file is,
e.g. it is in "ieee80211_output.c"
Step4: Find the gdb location of the particular system from the log when make the image, e.g.:
/home/xiaofu/xiaofu.ma_5409/depot/release/ap_104.0/buildroot/tools/2.6.32.24_gcc4.3.5/bin/mips-linux-uclibc-gdb
Step4: Go to the dir of the .c file, run gdb + the .o file
/home/xiaofu/xiaofu.ma_5409/depot/release/ap_104.0/buildroot/tools/2.6.32.24_gcc4.3.5/bin/mips-linux-uclibc-gdb ieee80211_output.o
Step5: link or list the function name plus the offsite, e.g.
l *(ieee80211_add_htinfo+0x2f4)
Then, the issue is located to the specific line.
How to configure and debug VW testing issues:
How to debug SCG related issues:
How to integrate other USB device into our AP linux system:
How ioctl works:
Userspace codes (such as rsm_xxx ) call ioctl function through vector number (such as "IEEE80211_IOCTL_GETMODE");
The exact value of the vector number is defined in "ieee80211_ioctl.h"; Then, the offsite from the address can be known (such as SIOCIWFIRSTPRIV+17).
The driver code can then be found in "ieee80211_wireless.c" based on the address name and offsite, such as (iw_handler) ieee80211_ioctl_getmode,
/* SIOCIWFIRSTPRIV+18 */
Running iperf in Linux and Windows:
Linux: cd Downloads/jperf-2.0.2/ sh jperf.sh
Windows: go to Documents/jperf-2.0.2 click jperf.bat
Use Wireshark to sniff:
Using Macbook, Alt+click Wifi logo, then click "Open wireless diagnostics"
Click "Window"->"Sniffer", then select bandwidth and channel
Use Wireshark open the file, filter the packet by either (1) enter the filter or (2) right click any interested field to "apply as filter".
You may also want to right click to add column for further information.
Enable Ruckus Shell:
in rkscli: enter "get boarddata", and copy serial number to http://sesame.video54.local/sec.asp to get the shell key
in rkscli: enter "ruckus", and paste the shell key
Use USB-console in Ubuntu:
sudo picocom -b 115200 /dev/ttyUSB0
Copy screen info fro picocom to a file:
script -f -c "sudo picocom -b 115200 /dev/ttyUSB0" ./workspace/session.log
Copy file from one AP to another AP using PC as relay:
Step1: on AP1: scp filename xiaofu@172...:/tmp
Step2: on AP2: scp xiaofu@172...:/tmp ./filename
RCP-1340

How to write a CLI to set/get firmware configuration?


Method #1:
(1) add and register cli_set/get function (register it in function "cli_register_wlangroup")
in mainline/video54/apps/rkscli/rkscli_radiogroup.c
eg. cli_set_sensitivity_level()
(a) check the wlanid
(b) check missing argument
(c) call function(s) in RSM layer
(2) add RSM layer service function to use iwpriv
in mainline/video54/lib/librsm/src/rsm_wifi_channel.c
(3) add corresponding string in
in /mainline/atheros/linux/driver/madwifi/ath/ath_iw_handler.c
and /depot/atheros/linux/driver/madwifi/ath/offload-AR900B/host/include/ol_params.h

SCG-63994

Description: MU2 throughput for R720 drops to 680M for 106 branch to 104.

Root cause: PPDU duration is 4ms instead of 2ms for MU, PPDU number is 2 instead of 10.
Code Review: http://fisheye.video54.local/cru/CR-19195

Solution:

(1) add field of "WAL_PDEV_PARAM_SET_PPDU_MU_DURATION" in wal_phy_dev.h,

add pdev->ppdu_mu_dur_limit_us for MU in "ar_wal_phy_dev_ds.h",

initiate the default value for pdev->ppdu_mu_dur_limit_us in "ar_wal_tx_send.c" function of

_tx_send_attach

allow the driver to load values for pdev->ppdu_mu_dur_limit_us in "ar_wal_phy_dev.c"

_wal_set_pdev_param

(2) set the txime_us to be 2ms by using ppdu_mu_dur_limit_us for MU in "ar_wal_tx_seq.c"

_tx_send_seq_start_sequence

(3) set the num_ppdu for MU in "tx_sched_wifi_ip02.c", the two functions being changed are:

tx_sched_post_prefetch_sched_cmd

tx_sched_trigger_waitq

If you get Compile Errors: Locale ....

To compile R730, you need to apply one patch on uClibc.

IP : 10.150.21.170

id : build

pass : Lab4man1!

First of all, please ssh to the machine and create your own ID by running useradd command.

> go to build/4.4.60_gcc-linaro-4.8-2014.04/toolchain_build_arm_relesae/uClibc-0.9.33.2/extra/locale

> copy "wctype.diff" file from build user's home and then copy to current directory.

> run patch < wctype.diff

> go back to buildroot and then make again

You might also like