Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31

Thread: rt5370 debugging posts in dmesg

  1. #21
    Join Date
    Sep 2011
    Location
    Pennsylvania, U.S.A.
    Beans
    2,174
    Distro
    Ubuntu Development Release

    Re: rt5370 debugging posts in dmesg

    simon5555, perhaps I didn't read carefully but did you try just plugging your adapter in? I just purchased a 'generic' rt5370 device and it is 'plug 'n' play' on 12.04, 12.10 & 13.04. No downloads or compiling necessary.

  2. #22
    Join Date
    Feb 2013
    Beans
    17

    Re: rt5370 debugging posts in dmesg

    Ago
    kurt18947

    Thanks. The card is actually already built into the laptop and it does seem to work with the standard drivers. However the connection is unstable (it disconnects and reconnects every so often) and the signal strength is reduced (even next to the router its c80% whereas with the new driver it is at 100% almost anywhere in the flat). This is why I have been looking at switching to the new drivers.

  3. #23
    Join Date
    Sep 2011
    Location
    Pennsylvania, U.S.A.
    Beans
    2,174
    Distro
    Ubuntu Development Release

    Re: rt5370 debugging posts in dmesg

    Quote Originally Posted by simon5555 View Post
    Ago
    kurt18947

    Thanks. The card is actually already built into the laptop and it does seem to work with the standard drivers. However the connection is unstable (it disconnects and reconnects every so often) and the signal strength is reduced (even next to the router its c80% whereas with the new driver it is at 100% almost anywhere in the flat). This is why I have been looking at switching to the new drivers.
    Ah, you're using RT2800PCI (I think that's the designation), my device uses RT2800USB. I wonder if you're being affected by a hardware encryption bug. Sometimes unstable connections are helped by disabling hardware encryption and using software encryption instead. You could experiment by trying this:

    Make sure you doing this from an account with sudo privileges. Open a terminal and enter the following:

    Code:
    gksu gedit /etc/modprobe.d/rt2800pci.conf
    That should give you a new empty screen. Copy this into the blank editor:

    Code:
    options rt2800pci nohwcrypt=1
    Save and reboot. I've also seen that line as "nohwcrypt=y" once so I'm not certain which is correct, I'd
    probably go with "nohwcrypt=1". I don't believe there is any risk to this and if it doesn't help, you can simply delete the file.

  4. #24
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: rt5370 debugging posts in dmesg

    Quote Originally Posted by kurt18947 View Post
    Ah, you're using RT2800PCI (I think that's the designation), my device uses RT2800USB.
    Hi kurt,
    Even though the device is built-in, it can be on a USB bus, which is the case here -
    Quote Originally Posted by simon5555 View Post
    Code:
    simon@simon-ES1105N:~$ lspci -nnk | grep -iA2 net
    [NONE] - this is a usb card btw
    Hence it is same as an external usb adapter, natively supported by the rt2800usb driver.

    Also -
    Quote Originally Posted by kurt18947 View Post
    I wonder if you're being affected by a hardware encryption bug. Sometimes unstable connections are helped by disabling hardware encryption and using software encryption instead.
    True. But unfortunately, simon has already tried that -
    Quote Originally Posted by varunendra View Post
    Anyway, what if you try the live session driver with nohwcrypt parameter -
    Code:
    sudo modprobe -v rt2800usb nohwcrypt=y
    As an additional measure, please also make sure to turn the power management off -
    Code:
    sudo iwconfig wlan0 power off
    Does it get any more stable?
    ..with no significant improvement -
    Quote Originally Posted by simon5555 View Post
    No notable impact/result. rt2870usb isn't stable though....
    .... again -
    Quote Originally Posted by simon5555 View Post
    I am postng this from under the liveCD start up. This is running with a different driver, of course........ The wireless connection is not solid though - sometimes it connects with 70% signal strength and sometimes 100%, occasionally may drop the connection and then reconnects.

    But I like your curiosity, and so I think you deserve an explanation to whatever doubts you have -
    Quote Originally Posted by kurt18947 View Post
    I've also seen that line as "nohwcrypt=y" once so I'm not certain which is correct, I'd
    probably go with "nohwcrypt=1".
    1/0 are integer values and Y/N are Boolean values to logical true/false respectively. Although so far I have always seen '1' work where 'Y' is expected, but I prefer to go with what is expected by the driver.

    To see what the driver expects, simply use modinfo command with the driver. For example -

    Code:
    ubuntu@ubuntu:~$ modinfo rt2800usb
    filename:       /lib/modules/3.5.0-23-generic/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
    ....
    ....
    ....
    ....
    vermagic:       3.5.0-23-generic SMP mod_unload modversions 686 
    parm:         nohwcrypt:Disable hardware encryption. (bool)
    Note that the only parameter available for the rt2800usb driver is 'nohwcrypt', and it expects a (bool) value, means Y or N (small y and n are also valid).
    But like I said, if you use '1' instead of 'Y', it gets accepted too.

    Now if you run modinfo ath9k, it lists the same parameter with (int) value-
    modinfo ath9k
    filename: /lib/modules/3.2.0-36-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko
    ....
    parm: nohwcrypt: Disable hardware encryption (int)
    Means only integer 1 or 0 are acceptable values. If you try sudo modprobe -v ath9k nohwcrypt=y, it gives error -
    FATAL: Error inserting ath9k (/lib/modules/3.2.0-36-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko): Invalid argument
    So in my experience so far, (int) 1 or 0 values have always been acceptable even where (bool) was expected, but the vice-versa is not true.

    One more thing -
    Quote Originally Posted by kurt18947 View Post
    I don't believe there is any risk to this and if it doesn't help, you can simply delete the file.
    Well, as we saw in the above example, there IS a minor risk - the driver simply does not get loaded if a parameter is wrong. Either there should be no parameter (defaults will be loaded), or it should be correct.

    Hope you didn't fall asleep while reading this
    Last edited by varunendra; March 15th, 2013 at 09:10 AM.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

  5. #25
    Join Date
    Sep 2011
    Location
    Pennsylvania, U.S.A.
    Beans
    2,174
    Distro
    Ubuntu Development Release

    Re: rt5370 debugging posts in dmesg

    Thank you for that, Varun. Very instructive.

  6. #26
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: rt5370 debugging posts in dmesg

    You're welcome !
    As long as you are willing to learn, there are instructors here who can explain much better in much less words.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

  7. #27
    Join Date
    Feb 2013
    Beans
    17

    Re: rt5370 debugging posts in dmesg

    Hi,

    Varun is right, it is a built in card on usb:
    Code:
    simon@simon-ES1105N:~$ lsusb
    Bus 001 Device 003: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
    Bus 002 Device 002: ID 1131:1004 Integrated System Solution Corp. Bluetooth Device
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    I think I may have nailed the debug output issue. They seem to have forgotten to put DBG ifdef/endif the right way around, i.e. debug switches in [path]/sta/sta_cfg.c. The solution seems to be to make the following adjustments in [path]/sta/sta_cfg.c:
    - move "#endif" statement from line 4694 to line 4537;
    - insert "#ifdef DBG" just before the "RTMPIoctlMAC(pAd, pRequest);" call on line 7286 and "#endif" immediately after;
    - insert "#ifdef DBG" just before the "RTMPIoctlE2PROM(pAd, pRequest);" call on line 7291 and "#endif" immediately after;

    After that it compiles, albeit giving some warnings, installs and dmesg is quiet even running under network-manager .

    Code:
    [   11.906852] rtusb init rt2870 --->
    [   11.913400] usbcore: registered new interface driver rt2870
    [   11.918914] microcode: CPU0 sig=0x30661, pf=0x8, revision=0x10c
    [   11.985155] input: HDA Intel HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input5
    [   11.985536] input: HDA Intel Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input6
    [   11.985855] input: HDA Intel Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7
    [   12.153385] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
    [   12.156614] type=1400 audit(1363370347.131:2): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient" pid=667 comm="apparmor_parser"
    [   12.157726] type=1400 audit(1363370347.131:3): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=667 comm="apparmor_parser"
    [   12.158318] type=1400 audit(1363370347.131:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=667 comm="apparmor_parser"
    [   12.458002] microcode: CPU1 sig=0x30661, pf=0x8, revision=0x10c
    [   12.463906] microcode: CPU2 sig=0x30661, pf=0x8, revision=0x10c
    [   12.470025] microcode: CPU3 sig=0x30661, pf=0x8, revision=0x10c
    [   12.476091] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
    [   12.483964] coretemp coretemp.0: Unable to read TjMax from CPU 0
    [   12.483999] coretemp coretemp.0: Using relative temperature scale!
    [   12.484044] coretemp coretemp.0: Unable to read TjMax from CPU 2
    [   12.484071] coretemp coretemp.0: Using relative temperature scale!
    [   12.612337] psmouse serio2: synaptics: Touchpad model: 1, fw: 7.2, id: 0x1c0b1, caps: 0xd04733/0xa40000/0xa0000
    [   12.665228] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio2/input/input8
    [   13.184719] init: failsafe main process (797) killed by TERM signal
    [   13.295511] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [   13.295523] Bluetooth: BNEP filters: protocol multicast
    [   13.303352] Bluetooth: RFCOMM TTY layer initialized
    [   13.303371] Bluetooth: RFCOMM socket layer initialized
    [   13.303378] Bluetooth: RFCOMM ver 1.11
    [   13.462337] ppdev: user-space parallel port driver
    [   13.520287] type=1400 audit(1363370348.495:5): apparmor="STATUS" operation="profile_load" name="/usr/lib/cups/backend/cups-pdf" pid=882 comm="apparmor_parser"
    [   13.527417] type=1400 audit(1363370348.503:6): apparmor="STATUS" operation="profile_load" name="/usr/sbin/cupsd" pid=882 comm="apparmor_parser"
    [   13.562065] type=1400 audit(1363370348.539:7): apparmor="STATUS" operation="profile_load" name="/usr/lib/lightdm/lightdm/lightdm-guest-session-wrapper" pid=889 comm="apparmor_parser"
    [   13.567814] type=1400 audit(1363370348.543:8): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=890 comm="apparmor_parser"
    [   13.569413] type=1400 audit(1363370348.543:9): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=890 comm="apparmor_parser"
    [   13.570546] type=1400 audit(1363370348.547:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=890 comm="apparmor_parser"
    [   13.582080] type=1400 audit(1363370348.559:11): apparmor="STATUS" operation="profile_load" name="/usr/bin/evince" pid=891 comm="apparmor_parser"
    [   14.981011] 0x1300 = 00064300
    [   15.194176] init: plymouth-stop pre-start process (1188) terminated with status 1
    [   16.130899] 0x1300 = 00064300
    [   18.068952] Adding 2083836k swap on /dev/mapper/cryptswap1.  Priority:-1 extents:1 across:2083836k SS
    Code:
    simon@simon-ES1105N:~$ iwconfig
    ra0       Ralink STA  ESSID:"MTS_2775724"  Nickname:"RT2870STA"
              Mode:Managed  Frequency=2.462 GHz  Access Point: BC:76:70:05:1A:98   
              Bit Rate=135 Mb/s   
              RTS thr:off   Fragment thr:off
              Link Quality=100/100  Signal level:-44 dBm  Noise level:-73 dBm
              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
              Tx excessive retries:0  Invalid misc:0   Missed beacon:0
    
    
    lo        no wireless extensions.
    Cheers, Simon

  8. #28
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: rt5370 debugging posts in dmesg

    Quote Originally Posted by simon5555 View Post
    I think I may have nailed the debug output issue. They seem to have forgotten to put DBG ifdef/endif the right way around, i.e. debug switches in [path]/sta/sta_cfg.c. The solution seems to be to make the following adjustments in [path]/sta/sta_cfg.c:
    - move "#endif" statement from line 4694 to line 4537;
    - insert "#ifdef DBG" just before the "RTMPIoctlMAC(pAd, pRequest);" call on line 7286 and "#endif" immediately after;
    - insert "#ifdef DBG" just before the "RTMPIoctlE2PROM(pAd, pRequest);" call on line 7291 and "#endif" immediately after;

    After that it compiles, albeit giving some warnings, installs and dmesg is quiet even running under network-manager .
    Please keep it on testbed for a while, and post back about connectivity and stability. If all good, I think it may be the Golden Post of the month !
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

  9. #29
    Join Date
    Feb 2013
    Beans
    17

    Re: rt5370 debugging posts in dmesg

    Tested it for a few days with the newly compiled driver and have had no problems with wifi stability/connectivity/signal strength. dmesg is also dead quiet . Of course there is a simpler way of amending the code by simply removing "#ifdef DBG" on line 4095 and "endif /* DBG */" on line 4693.

    So, the eventual procedure to install rt5370 driver with debug messages switched off is:

    1. download driver archive 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2 .5.0.3_DPO.bz2 (RT8070/RT3070/RT3370/RT5370/RT5372 USB 03/28/2012 2.5.0.3 from http://www.mediatek.com/_en/07_downl...ows.php?sn=501)

    2. unpack it where ever you saved it to and go into the folder:
    Code:
    tar -xvf 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2
    cd 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO
    3. amend os/linux/config.mk:
    HAS_WPA_SUPPLICANT=y instead of HAS_WPA_SUPPLICANT=n
    HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y instead of HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n
    WFLAGS += -DCONFIG_STA_SUPPORT instead of WFLAGS += -DCONFIG_STA_SUPPORT -DDBG

    4. amend sta/sta-cfg.c:
    remove "#ifdef DBG" on line 4095
    remove "endif /* DBG */" on line 4693

    5. if required (i.e. if compilation gives off errors) run

    Code:
    sudo apt-get install build-essential linux-headers-generic
    6. compile it and install

    Code:
    sudo make
    sudo make install
    modprobe rt5370sta
    7. blacklist old drivers by inserting at the end of /etc/modprobe.d/blacklist.conf:
    blacklist rt2800usb
    blacklist rt2x00lib
    blacklist rt2x00usb

    8. reboot

    and the wifi should be there with no debugging messages in dmesg.

  10. #30
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: rt5370 debugging posts in dmesg

    Grrreat!! Bookmarked for sure!

    Thanks a lot for your time and contribution. Wish I knew a way to award medals to individual posts .
    But I do know to rate threads (not sure if normal users can see it), and going to rate this one as "Excellent" - credit all yours
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

Page 3 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •