WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ralink RT5370 WiFi support  (Read 12546 times)

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
ralink RT5370 WiFi support
« on: September 16, 2013, 09:18:00 AM »
Hi Gerrelt and bmarkus

Now I have received my ralink wifi adaptor (the same as Gerrelt) - using the newest version 5 alpha 2.

It is not working out of the box. What I have found out is the following:
1. crc-ccitt.ko is present in picore 5
Code: [Select]
tc@box:/$ sudo find / -name crc-ccitt.ko
/lib/modules/3.10.10-piCore/kernel/lib/crc-ccitt.ko


2. The wifi card is seen by lsusb:
Code: [Select]
tc@box:/$ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
[b]Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter[/b]
Bus 001 Device 005: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard

3. The modules are present in picore 5:
Code: [Select]
tc@box:/$ sudo find / -name rt2*
/tmp/tcloop/wireless-3.10.10-piCore/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00
/tmp/tcloop/wireless-3.10.10-piCore/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2500usb.ko
/tmp/tcloop/wireless-3.10.10-piCore/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2800lib.ko
/tmp/tcloop/wireless-3.10.10-piCore/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
/tmp/tcloop/wireless-3.10.10-piCore/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2x00lib.ko
/tmp/tcloop/wireless-3.10.10-piCore/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2x00usb.ko
/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00
/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2x00usb.ko
/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2x00lib.ko
/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2800lib.ko
/lib/modules/3.10.10-piCore/kernel/drivers/net/wireless/rt2x00/rt2500usb.ko

The problems:
1. However neither the modules nor crc-ccitt are loaded when the ralink wifi stick is inserted:
Code: [Select]
tc@box:/$ lsmod
Module                  Size  Used by    Not tainted
snd_usb_audio         115452  0
snd_usbmidi_lib        18030  1 snd_usb_audio
snd_rawmidi            20169  1 snd_usbmidi_lib
snd_seq_device          6022  1 snd_rawmidi
snd_hwdep               5889  1 snd_usb_audio
snd_bcm2835            16061  0
snd_pcm                75191  2 snd_usb_audio,snd_bcm2835
snd_page_alloc          4672  1 snd_pcm
snd_timer              19230  1 snd_pcm
snd                    54082  8 snd_usb_audio,snd_usbmidi_lib,snd_rawmidi,snd_seq_device,snd_hwdep,snd_bcm2835,snd_pcm,snd_timer
squashfs               25727 25
lzo_decompress          1377  1 squashfs


2. I´m sure that we need to add the firmware.
So would it be possible to make a ralink_firmware.tcz containing this directory structure:
/lib/firmware/rt2870.bin
then mksquashfs it and make a MD5sum file?

Then put these two files in the mmcblk0p2/tce/optional directory?

Steen
« Last Edit: September 16, 2013, 10:29:22 AM by sbp »

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: ralink RT5370 WiFi support
« Reply #1 on: September 17, 2013, 07:08:29 AM »
I will try to compile the drivers as soon as I've got the kernel header files on my TinyCore Raspberry.
If that succeeds, creating a ralink_firmware.tcz sounds like a good idea.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: ralink RT5370 WiFi support
« Reply #2 on: September 17, 2013, 07:38:27 AM »
Hi Gerrelt

The following is what I think - so it might be wrong.
What drivers are you missing? As far as I can see all the modules are there. So there is no need to compile anything.
In my understanding of the problem we just need the firmware which can be downloaded from ralink. However, I haven't figured out how to "inject" the firmware into piCore via a tcz package.

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: ralink RT5370 WiFi support
« Reply #3 on: September 17, 2013, 07:55:54 AM »
Steen

do you have the firmware in any format or a link where to find it?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: ralink RT5370 WiFi support
« Reply #4 on: September 17, 2013, 08:14:58 AM »
bmarcus

In this post there is a description of the problem in raspberry and a link to where the firmware can be downloaded:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=22623

I have extracted rt2800.bin and you can get it here:
http://rapidshare.com/share/7AEC3967476E958ECF7601F5F5245BD5


PS: I think that there might be a problem with how piCore 5 handles USB devices compared with 4.7.7.

If booting 4.7.7 with the ralink wifi attached, it finds and loads the correct ralink modules and the crc-ccitt module (just complaining about missing firmware).
If booting 5 with the ralink wifi attached it does not find and boot the ralink modules or the crc-ccitt module.

Steen 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: ralink RT5370 WiFi support
« Reply #5 on: September 17, 2013, 08:23:02 AM »
Yes, there are some issues with USB in 5.0.alpha2 which will be addressed when Xorg and GTK2 ready.

Ralink fw must be managed first in 4.7.7 and moved to 5.0 later.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: ralink RT5370 WiFi support
« Reply #6 on: September 17, 2013, 08:31:59 AM »
Ralink fw must be managed first in 4.7.7 and moved to 5.0 later.

I agree, therefore I tried to make a ralink_firmware.tzc and a MD5-checksum file and put it in the TCE/optional directory.  My hope was that the firmware would be loaded during boot.

However, I found no trace of the rt2800.bin file anywhere in piCore 4.7.7 after booting. 

I think the correct place for the firmware should be lib/firmware/rt2800.bin

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: ralink RT5370 WiFi support
« Reply #7 on: September 17, 2013, 08:49:42 AM »
Sent PM with download link to a tcz package, please try.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: ralink RT5370 WiFi support
« Reply #8 on: September 17, 2013, 10:35:57 AM »
Hi bmarkus


It is working - the ralink5370 is now connected.

I needed to do the following steps:
1.Copy your firmware.tzc to TCE/optional (the three files)
2. Then tce-load -i firmware-ralinkwifi
3. Then sudo ifconfig wlan0 down
4  Then sudo ifconfig wlan0 up

AND now it is working.

Thank you....

Can you see how we can automatically load the firmware-ralinkwifi.tcz before the wifi packages are loaded?

Steen
« Last Edit: September 17, 2013, 10:48:16 AM by sbp »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: ralink RT5370 WiFi support
« Reply #9 on: September 17, 2013, 10:52:31 AM »
Add it to your onboot.lst.

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: ralink RT5370 WiFi support
« Reply #10 on: September 17, 2013, 11:54:07 AM »
Hi Gerrelt

The following is what I think - so it might be wrong.
What drivers are you missing? As far as I can see all the modules are there. So there is no need to compile anything.
In my understanding of the problem we just need the firmware which can be downloaded from ralink. However, I haven't figured out how to "inject" the firmware into piCore via a tcz package.

Steen

Hi Steen,

   Apparently I confused "drivers" with "firmware", that shows I'm just a newby when it comes to Linux... ::)

It's great to see you got it working!

Greetings,
   Gerrelt.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: ralink RT5370 WiFi support
« Reply #11 on: September 17, 2013, 12:17:29 PM »
I will add it to the repo
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: ralink RT5370 WiFi support
« Reply #12 on: September 17, 2013, 03:02:48 PM »
firmware-ralinkwifi.tcz added to piCore 4.x/5.x repo. It is coreplayer2's 5.x x86 extension repacked for piCore
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: ralink RT5370 WiFi support
« Reply #13 on: September 17, 2013, 03:33:23 PM »
Hi Bmarkus,

Yes!!! Thank you, it's working now.   :) :)

I installed the firmware-ralikwifi.tcz, and rebooted. But then it didn't work.
I had to add this to my bootlocal.sh:

Code: [Select]
modprobe rt2800lib
modprobe rt2800usb
(this might not be the best solution?)

After a "filetool.sh -b" and a reboot, it worked.

Greetings,
    Gerrelt.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: ralink RT5370 WiFi support
« Reply #14 on: September 17, 2013, 03:50:45 PM »
Great! I can add modprobes to the startup script.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."