Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(solved-finally) Driver options #53

Closed
GeneDot3 opened this issue Mar 17, 2021 · 30 comments
Closed

(solved-finally) Driver options #53

GeneDot3 opened this issue Mar 17, 2021 · 30 comments

Comments

@GeneDot3
Copy link

GeneDot3 commented Mar 17, 2021

Could you please give advice on how to interrogate, and potentially modify, the various driver options found when you issue the "ls /sys/module/88x2bu/parameters" command?

Thanks in advance.

@morrownr
Copy link
Owner

Certainly.

Open a terminal
Change to the driver directory - $ cd ~/src/88x2bu
Run - $ sudo ./edit-options.sh

That script puts you in the nano editor that is editing the file 88x2bu.conf

That file documents and sets defaults for the parameters (options) that I thought would be useful for most users that would be looking for drivers here. Realtek does a terrible job of documenting the parameters. Massive amounts of research, code reading and testing is what I used to document the parameters that I documented.

A lot of the undocumented parameters are just that, undocumented. Simple things can take an incredible amount of work when working on these Realtek drivers. I'm trying to help one of the other users here get to the bottom of why WPA3 doesn't work. WPA3 works wonderfully with my mt7612u based adapters. It does WPA3 and WPA3 Transitional in managed, master and monitor modes flawlessly. But then the mt7612u driver is in-kernel and is well maintained and is Linux Wireless standards compliant.

I maintain these Realtek drivers as pay back to the community. Hopefully it helps new users that are bringing existing adapters. That does not make me a fan of Realtek. I am not. I do not recommend that Linux users spend new money on Realtek based adapters. When Realtek gets their USB WiFi drivers in the kernel, where they belong, we can readdress my opinion of Realtek.

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 17, 2021 via email

@morrownr
Copy link
Owner

Gene, I do have information on a few more parameters but it is for parameters that should not be high interest items and the info is not organized. If anyone asked a question that can be solved with one of the undocumented parameters that I am familiar with then I will provide the best answer I can. If you run onto good documentation on a parameter that you think should be documented, please write it up and submit it so we can make the information available. Do keep in mind that most folks that show up here are just looking to get their adapter going in managed mode and they want the installation to be simple and painless. If we make the docs longer and more complicated, that is more information than maybe is necessary and it hurts the installation experience. It is a judgement call.

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 18, 2021 via email

@morrownr
Copy link
Owner

morrownr commented Mar 18, 2021

Gene, it sounds like you are running the 'save-log.sh' script. That script is designed to extract only the lines that apply to this driver from the main dmesg log file. If there are no lines related to this driver in the dmesg log file, then you get the message you are seeing. That indicates that you have left the driver log file parameter (option) at its default of zero. Zero turns logging off. Logging is for troubleshooting so there is no need for us to waste cpu time when we are not troubleshooting.

You need to set a non-zero number on the rtw_drv_log_level parameter in the 88x2bu.conf file.

Run $ sudo ./edit-options.sh from the driver directory and modify the line that starts with options

Change the zero after rtw_drv_log_level= to 4 and then, ctrl-x, y, enter to save the file. Reboot and try save-log.sh again.

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 18, 2021 via email

@morrownr
Copy link
Owner

Well, we need to figure out what is going on. Can you run edit-options.sh then copy and paste the options line here?

The default is as follows:

options 88x2bu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgnt=1 rtw_switch_usb_mode=0

The line modified to enable log level 4 would look like this:

options 88x2bu rtw_drv_log_level=4 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgnt=1 rtw_switch_usb_mode=0

@morrownr morrownr changed the title Driver options (in progress) Driver options Mar 19, 2021
@GeneDot3
Copy link
Author

GeneDot3 commented Mar 19, 2021 via email

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 19, 2021 via email

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 19, 2021 via email

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 19, 2021 via email

@morrownr
Copy link
Owner

Quote: "Also. while I was looking at the list of parameters I noticed 2 things: there is no 'rtw_drv_log_level' listed
and there is one named 'rtw_advnace_ota' that looks like it may be a typo for 'rtw_advance_ota'. "

Where are you seeing this?


Quote: "there is a '!' in front of the '="0""

It needs to be there for the logic to work.


Are you get output if you run the sollowing?

$ sudo dmesg

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 19, 2021 via email

@morrownr
Copy link
Owner

@GeneDot3

I'm going to be busy for the next few days but will take another look at this when able.

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 20, 2021 via email

@morrownr
Copy link
Owner

Gene,

I hope your mouth is better at this point. Now, where are you with the issue?

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 25, 2021 via email

@morrownr
Copy link
Owner

Gene,

I have a Raspberry Pi 4b and a Raspberry Pi 3b. If I can get you to tell me exactly what hardware and software you are using, I can probably duplicate your setup and we can get to the bottom of this.

  • Exactly which Raspberry Pi are you using?

  • Tell me everything that you have plugged into the USB ports in detail.

  • Do you use a powered USB hub?

  • What power supply are you using?

  • What operating system are you using?

  • What are you trying to accomplish with this setup? As in what programs are you running?

Nick

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 28, 2021 via email

@morrownr
Copy link
Owner

morrownr commented Mar 29, 2021

Gene,

I have read and pondered this thread a couple of times now. While I cannot say that I see a smoking gun, I will just throw some things out here for you to look at.

"Official Raspberry Pi 2A power supply (120vac)"

That has me concerned. The RasPi4b calls for a 3A power supply, not 2A. This new Pi4b is more power hungry than previous versions. The 4B USB subsystem will supply up to 1.2A to USB adapters but I don't think there is anywhere near 1.2A left over to use if your power supply is only providing 2A. The WiFi adapter, if based on a 8812bu chipset, can pull at least .5A by itself. A lack of enough power to your USB subsystem could explain some of this funny business.

"Used as a Network bridge"

My Pi4b's primary job is as a bridged access point (5g and 2g). It also runs BOINC 24/7 doing medical research and various other things but there is still plenty of CPU power to support high throughput access point operation. I'm going to tell you something you probably don't want to hear but I don't use an adapter based on a 8812bu chipset as an AP (access point). I have tried and tried to get stable performance with this driver and a 8812bu based adapter and I just can't do it with 11ac and USB 3. Of the 5 Realtek drivers that I support here, only 2 of them can max perform in a stable manner when working in AP mode... 8812au and 8821au (with a 8811au chipset).

The adapter that I use with my RasPi4b is a Alfa AWUS036ACM. It is based on a mt7612u chipset. It is more expensive than most adapters with a rtl8812bu chipset but it is such a pleasure to use. The driver for it is in-kernel so you don't have to fuss with compiling a driver. It auto-detects USB 3 and switches automatically. The driver supports WPA3 and WPA3 transitional so you can set your WPA3 devices to WPA3 instead of WPA2. mt7612u adapters also use less power. I have measured it to use between 180 to 360 mA with the 360 when it is maxed out. This makes it a wonderful match with a RasPi4b given that we are dealing with a USB subsystem that has limited power capability. I have a repo for info on the my7612u...

https://github.com/morrownr/7612u

I use the setup outlined in this file...

Bridged_Wireless_Access_Point-2.md

Back to the issue at hand...

It might be a good idea to just run...

$ sudo ./remove-driver.sh

and then delete the driver folder and reboot and then start the installation process again clean.

Once the driver is installed, don't change any of the driver parameters (options). How about we see how far we get with the access point setup and only touch the driver options when necessary to get faster speeds so that we can see where things go wrong. Also, please check into the power supply issue. 2A is really not good enough for a 4b.

Oh, and could you tell me what software you are using for bridged access point mode?

Let me know.

Nick

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 29, 2021 via email

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 29, 2021 via email

@morrownr
Copy link
Owner

morrownr commented Mar 29, 2021

Gene,

I am not seeing problems in journalctl on my 4B. Here are the first 7 lines of my 88x2bu.conf file:

# /etc/modprobe.d/88x2bu.conf
#
# Purpose: Allow easy access to specific driver options.
#
# Edit the following line to change options
#
options 88x2bu rtw_drv_log_level=2 rtw_led_ctrl=0 rtw_vht_enable=2 rtw_power_mgnt=1 rtw_switch_usb_mode=1

What I think we need to do is make sure you are editing the correct 88x2bu.conf file. Do not edit the one in the driver directory. Edit this one:

$ sudo mousepad /etc/modprobe.d/88x2bu.conf

Note that I changed from using nano as the editor and I specified the exact location of the file. You should be able to copy my "options" line above and paste it over yours, at least for testing.

On another subject: Are you using hostpad?

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 29, 2021 via email

@morrownr
Copy link
Owner

"Not using hostapd as it was not in the implementation I followed. Is that a problem?"

That is not a problem. I'm just trying get a handle on what you are doing. I use and am familiar with hostapd so I might be limited help with a different setup until I have a chance to figure it out. However, the more important issue seems to be that you have some kind of interference going on. I run my RasPi4b headless via VNC. Do you have the ability to run headless or with corded keyboard and mouse? It sure sounds like interference right in that area where the USB ports are.

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 29, 2021 via email

@morrownr
Copy link
Owner

For what it is worth: Unless you really like messing with iptables and dnsmasq, hostapd makes things a little easier. I can point you toward a tutorial if you like.

Kodi may not work well headless. But nothing works that well with interference. If you are using two little usb devices, one for the keyboard and one for the mouse, they may be interfering with each other.

@GeneDot3
Copy link
Author

GeneDot3 commented Mar 30, 2021 via email

@morrownr
Copy link
Owner

morrownr commented Apr 5, 2021

Gene,

Sorry about being slow with the tutorial but I have a few too many irons in the fire right now.

First, I have to say that you were right about there being a problem with the log. I had some time this afternoon to investigate. I found a problem that I simply had overlooked. Please run $ sudo ./remove-driver.sh and then delete the driver directory and then start over. Tell me if things work better once you set a log level and reboot.

I keep a tutorial here:

https://github.com/morrownr/8812au/blob/5.9.3.2/Bridged_Wireless_Access_Point.md

I only keep the tutorial in the repo for the 8812au and 8811au drivers because the other drivers are problematic in AP mode. It is for a Raspberry Pi. I can't remember, is that what you have?

Nick

@morrownr morrownr changed the title (in progress) Driver options (solved-finally) Driver options Apr 5, 2021
@GeneDot3
Copy link
Author

GeneDot3 commented Apr 5, 2021 via email

@morrownr morrownr closed this as completed Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants