Author Topic: [howto] compile your own wireless  (Read 83253 times)

July 24, 2009, 11:04:22 AM
Reply #15

mike2k8

  • Full Member

  • Offline
  • ***

  • 100
I have already tried to build this driver. I do not remember any significant changes to the sources to be required. Update the makefie to set your paths to kernel sources and then just try running make right away and look at the output. I was not able to find the location it loads the firmware from. I tried both /etc/firmware and /lib/firmware. Probably you should place the firmware together with the driver.

No luck. It seems that it's correctly built, but the firmware is not loaded.
I have tried every place. I have read in the README that in some linux versions it could be needed to put in /lib/firmware/2.6.15/
It doesn't work either.
Here is what I get in messages.txt
Code: [Select]
Jan  1 00:00:49 wdtv user.info kernel: rt73: init
Jan  1 00:00:49 wdtv user.info kernel: rt73: idVendor = 0x13b1, idProduct = 0x20
Jan  1 00:00:59 wdtv user.err kernel: rt73: Failed to request_firmware. Check your firmware file location
Jan  1 00:00:59 wdtv user.crit kernel: rt73: Failed to load Firmware.
Jan  1 00:00:59 wdtv user.warn kernel: rt73: probe of 1-2:1.0 failed with error -2
Jan  1 00:01:00 wdtv user.info kernel: usbcore: registered new driver rt73
Jan  1 00:01:04 wdtv user.warn kernel: Unhandled kernel unaligned access[#1]:
Jan  1 00:01:04 wdtv user.warn kernel: Cpu 0
Jan  1 00:01:04 wdtv user.warn kernel: $ 0   : 00000000 00000000 90296654 00000000
Jan  1 00:01:04 wdtv user.warn kernel: $ 4   : 75646f6d 7ff7aa98 00001fe0 7ff7aa98
Jan  1 00:01:04 wdtv user.warn kernel: $ 8   : 00000001 00000000 00000000 00000000
Jan  1 00:01:04 wdtv user.warn kernel: $12   : 00000002 9497bdf4 00000000 0100007f
Jan  1 00:01:04 wdtv user.warn kernel: $16   : 9036b220 75646f6d 7ff7aa78 00000020
Jan  1 00:01:04 wdtv user.warn kernel: $20   : 00002000 9036b298 90310000 7ff7aa70
Jan  1 00:01:04 wdtv user.warn kernel: $24   : 00000000 90298768                 
Jan  1 00:01:04 wdtv user.warn kernel: $28   : 9497a000 9497bd98 7ff7aa78 90246098
Jan  1 00:01:04 wdtv user.warn kernel: Hi    : 00000000
Jan  1 00:01:04 wdtv user.warn kernel: Lo    : 431bde83
Jan  1 00:01:04 wdtv user.warn kernel: epc   : 90296670     Tainted: PF   
Jan  1 00:01:04 wdtv user.warn kernel: ra    : 90246098 Status: 10001c03    KERNEL EXL IE
Jan  1 00:01:04 wdtv user.warn kernel: Cause : 50808010
Jan  1 00:01:04 wdtv user.warn kernel: BadVA : 75647015
Jan  1 00:01:04 wdtv user.warn kernel: PrId  : 00019069
Jan  1 00:01:04 wdtv user.warn kernel: Modules linked in: nls_koi8_u nls_koi8_r nls_iso8859_9 nls_iso8859_7 nls_iso8859_6 nls_iso8859_5 nls_iso8859_4 nls_iso8859_3 nls_iso8859_2 nls_iso8859_15 nls_iso8859_14 nls_iso8859_13 nls_euc_jp nls_cp950 nls_cp949 nls_cp936 nl
Jan  1 00:01:04 wdtv user.warn kernel: Process nmbd (pid: 847, threadinfo=9497a000, task=96e0f030)
Jan  1 00:01:04 wdtv user.warn kernel: Stack : 0000002a 00000101 00000000 00000000 00006f6c 00000000 00000000 00000000
Jan  1 00:01:04 wdtv user.warn kernel:         00000002 0100007f 00000000 00000000 9036b220 75646f6d 7ff7aa78 00000020
Jan  1 00:01:04 wdtv user.warn kernel:         00002000 90246098 00000001 96b5c934 900b3898 9497bf18 00002000 7ff7aa78
Jan  1 00:01:04 wdtv user.warn kernel:         00006f6c 00000000 00000000 00001000 55733330 00000000 9497be50 55733330
Jan  1 00:01:04 wdtv user.warn kernel:         00001000 9497bf18 00000194 00000194 2acb042c 2acb0290 00008912 7ff7aa70
Jan  1 00:01:04 wdtv user.warn kernel:         ...
Jan  1 00:01:04 wdtv user.warn kernel: Call Trace: [<90246098>]  [<900b3898>]  [<c4036044>]  [<900be3f0>]  [<9019da8c>]  [<9009a5d0>]  [<900b7bf0>]  [<90237334>]  [<90235ed4>]  [<90235d40>]  [<900b7cf8>]  [<900b80d4>]  [<900b80b0>]  [<902376d4>]  [<9002f8a0>]  [<900
Jan  1 00:01:04 wdtv user.warn kernel:
Jan  1 00:01:04 wdtv user.warn kernel: Code: afb40040  afb3003c  afb10034 <8c8300a8> 00a08021  10600032  00c09021  8c71000c  1220002f

July 24, 2009, 11:14:49 AM
Reply #16

hnadov2k9

  • Newbie

  • Offline
  • *

  • 28
assumed you use SmartP app.bin, the firmware will copy from firmware/ to the right location by a script... IIRC

BTW, I tested rt73 compiled from ralink source for my Linksys WUSB54GC . it seems stable...

July 25, 2009, 01:59:08 AM
Reply #17

TON

  • Jr. Member

  • Offline
  • **

  • 87
assumed you use SmartP app.bin, the firmware will copy from firmware/ to the right location by a script... IIRC
BTW, I tested rt73 compiled from ralink source for my Linksys WUSB54GC . it seems stable...
I believe the script copies to some standard location (like /etc/firmware, do not remeber exactly right now) but for some reason it still cannot be found ??? Probably the firmware should go together with the rt73.ko?

I am glad to hear about the stable work of at least some rt73-based dongle :D. Did you try to load it with something like torrent or streaming a film from some other location? Mine looked ok for some time (up to a day) and then just stopped.

July 25, 2009, 08:31:20 AM
Reply #18

mike2k8

  • Full Member

  • Offline
  • ***

  • 100
assumed you use SmartP app.bin, the firmware will copy from firmware/ to the right location by a script... IIRC

BTW, I tested rt73 compiled from ralink source for my Linksys WUSB54GC . it seems stable...

In fact, I am using zorander's app.bin.
This is what is in S20wireless
Code: [Select]
for firmfile in $APATH/firmware/* ; do
  firm=`basename $firmfile`
  ln -sf $APATH/firmware/$firm /lib/firmware/$firm
done
I have put firmware in every possible place, and it doesnt work.
This is what the rt73 sources README says:
Code: [Select]
* Firmware file (rt73.bin)

    The rt73 chipset uses a firmware file which is loaded in device
    memory using the kernel firmware_class facility. 'make install'
    copy the firmware file to the standard firmwares location:
    /lib/firmware.

    However some linux distributions divert from the standard and e.g.
    use /lib/firmware/<KERNEL_VERSION>. If this is your case, you will
    have to manually move the firmware file to the right location.
    If you have problems with firmware loading, please ask on your
    distro's support media (forum, etc).

Due to not being able to use this driver, I have gone back to zorander's compiled rt73. By the way, does anyone know which version is this?

Zorander's rt73 seems like it has no separate firmware file rt73.bin, and it doesn't use rt73.sta file for config (which was used in ralink drivers, like the ones in SmartP's app.bin, and is deprecated in the drivers I was trying to compile).
I suspect that the zorander driver is the most updated one, but I don't know it for sure.

Reading in the drivers I have been trying to compile, I have discovered that wpa_supplicant is not compatible with rt73 unless you use a patched version. As the rt73 in zorander app.bin seem to rely on wpa_supplicant for WPA authentication, I assume it has a patched version, but I then wondered if it was needed.

Well the good news is that you can discard wpa_supplicant, (which should free some resources, and could be more stable, as wpa_supplicant is not supported in first place), and rely on standard iwpriv iwconfig lines:

For example, to connect using WPA2 you can put the following lines in net.config between ifconfig and iwconfig lines.
Code: [Select]
iwpriv $MDEV set Networktype=Infra
iwpriv $MDEV set AuthMode=WPA2PSK
iwpriv $MDEV set EncryptType=AES
iwpriv $MDEV set SSID="MyEssidName"
iwpriv $MDEV set WPAPSK="my passphrase"
It works. For me it seems very stable, but as I don't leave it on for long periods, I cannot be sure.

July 26, 2009, 09:34:07 PM
Reply #19

TON

  • Jr. Member

  • Offline
  • **

  • 87
mike2k8
Great to here it is stable for you.

What do you mean you do not keep it on for a long time? Do you power your wdtv off often? I do not power mine off without the necessity to change something like adding some new app.bin.

Still try to open some video over the network from another computer and watch it. My driver could not do it for more than an hour.

July 27, 2009, 08:38:49 AM
Reply #20

delf

  • Jr. Member

  • Offline
  • **

  • 76
i would like to understand this LaCie Network Space 500GB works on win xp system becuase everything i reading is about linux       and i have this firm ware on me wdtv   1.02.10_B-RAD.CC_WDLXTV-0.5.5. all i want to do is send files via lan to my wdtv with the external harddisk plz and thanx u all great jobb here

July 30, 2009, 05:33:41 AM
Reply #21

delf

  • Jr. Member

  • Offline
  • **

  • 76
i would like to know if i can have all these bin files in the usb stick
1 opt.bin
2 ndas.app.bin
3 webserver.app.bin
4 wireless-mod-rt.app.bin
5 wdtv.bin
6 core-extras.app.bin
7 log-saver.app.bin

or will it brick the wdtv

August 04, 2009, 01:08:06 AM
Reply #22

smartgatto

  • Newbie

  • Offline
  • *

  • 9
Hello,
excuse for my bad english but i'm italian boy...
i never used linux, so I'm stopped here:
"# download WD TV GPL Code
# unzip WDTV_GPL_Code.zip

wdtv@localhost ~/wdtv $ unzip WDTV_GPL_Code.zip"

how can I download WDTV GPL Code and put it on the virtual disk with vmware?

thanks a lots!


August 04, 2009, 10:44:35 AM
Reply #23

mike2k8

  • Full Member

  • Offline
  • ***

  • 100
Hello,
excuse for my bad english but i'm italian boy...
i never used linux, so I'm stopped here:
"# download WD TV GPL Code
# unzip WDTV_GPL_Code.zip

wdtv@localhost ~/wdtv $ unzip WDTV_GPL_Code.zip"

how can I download WDTV GPL Code and put it on the virtual disk with vmware?

thanks a lots!



You download it inside VMware (or VirtualBox). The virtual machine (guest) uses the network connections of the system where it's running (host). So, you can download directly inside the virtual machine. (It will be saved inside the image)
This is the simplest way.
The command line for this is 'wget' followed by the http:// download link. For example:
wget http://somedownloadlink/file.zip
You might prefer to have a full GUI with a internet browser, instead of using command line tools (It will take some time to download and install, tough). For that, follow these steps
 
Another way would be to download it in your host system, and then make the folder shared for the virtual machine (you need to see the help of VMware or VirtualBOX for how to share folders).

An intermediate way would be to download in your host. Save it to an iso image with a CD writing software (or to a real CD if you want), and from the virtualization software, mount the image as a cdrom, so you can access from the guest OS and copy to some directory.

August 05, 2009, 10:08:23 AM
Reply #24

smartgatto

  • Newbie

  • Offline
  • *

  • 9
ok, thank you very much!
I've installed a graphic interface and a web browser, so i downloaded WDTV GPL Code, but when i will do "unzip" this file, the terminal return me:

wdtv@wdtv-devel:-$ unzip
bash: unzip: command not found

how can i install unzip?

thanks a lot!!



August 05, 2009, 01:08:48 PM
Reply #25

Monkeyface66

  • Jr. Member

  • Offline
  • **

  • 58

August 06, 2009, 05:56:40 AM
Reply #26

smartgatto

  • Newbie

  • Offline
  • *

  • 9
excuse me for duplicate post...

I have a problem. I'm arrived to "Create app.bin", i've downloaded smartp's wireless-mod.rt.app.bin:

wdtv@wdtv-devel:~/wdtv$ sudo mkdir -p /mnt/orig.app.binwdtv@wdtv-devel:~/wdtv$ sudo mount -o loop wireless-mod-rt.app.bin /mnt/orig.app.bin
wdtv@wdtv-devel:~/wdtv$ ls /mnt/orig.app.bin/
bin  etc  firmware  lib  modules
wdtv@wdtv-devel:~/wdtv$ mkdir wireless-mod-rt2870
wdtv@wdtv-devel:~/wdtv$ cp -r /mnt/orig.app.bin/* wireless-mod-rt2870/
wdtv@wdtv-devel:~/wdtv$ rm -rf wireless-mod-rt2870/firmware/
wdtv@wdtv-devel:~/wdtv$ rm wireless-mod-rt2870/modules/rt*.ko
wdtv@wdtv-devel:~/wdtv$ ls -R wireless-mod-rt2870/*
wireless-mod-rt2870/bin:
iwconfig

wireless-mod-rt2870/etc:
hotplug  init.d  mdev.conf

wireless-mod-rt2870/etc/hotplug:
wlan-rt.agent

wireless-mod-rt2870/etc/init.d:
S20wlanmodules

wireless-mod-rt2870/lib:
libiw.so.28

wireless-mod-rt2870/modules:
wireless-ext.ko
wdtv@wdtv-devel:~/wdtv$ cp ~/wdtv/2009_0521_RT2870_Linux_STA_V2.1.2.0/os/linux/rt2870sta.ko wireless-mod-rt2870/modules/
cp: cannot stat `/home/wdtv/wdtv/2009_0521_RT2870_Linux_STA_V2.1.2.0/os/linux/rt2870sta.ko': No such file or directory
wdtv@wdtv-devel:~/wdtv$



No such file or directory? I haven't got rt2870sta.ko file? Why?

thank you!

August 06, 2009, 09:25:58 AM
Reply #27

mike2k8

  • Full Member

  • Offline
  • ***

  • 100

wdtv@wdtv-devel:~/wdtv$ cp ~/wdtv/2009_0521_RT2870_Linux_STA_V2.1.2.0/os/linux/rt2870sta.ko wireless-mod-rt2870/modules/
cp: cannot stat `/home/wdtv/wdtv/2009_0521_RT2870_Linux_STA_V2.1.2.0/os/linux/rt2870sta.ko': No such file or directory
wdtv@wdtv-devel:~/wdtv$

[/color]

No such file or directory? I haven't got rt2870sta.ko file? Why?

thank you!

I suspect that you have not compiled the module.
There is a missing step in the howto, right before the 4) Create app.bin
This step is the most important one. It's where you build the .ko module. (I suppose that for the author of the post is evident and that's why he has omited it).

You should follow the instructions in the README file, in this case you have to do:

Code: [Select]
cd ~/wdtv/2009_0521_RT2870_Linux_STA_V2.1.2.0
make

Wait some time to complete the process and then, if everything goes well, this should create the rt2870sta.ko file, and you can continue where you left.

October 29, 2009, 10:07:15 AM
Reply #28

daskino

  • Newbie

  • Offline
  • *

  • 44
Can someone please help me out?

I'm stuck at the "diff -uNbB ....." thing because my drivers are different, too!


Here's the download:
http://www.mediafire.com/download.php?zxgmyniz2hd

RTL8191SU chipset.


Help please!  :)


Hey Monkey did you work out to create the driver for RTL8191S(U) ?  I myself have a xtreamer wifi adatper i would like to use on the wdtv, In the startup file it id the adapter as RTL8191S chipset. thought i mayby could your driver if you could post it

November 03, 2009, 06:32:42 PM
Reply #29

suburbancore

  • Newbie

  • Offline
  • *

  • 10
excellent guide...thanks