ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
* ath10k - spectral scan - and - channel change
       [not found] ` <1472714547.6626259.1487882069484@mail.yahoo.com>
@ 2017-02-24  6:49   ` Will Kerr
  2017-03-06 16:57     ` Will Kerr
  0 siblings, 1 reply; 9+ messages in thread
From: Will Kerr @ 2017-02-24  6:49 UTC (permalink / raw)
  To: ath10k@lists.infradead.org

Hello, I searched the mail archives but couldn't find a clue to my question so here it is:

Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating. 


Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:

1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)

2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)


The problem is:

ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
the error I get is:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device



ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range. 

the error I get is one of: 

root@OpenWrt:~# iw dev wlan0 set channel 112

command failed: Device or resource busy (-16)
or
root@OpenWrt:~# iw dev wlan0 set channel 104
command failed: Invalid argument (-22)



Is there anything I can do to get both working?

Thanks. Will

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k - spectral scan - and - channel change
  2017-02-24  6:49   ` ath10k - spectral scan - and - channel change Will Kerr
@ 2017-03-06 16:57     ` Will Kerr
  2017-03-06 18:15       ` Shajakhan, Mohammed Shafi (Mohammed Shafi)
  0 siblings, 1 reply; 9+ messages in thread
From: Will Kerr @ 2017-03-06 16:57 UTC (permalink / raw)
  To: ath10k@lists.infradead.org



pinging and compacting the Q just in case the experts have an idea on this..


Is it possible to control spectral_scan_ctl whilst in AP mode?
my result:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device

or 


change channel whilst in Monitor mode?
my result:

root@OpenWrt:~# iw dev wlan0 set channel 112
command failed: Device or resource busy (-16)

Thanks Will.





________________________________
From: Will Kerr <willjkerr@yahoo.co.uk>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org> 
Sent: Friday, 24 February 2017, 6:49
Subject: ath10k - spectral scan - and - channel change


Hello, I searched the mail archives but couldn't find a clue to my question so here it is:

Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating. 


Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:

1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)

2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)


The problem is:

ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
the error I get is:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device



ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range. 


the error I get is one of: 

root@OpenWrt:~# iw dev wlan0 set channel 112

command failed: Device or resource busy (-16)
or
root@OpenWrt:~# iw dev wlan0 set channel 104
command failed: Invalid argument (-22)



Is there anything I can do to get both working?

Thanks. Will

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k - spectral scan - and - channel change
  2017-03-06 16:57     ` Will Kerr
@ 2017-03-06 18:15       ` Shajakhan, Mohammed Shafi (Mohammed Shafi)
  2017-03-07 10:37         ` Fw: " Will Kerr
  0 siblings, 1 reply; 9+ messages in thread
From: Shajakhan, Mohammed Shafi (Mohammed Shafi) @ 2017-03-06 18:15 UTC (permalink / raw)
  To: ath10k@lists.infradead.org, Will Kerr

please follow
https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral

please check if phy0 does exists ?
________________________________________
From: ath10k <ath10k-bounces@lists.infradead.org> on behalf of Will Kerr <willjkerr@yahoo.co.uk>
Sent: 06 March 2017 22:27
To: ath10k@lists.infradead.org
Subject: Re: ath10k - spectral scan - and - channel change

pinging and compacting the Q just in case the experts have an idea on this..


Is it possible to control spectral_scan_ctl whilst in AP mode?
my result:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device

or


change channel whilst in Monitor mode?
my result:

root@OpenWrt:~# iw dev wlan0 set channel 112
command failed: Device or resource busy (-16)

Thanks Will.





________________________________
From: Will Kerr <willjkerr@yahoo.co.uk>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Sent: Friday, 24 February 2017, 6:49
Subject: ath10k - spectral scan - and - channel change


Hello, I searched the mail archives but couldn't find a clue to my question so here it is:

Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating.


Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:

1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)

2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)


The problem is:

ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
the error I get is:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device



ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range.


the error I get is one of:

root@OpenWrt:~# iw dev wlan0 set channel 112

command failed: Device or resource busy (-16)
or
root@OpenWrt:~# iw dev wlan0 set channel 104
command failed: Invalid argument (-22)



Is there anything I can do to get both working?

Thanks. Will

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Fw: ath10k - spectral scan - and - channel change
  2017-03-06 18:15       ` Shajakhan, Mohammed Shafi (Mohammed Shafi)
@ 2017-03-07 10:37         ` Will Kerr
       [not found]           ` <693914393.8639779.1489485635460@mail.yahoo.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Will Kerr @ 2017-03-07 10:37 UTC (permalink / raw)
  To: ath10k@lists.infradead.org

Thank you for looking into this.. I'm really sorry for the confusion, my second email reversed what the problem really is. Now clarified **below**:

Is it possible to control spectral_scan_ctl whilst in **Monitor mode**?
my result:

root at OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device

or 

change channel whilst in **AP mode**?
my result:

root at OpenWrt:~# iw dev wlan0 set channel 112
command failed: Device or resource busy (-16)



and to your questions:
(1)
following  https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral - yes, I am able to obtain the spectral_scan0 data OK whilst in AP mode (although I was not able to do root@OpenWrt:~# iw dev wlan0 scan .. command failed: Device or resource busy (-16), I dont know why, I was still able to get scan data OK)

(2)
I get the same result for the below 3 commands if its set to AP mode, Monitor mode, or off (according to the setup in openWRT). I'm sorry, I dont know if there are more commands I should try to confirm things..

root@OpenWrt:~# iw phy0 info
Wiphy phy0
max # scan SSIDs: 16
max scan IEs length: 199 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports AP-side u-APSD.
Available Antennas: TX 0x7 RX 0x7
Configured Antennas: TX 0x7 RX 0x7
Supported interface modes:
* managed
* AP
* AP/VLAN
* monitor
...
...
...
(plus more, that I removed )

root@OpenWrt:~# dmesg | grep phy0
root@OpenWrt:~#

root@OpenWrt:~# ls /sys/kernel/debug/ieee80211/phy0/ath10k/spectral*
/sys/kernel/debug/ieee80211/phy0/ath10k/spectral_bins
/sys/kernel/debug/ieee80211/phy0/ath10k/spectral_count
/sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0
/sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl


Thank you, Will





----- Forwarded Message -----
From: "Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Will Kerr <willjkerr@yahoo.co.uk>
Sent: Monday, 6 March 2017, 18:15
Subject: Re: ath10k - spectral scan - and - channel change

please follow
https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral

please check if phy0 does exists ?
________________________________________
From: ath10k <ath10k-bounces@lists.infradead.org> on behalf of Will Kerr <willjkerr@yahoo.co.uk>
Sent: 06 March 2017 22:27
To: ath10k@lists.infradead.org
Subject: Re: ath10k - spectral scan - and - channel change

pinging and compacting the Q just in case the experts have an idea on this..


Is it possible to control spectral_scan_ctl whilst in AP mode?
my result:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device

or


change channel whilst in Monitor mode?
my result:

root@OpenWrt:~# iw dev wlan0 set channel 112
command failed: Device or resource busy (-16)

Thanks Will.





________________________________
From: Will Kerr <willjkerr@yahoo.co.uk>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Sent: Friday, 24 February 2017, 6:49
Subject: ath10k - spectral scan - and - channel change


Hello, I searched the mail archives but couldn't find a clue to my question so here it is:

Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating.


Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:

1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)

2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)


The problem is:

ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
the error I get is:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device



ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range.


the error I get is one of:

root@OpenWrt:~# iw dev wlan0 set channel 112

command failed: Device or resource busy (-16)
or
root@OpenWrt:~# iw dev wlan0 set channel 104
command failed: Invalid argument (-22)



Is there anything I can do to get both working?

Thanks. Will

_______________________________________________
ath10k mailing list

ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k - spectral scan - and - channel change
       [not found]           ` <693914393.8639779.1489485635460@mail.yahoo.com>
@ 2017-03-14 10:03             ` Will Kerr
  2017-03-14 16:23               ` Mohammed Shafi Shajakhan
  0 siblings, 1 reply; 9+ messages in thread
From: Will Kerr @ 2017-03-14 10:03 UTC (permalink / raw)
  To: ath10k@lists.infradead.org,
	Shajakhan Mohammed Shafi (Mohammed Shafi)



p.s. I am looking to do both commands whilst in a single mode (AP, monitor, I dont really mind). 


Thanks



________________________________
From: Will Kerr <willjkerr@yahoo.co.uk>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org> 
Sent: Tuesday, 7 March 2017, 10:37
Subject: Fw: ath10k - spectral scan - and - channel change


Thank you for looking into this.. I'm really sorry for the confusion, my second email reversed what the problem really is. Now clarified **below**:

Is it possible to control spectral_scan_ctl whilst in **Monitor mode**?
my result:

root at OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device

or 

change channel whilst in **AP mode**?
my result:

root at OpenWrt:~# iw dev wlan0 set channel 112
command failed: Device or resource busy (-16)



and to your questions:
(1)
following  https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral - yes, I am able to obtain the spectral_scan0 data OK whilst in AP mode (although I was not able to do root@OpenWrt:~# iw dev wlan0 scan .. command failed: Device or resource busy (-16), I dont know why, I was still able to get scan data OK)

(2)
I get the same result for the below 3 commands if its set to AP mode, Monitor mode, or off (according to the setup in openWRT). I'm sorry, I dont know if there are more commands I should try to confirm things..

root@OpenWrt:~# iw phy0 info
Wiphy phy0
max # scan SSIDs: 16
max scan IEs length: 199 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports AP-side u-APSD.
Available Antennas: TX 0x7 RX 0x7
Configured Antennas: TX 0x7 RX 0x7
Supported interface modes:
* managed
* AP
* AP/VLAN
* monitor
...
...
...
(plus more, that I removed )

root@OpenWrt:~# dmesg | grep phy0
root@OpenWrt:~#

root@OpenWrt:~# ls /sys/kernel/debug/ieee80211/phy0/ath10k/spectral*
/sys/kernel/debug/ieee80211/phy0/ath10k/spectral_bins
/sys/kernel/debug/ieee80211/phy0/ath10k/spectral_count
/sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0
/sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl


Thank you, Will






----- Forwarded Message -----
From: "Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Will Kerr <willjkerr@yahoo.co.uk>
Sent: Monday, 6 March 2017, 18:15
Subject: Re: ath10k - spectral scan - and - channel change

please follow
https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral

please check if phy0 does exists ?
________________________________________
From: ath10k <ath10k-bounces@lists.infradead.org> on behalf of Will Kerr <willjkerr@yahoo.co.uk>
Sent: 06 March 2017 22:27
To: ath10k@lists.infradead.org
Subject: Re: ath10k - spectral scan - and - channel change

pinging and compacting the Q just in case the experts have an idea on this..


Is it possible to control spectral_scan_ctl whilst in AP mode?
my result:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device

or


change channel whilst in Monitor mode?
my result:

root@OpenWrt:~# iw dev wlan0 set channel 112
command failed: Device or resource busy (-16)

Thanks Will.





________________________________
From: Will Kerr <willjkerr@yahoo.co.uk>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Sent: Friday, 24 February 2017, 6:49
Subject: ath10k - spectral scan - and - channel change


Hello, I searched the mail archives but couldn't find a clue to my question so here it is:

Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating.


Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:

1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)

2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)


The problem is:

ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
the error I get is:

root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device



ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range.


the error I get is one of:

root@OpenWrt:~# iw dev wlan0 set channel 112

command failed: Device or resource busy (-16)
or
root@OpenWrt:~# iw dev wlan0 set channel 104
command failed: Invalid argument (-22)



Is there anything I can do to get both working?

Thanks. Will

_______________________________________________
ath10k mailing list

ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k - spectral scan - and - channel change
  2017-03-14 10:03             ` Will Kerr
@ 2017-03-14 16:23               ` Mohammed Shafi Shajakhan
  2017-03-15 11:14                 ` Will Kerr
  0 siblings, 1 reply; 9+ messages in thread
From: Mohammed Shafi Shajakhan @ 2017-03-14 16:23 UTC (permalink / raw)
  To: Will Kerr
  Cc: ath10k@lists.infradead.org,
	Shajakhan Mohammed Shafi (Mohammed Shafi)

> Thank you for looking into this.. I'm really sorry for the confusion, my second email reversed what the problem really is. Now clarified **below**:
> 
> Is it possible to control spectral_scan_ctl whilst in **Monitor mode**?
> my result:
> 
> root at OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device

[shafi] hmmm interesting .. looks like you need to bring the interface up,
before doing this, the WMI command may respond error

> 
> or 
> 
> change channel whilst in **AP mode**?
> my result:
> 
> root at OpenWrt:~# iw dev wlan0 set channel 112
> command failed: Device or resource busy (-16)

[shafi] again you need to bring the interface up and also check if this channel
is not disabled 

iw phy0 info

> 
> 
> 
> and to your questions:
> (1)
> following  https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral - yes, I am able to obtain the spectral_scan0 data OK whilst in AP mode (although I was not able to do root@OpenWrt:~# iw dev wlan0 scan .. command failed: Device or resource busy (-16), I dont know why, I was still able to get scan data OK)

[shafi] just check 'ap-force' is supported (or) not

> 
> (2)
> I get the same result for the below 3 commands if its set to AP mode, Monitor mode, or off (according to the setup in openWRT). I'm sorry, I dont know if there are more commands I should try to confirm things..


[shafi] i have not tried in monitor i can give a try some time ..
you can fine tune the below script ...
before sending spectral commands

1. make sure the interface is up
2. the channel is properly set
3. the mode is properly set
4. in AP mode 'ap-force' scan option is used ..


set -x

echo 0x2 > /sys/module/ath10k_core/parameters/debug_mask
dmesg -n8

echo "=========================================="
echo "Dumping existing spectral scan data"
sleep 1

cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_bins
cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_count

sleep 3


spectral_bin=$1
spectral_count=$2
ifconfig wlan1 up
sleep 2
echo $spectral_bin > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_bins
echo $spectral_count > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_count
echo manual > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
echo trigger > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
iw dev wlan1 scan ap-force
sleep 1
cp /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan0
/tmp/sample-$spectral_bin.fft
echo disable > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl

sleep 2
ls -lart /tmp/sample**
set +x



> 
> root@OpenWrt:~# iw phy0 info
> Wiphy phy0
> max # scan SSIDs: 16
> max scan IEs length: 199 bytes
> Retry short limit: 7
> Retry long limit: 4
> Coverage class: 0 (up to 0m)
> Device supports AP-side u-APSD.
> Available Antennas: TX 0x7 RX 0x7
> Configured Antennas: TX 0x7 RX 0x7
> Supported interface modes:
> * managed
> * AP
> * AP/VLAN
> * monitor
> ...
> ...
> ...
> (plus more, that I removed )
> 
> root@OpenWrt:~# dmesg | grep phy0
> root@OpenWrt:~#
> 
> root@OpenWrt:~# ls /sys/kernel/debug/ieee80211/phy0/ath10k/spectral*
> /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_bins
> /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_count
> /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0
> /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> 
> 
> Thank you, Will
> 
> 
> 
> 
> 
> 
> ----- Forwarded Message -----
> From: "Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
> To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Will Kerr <willjkerr@yahoo.co.uk>
> Sent: Monday, 6 March 2017, 18:15
> Subject: Re: ath10k - spectral scan - and - channel change
> 
> please follow
> https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral
> 
> please check if phy0 does exists ?
> ________________________________________
> From: ath10k <ath10k-bounces@lists.infradead.org> on behalf of Will Kerr <willjkerr@yahoo.co.uk>
> Sent: 06 March 2017 22:27
> To: ath10k@lists.infradead.org
> Subject: Re: ath10k - spectral scan - and - channel change
> 
> pinging and compacting the Q just in case the experts have an idea on this..
> 
> 
> Is it possible to control spectral_scan_ctl whilst in AP mode?
> my result:
> 
> root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device
> 
> or
> 
> 
> change channel whilst in Monitor mode?
> my result:
> 
> root@OpenWrt:~# iw dev wlan0 set channel 112
> command failed: Device or resource busy (-16)
> 
> Thanks Will.
> 
> 
> 
> 
> 
> ________________________________
> From: Will Kerr <willjkerr@yahoo.co.uk>
> To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
> Sent: Friday, 24 February 2017, 6:49
> Subject: ath10k - spectral scan - and - channel change
> 
> 
> Hello, I searched the mail archives but couldn't find a clue to my question so here it is:
> 
> Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating.
> 
> 
> Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:
> 
> 1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)
> 
> 2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)
> 
> 
> The problem is:
> 
> ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
> the error I get is:
> 
> root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device
> 
> 
> 
> ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range.
> 
> 
> the error I get is one of:
> 
> root@OpenWrt:~# iw dev wlan0 set channel 112
> 
> command failed: Device or resource busy (-16)
> or
> root@OpenWrt:~# iw dev wlan0 set channel 104
> command failed: Invalid argument (-22)
> 
> 
> 
> Is there anything I can do to get both working?
> 
> Thanks. Will
> 
> _______________________________________________
> ath10k mailing list
> 
> ath10k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath10k
> 
> _______________________________________________
> ath10k mailing list
> ath10k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k - spectral scan - and - channel change
  2017-03-14 16:23               ` Mohammed Shafi Shajakhan
@ 2017-03-15 11:14                 ` Will Kerr
  2017-03-15 11:26                   ` Mohammed Shafi Shajakhan
  0 siblings, 1 reply; 9+ messages in thread
From: Will Kerr @ 2017-03-15 11:14 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan
  Cc: ath10k@lists.infradead.org,
	Shajakhan Mohammed Shafi (Mohammed Shafi)

> [shafi] hmmm interesting .. looks like you need to bring the interface up,
> before doing this, the WMI command may respond error

I thought it was, at least now when I try:

AP mode:
(its OK)

Monitor Mode:
root@OpenWrt:~# ifconfig wlan0 up
root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device



> iw phy0 info
* 5560 MHz [112] (24.0 dBm) (no IR, radar detection)
DFS state: usable (for 4036 sec)



> shafi] just check 'ap-force' is supported (or) not

I dont think it is supported on my ArcherC7 openWRT for some reason:
AP mode: 
root@OpenWrt:~# ifconfig wlan0 up
root@OpenWrt:~# iw  wlan0 scan
command failed: Device or resource busy (-16)
root@OpenWrt:~# iw  wlan0 scan ap-force
command failed: Device or resource busy (-16)

Monitor Mode:
root@OpenWrt:~# ifconfig wlan0 up
root@OpenWrt:~# iw  wlan0 scan
command failed: Operation not supported (-122)
root@OpenWrt:~# iw  wlan0 scan ap-force
command failed: Operation not supported (-122)


> [shafi] i have not tried in monitor i can give a try some time ..
That would be great, if you could confirm my problem.. e.g. in Monitor Mode:

root@OpenWrt:~# ifconfig wlan0 up
root@OpenWrt:~# echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: No such device
root@OpenWrt:~# echo trigger > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
ash: write error: Invalid argument
root@OpenWrt:~# cat  /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
disableroot@OpenWrt:~#



> you can fine tune the below script ...
I ran it, and it fails on the iw wlan0 scan ap-force part ...
(...)
+ iw dev wlan0 scan ap-force
command failed: Device or resource busy (-16)
(...)





The reason I am trying to do both (control spectral_scan_ctl and change channels) is because it works fine in ath9k monitor mode..

Thanks again.



----- Original Message -----
From: Mohammed Shafi Shajakhan <mohammed@codeaurora.org>
To: Will Kerr <willjkerr@yahoo.co.uk>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Shajakhan Mohammed Shafi (Mohammed Shafi) <mohammed@qti.qualcomm.com>
Sent: Tuesday, 14 March 2017, 16:23
Subject: Re: ath10k - spectral scan - and - channel change

> Thank you for looking into this.. I'm really sorry for the confusion, my second email reversed what the problem really is. Now clarified **below**:
> 
> Is it possible to control spectral_scan_ctl whilst in **Monitor mode**?
> my result:
> 
> root at OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device

[shafi] hmmm interesting .. looks like you need to bring the interface up,
before doing this, the WMI command may respond error

> 
> or 
> 
> change channel whilst in **AP mode**?
> my result:
> 
> root at OpenWrt:~# iw dev wlan0 set channel 112
> command failed: Device or resource busy (-16)

[shafi] again you need to bring the interface up and also check if this channel
is not disabled 

iw phy0 info

> 
> 
> 
> and to your questions:
> (1)
> following  https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral - yes, I am able to obtain the spectral_scan0 data OK whilst in AP mode (although I was not able to do root@OpenWrt:~# iw dev wlan0 scan .. command failed: Device or resource busy (-16), I dont know why, I was still able to get scan data OK)

[shafi] just check 'ap-force' is supported (or) not

> 
> (2)
> I get the same result for the below 3 commands if its set to AP mode, Monitor mode, or off (according to the setup in openWRT). I'm sorry, I dont know if there are more commands I should try to confirm things..


[shafi] i have not tried in monitor i can give a try some time ..
you can fine tune the below script ...
before sending spectral commands

1. make sure the interface is up
2. the channel is properly set
3. the mode is properly set
4. in AP mode 'ap-force' scan option is used ..


set -x

echo 0x2 > /sys/module/ath10k_core/parameters/debug_mask
dmesg -n8

echo "=========================================="
echo "Dumping existing spectral scan data"
sleep 1

cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_bins
cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_count

sleep 3


spectral_bin=$1
spectral_count=$2
ifconfig wlan1 up
sleep 2
echo $spectral_bin > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_bins
echo $spectral_count > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_count
echo manual > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
echo trigger > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
iw dev wlan1 scan ap-force
sleep 1
cp /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan0
/tmp/sample-$spectral_bin.fft
echo disable > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl

sleep 2
ls -lart /tmp/sample**
set +x



> 
> root@OpenWrt:~# iw phy0 info
> Wiphy phy0
> max # scan SSIDs: 16
> max scan IEs length: 199 bytes
> Retry short limit: 7
> Retry long limit: 4
> Coverage class: 0 (up to 0m)
> Device supports AP-side u-APSD.
> Available Antennas: TX 0x7 RX 0x7
> Configured Antennas: TX 0x7 RX 0x7
> Supported interface modes:
> * managed
> * AP
> * AP/VLAN
> * monitor
> ...
> ...
> ...
> (plus more, that I removed )
> 
> root@OpenWrt:~# dmesg | grep phy0
> root@OpenWrt:~#
> 
> root@OpenWrt:~# ls /sys/kernel/debug/ieee80211/phy0/ath10k/spectral*
> /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_bins
> /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_count
> /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0
> /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> 
> 
> Thank you, Will
> 
> 
> 
> 
> 
> 
> ----- Forwarded Message -----
> From: "Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
> To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Will Kerr <willjkerr@yahoo.co.uk>
> Sent: Monday, 6 March 2017, 18:15
> Subject: Re: ath10k - spectral scan - and - channel change
> 
> please follow
> https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral
> 
> please check if phy0 does exists ?
> ________________________________________
> From: ath10k <ath10k-bounces@lists.infradead.org> on behalf of Will Kerr <willjkerr@yahoo.co.uk>
> Sent: 06 March 2017 22:27
> To: ath10k@lists.infradead.org
> Subject: Re: ath10k - spectral scan - and - channel change
> 
> pinging and compacting the Q just in case the experts have an idea on this..
> 
> 
> Is it possible to control spectral_scan_ctl whilst in AP mode?
> my result:
> 
> root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device
> 
> or
> 
> 
> change channel whilst in Monitor mode?
> my result:
> 
> root@OpenWrt:~# iw dev wlan0 set channel 112
> command failed: Device or resource busy (-16)
> 
> Thanks Will.
> 
> 
> 
> 
> 
> ________________________________
> From: Will Kerr <willjkerr@yahoo.co.uk>
> To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
> Sent: Friday, 24 February 2017, 6:49
> Subject: ath10k - spectral scan - and - channel change
> 
> 
> Hello, I searched the mail archives but couldn't find a clue to my question so here it is:
> 
> Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating.
> 
> 
> Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:
> 
> 1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)
> 
> 2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)
> 
> 
> The problem is:
> 
> ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
> the error I get is:
> 
> root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device
> 
> 
> 
> ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range.
> 
> 
> the error I get is one of:
> 
> root@OpenWrt:~# iw dev wlan0 set channel 112
> 
> command failed: Device or resource busy (-16)
> or
> root@OpenWrt:~# iw dev wlan0 set channel 104
> command failed: Invalid argument (-22)
> 
> 
> 
> Is there anything I can do to get both working?
> 
> Thanks. Will
> 
> _______________________________________________
> ath10k mailing list
> 
> ath10k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath10k

> 
> _______________________________________________
> ath10k mailing list
> ath10k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k - spectral scan - and - channel change
  2017-03-15 11:14                 ` Will Kerr
@ 2017-03-15 11:26                   ` Mohammed Shafi Shajakhan
  2017-03-15 11:46                     ` Will Kerr
  0 siblings, 1 reply; 9+ messages in thread
From: Mohammed Shafi Shajakhan @ 2017-03-15 11:26 UTC (permalink / raw)
  To: Will Kerr
  Cc: ath10k@lists.infradead.org,
	Shajakhan Mohammed Shafi (Mohammed Shafi)

On Wed, Mar 15, 2017 at 11:14:19AM +0000, Will Kerr wrote:
> > [shafi] hmmm interesting .. looks like you need to bring the interface up,
> > before doing this, the WMI command may respond error
> 
> I thought it was, at least now when I try:
> 
> AP mode:
> (its OK)
> 
> Monitor Mode:
> root@OpenWrt:~# ifconfig wlan0 up
> root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device

[shafi] may sound dumb (need to check), first cd to 
cd /sys/kernel/debug/ieee80211/phy0/ath10k
echo disable > spectral_scan_ctl

> 
> 
> 
> > iw phy0 info
> * 5560 MHz [112] (24.0 dBm) (no IR, radar detection)
> DFS state: usable (for 4036 sec)
> 
> 
> 
> > shafi] just check 'ap-force' is supported (or) not
> 
> I dont think it is supported on my ArcherC7 openWRT for some reason:
> AP mode: 
> root@OpenWrt:~# ifconfig wlan0 up
> root@OpenWrt:~# iw  wlan0 scan
> command failed: Device or resource busy (-16)
> root@OpenWrt:~# iw  wlan0 scan ap-force
> command failed: Device or resource busy (-16)
> 
> Monitor Mode:
> root@OpenWrt:~# ifconfig wlan0 up
> root@OpenWrt:~# iw  wlan0 scan
> command failed: Operation not supported (-122)
> root@OpenWrt:~# iw  wlan0 scan ap-force
> command failed: Operation not supported (-122)
>

[shafi] good to see if you have latest hostapd and ath10k backports

> 
> > [shafi] i have not tried in monitor i can give a try some time ..
> That would be great, if you could confirm my problem.. e.g. in Monitor Mode:
> 
> root@OpenWrt:~# ifconfig wlan0 up
> root@OpenWrt:~# echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device
> root@OpenWrt:~# echo trigger > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: Invalid argument
> root@OpenWrt:~# cat  /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> disableroot@OpenWrt:~#
> 
> 
> 
> > you can fine tune the below script ...
> I ran it, and it fails on the iw wlan0 scan ap-force part ...
> (...)
> + iw dev wlan0 scan ap-force
> command failed: Device or resource busy (-16)
> (...)
> 
> 
> 
> 
> 
> The reason I am trying to do both (control spectral_scan_ctl and change channels) is because it works fine in ath9k monitor mode..
> 
>

[shafi] ok, we can check that , i think for ath9k the complete support is in
driver (no firmware)
> 
> 
> ----- Original Message -----
> From: Mohammed Shafi Shajakhan <mohammed@codeaurora.org>
> To: Will Kerr <willjkerr@yahoo.co.uk>
> Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Shajakhan Mohammed Shafi (Mohammed Shafi) <mohammed@qti.qualcomm.com>
> Sent: Tuesday, 14 March 2017, 16:23
> Subject: Re: ath10k - spectral scan - and - channel change
> 
> > Thank you for looking into this.. I'm really sorry for the confusion, my second email reversed what the problem really is. Now clarified **below**:
> > 
> > Is it possible to control spectral_scan_ctl whilst in **Monitor mode**?
> > my result:
> > 
> > root at OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> > ash: write error: No such device
> 
> [shafi] hmmm interesting .. looks like you need to bring the interface up,
> before doing this, the WMI command may respond error
> 
> > 
> > or 
> > 
> > change channel whilst in **AP mode**?
> > my result:
> > 
> > root at OpenWrt:~# iw dev wlan0 set channel 112
> > command failed: Device or resource busy (-16)
> 
> [shafi] again you need to bring the interface up and also check if this channel
> is not disabled 
> 
> iw phy0 info
> 
> > 
> > 
> > 
> > and to your questions:
> > (1)
> > following  https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral - yes, I am able to obtain the spectral_scan0 data OK whilst in AP mode (although I was not able to do root@OpenWrt:~# iw dev wlan0 scan .. command failed: Device or resource busy (-16), I dont know why, I was still able to get scan data OK)
> 
> [shafi] just check 'ap-force' is supported (or) not
> 
> > 
> > (2)
> > I get the same result for the below 3 commands if its set to AP mode, Monitor mode, or off (according to the setup in openWRT). I'm sorry, I dont know if there are more commands I should try to confirm things..
> 
> 
> [shafi] i have not tried in monitor i can give a try some time ..
> you can fine tune the below script ...
> before sending spectral commands
> 
> 1. make sure the interface is up
> 2. the channel is properly set
> 3. the mode is properly set
> 4. in AP mode 'ap-force' scan option is used ..
> 
> 
> set -x
> 
> echo 0x2 > /sys/module/ath10k_core/parameters/debug_mask
> dmesg -n8
> 
> echo "=========================================="
> echo "Dumping existing spectral scan data"
> sleep 1
> 
> cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
> cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_bins
> cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_count
> 
> sleep 3
> 
> 
> spectral_bin=$1
> spectral_count=$2
> ifconfig wlan1 up
> sleep 2
> echo $spectral_bin > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_bins
> echo $spectral_count > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_count
> echo manual > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
> echo trigger > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
> iw dev wlan1 scan ap-force
> sleep 1
> cp /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan0
> /tmp/sample-$spectral_bin.fft
> echo disable > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
> 
> sleep 2
> ls -lart /tmp/sample**
> set +x
> 
> 
> 
> > 
> > root@OpenWrt:~# iw phy0 info
> > Wiphy phy0
> > max # scan SSIDs: 16
> > max scan IEs length: 199 bytes
> > Retry short limit: 7
> > Retry long limit: 4
> > Coverage class: 0 (up to 0m)
> > Device supports AP-side u-APSD.
> > Available Antennas: TX 0x7 RX 0x7
> > Configured Antennas: TX 0x7 RX 0x7
> > Supported interface modes:
> > * managed
> > * AP
> > * AP/VLAN
> > * monitor
> > ...
> > ...
> > ...
> > (plus more, that I removed )
> > 
> > root@OpenWrt:~# dmesg | grep phy0
> > root@OpenWrt:~#
> > 
> > root@OpenWrt:~# ls /sys/kernel/debug/ieee80211/phy0/ath10k/spectral*
> > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_bins
> > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_count
> > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0
> > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> > 
> > 
> > Thank you, Will
> > 
> > 
> > 
> > 
> > 
> > 
> > ----- Forwarded Message -----
> > From: "Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
> > To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Will Kerr <willjkerr@yahoo.co.uk>
> > Sent: Monday, 6 March 2017, 18:15
> > Subject: Re: ath10k - spectral scan - and - channel change
> > 
> > please follow
> > https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral
> > 
> > please check if phy0 does exists ?
> > ________________________________________
> > From: ath10k <ath10k-bounces@lists.infradead.org> on behalf of Will Kerr <willjkerr@yahoo.co.uk>
> > Sent: 06 March 2017 22:27
> > To: ath10k@lists.infradead.org
> > Subject: Re: ath10k - spectral scan - and - channel change
> > 
> > pinging and compacting the Q just in case the experts have an idea on this..
> > 
> > 
> > Is it possible to control spectral_scan_ctl whilst in AP mode?
> > my result:
> > 
> > root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> > ash: write error: No such device
> > 
> > or
> > 
> > 
> > change channel whilst in Monitor mode?
> > my result:
> > 
> > root@OpenWrt:~# iw dev wlan0 set channel 112
> > command failed: Device or resource busy (-16)
> > 
> > Thanks Will.
> > 
> > 
> > 
> > 
> > 
> > ________________________________
> > From: Will Kerr <willjkerr@yahoo.co.uk>
> > To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
> > Sent: Friday, 24 February 2017, 6:49
> > Subject: ath10k - spectral scan - and - channel change
> > 
> > 
> > Hello, I searched the mail archives but couldn't find a clue to my question so here it is:
> > 
> > Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating.
> > 
> > 
> > Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:
> > 
> > 1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)
> > 
> > 2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)
> > 
> > 
> > The problem is:
> > 
> > ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
> > the error I get is:
> > 
> > root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> > ash: write error: No such device
> > 
> > 
> > 
> > ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range.
> > 
> > 
> > the error I get is one of:
> > 
> > root@OpenWrt:~# iw dev wlan0 set channel 112
> > 
> > command failed: Device or resource busy (-16)
> > or
> > root@OpenWrt:~# iw dev wlan0 set channel 104
> > command failed: Invalid argument (-22)
> > 
> > 
> > 
> > Is there anything I can do to get both working?
> > 
> > Thanks. Will
> > 
> > _______________________________________________
> > ath10k mailing list
> > 
> > ath10k@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/ath10k
> 
> > 
> > _______________________________________________
> > ath10k mailing list
> > ath10k@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k - spectral scan - and - channel change
  2017-03-15 11:26                   ` Mohammed Shafi Shajakhan
@ 2017-03-15 11:46                     ` Will Kerr
  0 siblings, 0 replies; 9+ messages in thread
From: Will Kerr @ 2017-03-15 11:46 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan
  Cc: ath10k@lists.infradead.org,
	Shajakhan Mohammed Shafi (Mohammed Shafi)

not dumb at all - I started to try most things, here what happens when I tried it:


root@OpenWrt:~# cd /sys/kernel/debug/ieee80211/phy0/ath10k/
root@OpenWrt:/sys/kernel/debug/ieee80211/phy0/ath10k# echo disable > spectral_scan_ctl
ash: write error: No such device
root@OpenWrt:/sys/kernel/debug/ieee80211/phy0/ath10k#



> [shafi] good to see if you have latest hostapd and ath10k backports
are these the right commands / what you would expect? ( I notice no mention of ath10k in lsmod)


root@OpenWrt:~# hostapd -v
hostapd v2.5-devel
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi> and contributors


root@OpenWrt:~# lsmod | grep compat
compat                  1120  5 ath9k

root@OpenWrt:~# dmesg | grep backport
[   11.800000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   11.810000] Backport generated by backports.git backports-20150129-0-gdd4a670
root@OpenWrt:~#


> [shafi] ok, we can check that , i think for ath9k the complete support is in

driver (no firmware)

OK thanks, 



________________________________
From: Mohammed Shafi Shajakhan <mohammed@codeaurora.org>
To: Will Kerr <willjkerr@yahoo.co.uk> 
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Shajakhan Mohammed Shafi (Mohammed Shafi) <mohammed@qti.qualcomm.com>
Sent: Wednesday, 15 March 2017, 11:26
Subject: Re: ath10k - spectral scan - and - channel change


On Wed, Mar 15, 2017 at 11:14:19AM +0000, Will Kerr wrote:
> > [shafi] hmmm interesting .. looks like you need to bring the interface up,
> > before doing this, the WMI command may respond error
> 
> I thought it was, at least now when I try:
> 
> AP mode:
> (its OK)
> 
> Monitor Mode:
> root@OpenWrt:~# ifconfig wlan0 up
> root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device

[shafi] may sound dumb (need to check), first cd to 
cd /sys/kernel/debug/ieee80211/phy0/ath10k
echo disable > spectral_scan_ctl

> 
> 
> 
> > iw phy0 info
> * 5560 MHz [112] (24.0 dBm) (no IR, radar detection)
> DFS state: usable (for 4036 sec)
> 
> 
> 
> > shafi] just check 'ap-force' is supported (or) not
> 
> I dont think it is supported on my ArcherC7 openWRT for some reason:
> AP mode: 
> root@OpenWrt:~# ifconfig wlan0 up
> root@OpenWrt:~# iw  wlan0 scan
> command failed: Device or resource busy (-16)
> root@OpenWrt:~# iw  wlan0 scan ap-force
> command failed: Device or resource busy (-16)
> 
> Monitor Mode:
> root@OpenWrt:~# ifconfig wlan0 up
> root@OpenWrt:~# iw  wlan0 scan
> command failed: Operation not supported (-122)
> root@OpenWrt:~# iw  wlan0 scan ap-force
> command failed: Operation not supported (-122)
>

[shafi] good to see if you have latest hostapd and ath10k backports

> 
> > [shafi] i have not tried in monitor i can give a try some time ..
> That would be great, if you could confirm my problem.. e.g. in Monitor Mode:
> 
> root@OpenWrt:~# ifconfig wlan0 up
> root@OpenWrt:~# echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: No such device
> root@OpenWrt:~# echo trigger > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> ash: write error: Invalid argument
> root@OpenWrt:~# cat  /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> disableroot@OpenWrt:~#
> 
> 
> 
> > you can fine tune the below script ...
> I ran it, and it fails on the iw wlan0 scan ap-force part ...
> (...)
> + iw dev wlan0 scan ap-force
> command failed: Device or resource busy (-16)
> (...)
> 
> 
> 
> 
> 
> The reason I am trying to do both (control spectral_scan_ctl and change channels) is because it works fine in ath9k monitor mode..
> 
>

[shafi] ok, we can check that , i think for ath9k the complete support is in
driver (no firmware)

> 
> 
> ----- Original Message -----
> From: Mohammed Shafi Shajakhan <mohammed@codeaurora.org>
> To: Will Kerr <willjkerr@yahoo.co.uk>
> Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Shajakhan Mohammed Shafi (Mohammed Shafi) <mohammed@qti.qualcomm.com>
> Sent: Tuesday, 14 March 2017, 16:23
> Subject: Re: ath10k - spectral scan - and - channel change
> 
> > Thank you for looking into this.. I'm really sorry for the confusion, my second email reversed what the problem really is. Now clarified **below**:
> > 
> > Is it possible to control spectral_scan_ctl whilst in **Monitor mode**?
> > my result:
> > 
> > root at OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> > ash: write error: No such device
> 
> [shafi] hmmm interesting .. looks like you need to bring the interface up,
> before doing this, the WMI command may respond error
> 
> > 
> > or 
> > 
> > change channel whilst in **AP mode**?
> > my result:
> > 
> > root at OpenWrt:~# iw dev wlan0 set channel 112
> > command failed: Device or resource busy (-16)
> 
> [shafi] again you need to bring the interface up and also check if this channel
> is not disabled 
> 
> iw phy0 info
> 
> > 
> > 
> > 
> > and to your questions:
> > (1)
> > following  https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral - yes, I am able to obtain the spectral_scan0 data OK whilst in AP mode (although I was not able to do root@OpenWrt:~# iw dev wlan0 scan .. command failed: Device or resource busy (-16), I dont know why, I was still able to get scan data OK)
> 
> [shafi] just check 'ap-force' is supported (or) not
> 
> > 
> > (2)
> > I get the same result for the below 3 commands if its set to AP mode, Monitor mode, or off (according to the setup in openWRT). I'm sorry, I dont know if there are more commands I should try to confirm things..
> 
> 
> [shafi] i have not tried in monitor i can give a try some time ..
> you can fine tune the below script ...
> before sending spectral commands
> 
> 1. make sure the interface is up
> 2. the channel is properly set
> 3. the mode is properly set
> 4. in AP mode 'ap-force' scan option is used ..
> 
> 
> set -x
> 
> echo 0x2 > /sys/module/ath10k_core/parameters/debug_mask
> dmesg -n8
> 
> echo "=========================================="
> echo "Dumping existing spectral scan data"
> sleep 1
> 
> cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
> cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_bins
> cat /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_count
> 
> sleep 3
> 
> 
> spectral_bin=$1
> spectral_count=$2
> ifconfig wlan1 up
> sleep 2
> echo $spectral_bin > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_bins
> echo $spectral_count > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_count
> echo manual > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
> echo trigger > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
> iw dev wlan1 scan ap-force
> sleep 1
> cp /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan0
> /tmp/sample-$spectral_bin.fft
> echo disable > /sys/kernel/debug/ieee80211/phy1/ath10k/spectral_scan_ctl
> 
> sleep 2
> ls -lart /tmp/sample**
> set +x
> 
> 
> 
> > 
> > root@OpenWrt:~# iw phy0 info
> > Wiphy phy0
> > max # scan SSIDs: 16
> > max scan IEs length: 199 bytes
> > Retry short limit: 7
> > Retry long limit: 4
> > Coverage class: 0 (up to 0m)
> > Device supports AP-side u-APSD.
> > Available Antennas: TX 0x7 RX 0x7
> > Configured Antennas: TX 0x7 RX 0x7
> > Supported interface modes:
> > * managed
> > * AP
> > * AP/VLAN
> > * monitor
> > ...
> > ...
> > ...
> > (plus more, that I removed )
> > 
> > root@OpenWrt:~# dmesg | grep phy0
> > root@OpenWrt:~#
> > 
> > root@OpenWrt:~# ls /sys/kernel/debug/ieee80211/phy0/ath10k/spectral*
> > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_bins
> > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_count
> > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0
> > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> > 
> > 
> > Thank you, Will
> > 
> > 
> > 
> > 
> > 
> > 
> > ----- Forwarded Message -----
> > From: "Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
> > To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>; Will Kerr <willjkerr@yahoo.co.uk>
> > Sent: Monday, 6 March 2017, 18:15
> > Subject: Re: ath10k - spectral scan - and - channel change
> > 
> > please follow
> > https://wireless.wiki.kernel.org/en/users/drivers/ath10k/spectral
> > 
> > please check if phy0 does exists ?
> > ________________________________________
> > From: ath10k <ath10k-bounces@lists.infradead.org> on behalf of Will Kerr <willjkerr@yahoo.co.uk>
> > Sent: 06 March 2017 22:27
> > To: ath10k@lists.infradead.org
> > Subject: Re: ath10k - spectral scan - and - channel change
> > 
> > pinging and compacting the Q just in case the experts have an idea on this..
> > 
> > 
> > Is it possible to control spectral_scan_ctl whilst in AP mode?
> > my result:
> > 
> > root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> > ash: write error: No such device
> > 
> > or
> > 
> > 
> > change channel whilst in Monitor mode?
> > my result:
> > 
> > root@OpenWrt:~# iw dev wlan0 set channel 112
> > command failed: Device or resource busy (-16)
> > 
> > Thanks Will.
> > 
> > 
> > 
> > 
> > 
> > ________________________________
> > From: Will Kerr <willjkerr@yahoo.co.uk>
> > To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
> > Sent: Friday, 24 February 2017, 6:49
> > Subject: ath10k - spectral scan - and - channel change
> > 
> > 
> > Hello, I searched the mail archives but couldn't find a clue to my question so here it is:
> > 
> > Im interested in performing a spectral scan of as much of the spectrum as possible, and quickly. this means scanning a channel for some time, changing channels, and repeating.
> > 
> > 
> > Background: when configuring an ath9k radio to Monitor mode, it is possible to do 2 things:
> > 
> > 1) change wifi channel via command line, e.g. iw dev wlan1 set channel 3. This does it seemingly quickly, without taking down the interface (good)
> > 
> > 2) control the debugfs files like  /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl (good)
> > 
> > 
> > The problem is:
> > 
> > ath10k, in Monitor mode, I am only able to change channels - 1) iw dev wlan0 set channel 104, but not access the debugfs files  2) (which is essential to control and obtain the spectral scan result)
> > the error I get is:
> > 
> > root@OpenWrt:~# echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
> > ash: write error: No such device
> > 
> > 
> > 
> > ath10k, in AP mode, The opposite occurs - I am only able to access debugfs files  2) , but not change channel 1), which is annoying because I cant then scan the entire possible range.
> > 
> > 
> > the error I get is one of:
> > 
> > root@OpenWrt:~# iw dev wlan0 set channel 112
> > 
> > command failed: Device or resource busy (-16)
> > or
> > root@OpenWrt:~# iw dev wlan0 set channel 104
> > command failed: Invalid argument (-22)
> > 
> > 
> > 
> > Is there anything I can do to get both working?
> > 
> > Thanks. Will
> > 
> > _______________________________________________
> > ath10k mailing list
> > 
> > ath10k@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/ath10k
> 
> > 
> > _______________________________________________
> > ath10k mailing list
> > ath10k@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-03-15 11:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1472714547.6626259.1487882069484.ref@mail.yahoo.com>
     [not found] ` <1472714547.6626259.1487882069484@mail.yahoo.com>
2017-02-24  6:49   ` ath10k - spectral scan - and - channel change Will Kerr
2017-03-06 16:57     ` Will Kerr
2017-03-06 18:15       ` Shajakhan, Mohammed Shafi (Mohammed Shafi)
2017-03-07 10:37         ` Fw: " Will Kerr
     [not found]           ` <693914393.8639779.1489485635460@mail.yahoo.com>
2017-03-14 10:03             ` Will Kerr
2017-03-14 16:23               ` Mohammed Shafi Shajakhan
2017-03-15 11:14                 ` Will Kerr
2017-03-15 11:26                   ` Mohammed Shafi Shajakhan
2017-03-15 11:46                     ` Will Kerr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox