Forums - Maintain Monitor Mode through power cycle

4 posts / 0 new
Last post
Maintain Monitor Mode through power cycle
jshenry1963
Join Date: 17 Nov 20
Posts: 34
Posted: Mon, 2021-04-12 04:30

Hello All,

I have monitor mode working great on my Dell laptop running ubuntu 18.04. Using insmod with con_mode=4.

Is there a way to have it keep this configuration through a power cycle?

When I do cycle power on the Dell, the QCA9377-7 seems to load and run ok, just not in monitor mode.

Then, the only way to change from non-monitor mode to monitor mode, is to 

rmmod wlan

remove the USB module from the USB slot immediately after rmmod wlan above

type in the insmod ... con_mode=4

place the USB module back into the USB slow, and IMMEDIATELY hit enter on the insmod, before linux can detect and load.

Easy to do, but, won't be a usable method for my user.

I'm hoping it is just a config.ini file setting I'm missing.

Thanks in advance.

John

 

  • Up0
  • Down0
ddeepakk Moderator
Join Date: 27 Jun 17
Posts: 144
Posted: Mon, 2021-04-12 07:07

Hi John,

The insmod with con_mode is only available option.

Alternatively, you can modify driver's code to always insmod with con_mode option set. You can study the driver code and make changes.

I have never tried it but you can give a try with below code change:

//wlan_hdd_main_module.c
static int __init hdd_module_init ( void)

{
+ con_mode = 4;
register_wlan_module_parameters_callback(
con_mode,
 

Thanks.

  • Up0
  • Down0
jshenry1963
Join Date: 17 Nov 20
Posts: 34
Posted: Tue, 2021-04-20 11:00

Thank you very much....

I made that modification to the driver, recompiled, and I don't have to do the remove device / reinsert device anymore.

For some reason it doesn't default to sniffer mode (con_mode=4) even though I am forcing it, but, that is ok, because I can power up the unit, do an insmod xxxx con_mode=4 and sniffer works like a champ.

This is more than sufficient for my testing, and even demo on a hand held unit for now.

Thanks so much for the most excellent support.

I might change how it works to reading an ini file, and if con_mode=x is present, use that mode, else just boot 'em up as is.

 

Best

John 

 

  • Up0
  • Down0
ddeepakk Moderator
Join Date: 27 Jun 17
Posts: 144
Posted: Tue, 2021-04-20 22:52

Hi John,

Great.
Glad that it helped.

Thanks.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.