Ghoblin
Posts: 6
Joined: Mon Feb 09, 2015 1:44 pm

Re: Dynamode USB Wifi Dongle issues

Wed Feb 11, 2015 8:00 am

Thanks for feedback! :D

The GCC version is a bit problematic.

I'm using rpi-source [ https://github.com/notro/rpi-source/wiki ] to download and prepare the kernel files on Raspberry itself. Rpi-source is good tool that downloads exactly the same kernel source files that the current Raspbian has been built with. However, it warns about the GCC compiler mismatch in the beginning. The default gcc for Raspbian 2015-01-31 is "gcc-4.6 (Debian 4.6.3-14+rpi1) 4.6" and the kernel has been built with "gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03)" as seen from /proc/version. The 4.8 version on Raspbian repo is "gcc-4.8 (Raspbian 4.8.2-21~rpi3rpi1) 4.8.2". Note that it's indeed 4.6.3 by default, 4.8.2 on gcc-4.8 package and 4.8.3 on toolchain.

On the first time running rpi-source, you have to have the default gcc 4.6.3. You have to also specify --skip-gcc so that rpi-source doesn't care about the different gcc in use and what's been used to build the default kernel. If you run rpi-source with 4.8.2 as the default gcc, you'll end up getting message like this during the kernel preparation (make prepare?) phase:

Code: Select all

  CC      arch/arm/kernel/asm-offsets.s
arch/arm/kernel/asm-offsets.c:53:2: error: #error Your compiler is too buggy; it is known to miscompile kernels
 #error Your compiler is too buggy; it is known to miscompile kernels
  ^
arch/arm/kernel/asm-offsets.c:54:2: error: #error and result in filesystem corruption and oopses.
 #error and result in filesystem corruption and oopses.
  ^
After that rpi-source exits and the kernel files have not been prepared enough to be able to build working kernel modules.

That's why you have to first run rpi-source with the default gcc 4.6.3 with --skip-gcc parameter. After rpi-source gets all done, you have to change to gcc 4.8.2. The kernel doesn't let you compile the kernel itself, but you can compile compatible modules for it. It's bit tricky :(. It would be great if the default Raspbian gcc would compile compatible modules. Maybe gcc 4.8.3 would not complain about the kernel miscompile problem?

Of course it's not good idea to compile whole new kernels or anything like that on Raspberry device - because it's so slow - but sometimes you need to do some small stuff like compile WLAN driver module ;)

MrEngman
Posts: 3946
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Dynamode USB Wifi Dongle issues

Wed Feb 11, 2015 10:43 am

Hi Ghoblin,

Regarding gcc-4.8.3, you might find this useful, https://github.com/raspberrypi/linux/is ... t-68550215, especially the link popcornmix posted.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

Ghoblin
Posts: 6
Joined: Mon Feb 09, 2015 1:44 pm

Re: Dynamode USB Wifi Dongle issues

Wed Feb 11, 2015 11:43 am

Thanks for reply.

I'm not sure if the "jessie" release makes any difference. We still end up with different gcc than what has been used to build the kernel.

Currently Raspbian's repos contain these gcc versions.

Code: Select all

[email protected] ~ $ apt-cache search gcc-4.
gcc-4.4 - GNU C compiler
gcc-4.5 - The GNU C compiler
gcc-4.6 - GNU C compiler
gcc-4.7 - GNU C compiler
gcc-4.8 - GNU C compiler
It's possible to install 4.8 by:

Code: Select all

apt-get install gcc-4.8
There is no need to edit sources.list or anything special. Maybe the repo didn't contain 4.8 at some point in time. Now the repo contains gcc-4.8. The instructions can be from the time when it wasn't possible to install it out-of-the-box.

The repo where the 4.8 comes is:

Code: Select all

[email protected]:/home/pi# cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ wheezy main

MrEngman
Posts: 3946
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Dynamode USB Wifi Dongle issues

Wed Feb 11, 2015 1:35 pm

Ghoblin wrote:Thanks for reply.

I'm not sure if the "jessie" release makes any difference. We still end up with different gcc than what has been used to build the kernel.

Currently Raspbian's repos contain these gcc versions.

Code: Select all

[email protected] ~ $ apt-cache search gcc-4.
gcc-4.4 - GNU C compiler
gcc-4.5 - The GNU C compiler
gcc-4.6 - GNU C compiler
gcc-4.7 - GNU C compiler
gcc-4.8 - GNU C compiler
It's possible to install 4.8 by:

Code: Select all

apt-get install gcc-4.8
There is no need to edit sources.list or anything special. Maybe the repo didn't contain 4.8 at some point in time. Now the repo contains gcc-4.8. The instructions can be from the time when it wasn't possible to install it out-of-the-box.

The repo where the 4.8 comes is:

Code: Select all

[email protected]:/home/pi# cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ wheezy main
Only gcc-4.6 was included in the standard raspbian image. I have installed gcc-4.7 and gcc-4.8. I used apt-get install gcc-4.8, using the standard release without the Jessie mod, some time back to load gcc-4.8 and it installed gcc-4.8.2 (Raspbian 4.8.2-21~rpi3rpi1). When I tried compiling the kernel using gcc 4.8.2 the compile failed. I haven't tried recently so whether it compiles ok now I don't know. Loading the latest raspbian image ,2015-01-31, and I still see only gcc-4.6 installed, not very helpful.

Using the Jessie update gcc-4.8 installed was version (Raspbian 4.8.3-13) and the kernel compiled OK, and the kernel in the raspbian image is also compiled with 4.8.3, so the same version. I don't often compile the kernel, only if I want to compile a special version for some reason, but I do it on the Pi although of course it does take time. I've even reverted to gcc-4.4 to compile stuff for adafruit images as they compiled their kernel with gcc-4.4.

Compiling the kernel on the Pi takes time, however, the new Pi B 2 may make a big difference with more memory and multiple cores. Must try it some time to see.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

alfonder
Posts: 35
Joined: Sun Jul 06, 2014 9:19 pm

Re: Dynamode USB Wifi Dongle issues

Thu Feb 12, 2015 8:12 am

MrEngman, Ghoblin, I appreciate your discovering. And I remember that Raspberry Pi is promoted as "credit card size computer". But it is actually an embedded device. An embedded device isn't supposed to compile objects on itself. I think this is the main cause why the appropriate compiler is not included.
I can give you an example, that a certain gcc instances exist even for iPhone and Android handhelds. But nobody uses them for real projects.
The cross toolchain installing is very easy. No need in onboard native compiler.
Hope I'm convincing enough.
To support me, register Dropbox account via invitation https://db.tt/xrV5BqTf

User avatar
aalaap
Posts: 9
Joined: Tue Dec 03, 2013 12:12 pm
Location: Mumbai, India
Contact: Website

Re: Dynamode USB Wifi Dongle issues

Thu Feb 12, 2015 1:51 pm

I followed nearly every step on each page of this thread to no avail, till I spotted one line on the earlier page that mentioned that this doesn't work on the Raspberry Pi 2.

:oops:

I've got 3.18.6+ #754 and nope. Nothing works.

alfonder
Posts: 35
Joined: Sun Jul 06, 2014 9:19 pm

Re: Dynamode USB Wifi Dongle issues

Thu Feb 12, 2015 5:35 pm

aalaap wrote:I followed nearly every step on each page of this thread to no avail, till I spotted one line on the earlier page that mentioned that this doesn't work on the Raspberry Pi 2.

:oops:

I've got 3.18.6+ #754 and nope. Nothing works.
I've already written about it. Just post here "/proc/config.gz" file from your pi2 and I will make module for you.
To support me, register Dropbox account via invitation https://db.tt/xrV5BqTf

User avatar
aalaap
Posts: 9
Joined: Tue Dec 03, 2013 12:12 pm
Location: Mumbai, India
Contact: Website

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 7:30 am

alfonder wrote:I've already written about it. Just post here "/proc/config.gz" file from your pi2 and I will make module for you.
Sorry for having missed that. That's awfully nice of you. Here is a link to my /proc/config.gz: https://mega.co.nz/#!48BTEbCb!j9SH290sL ... 9tCCMUFImo

FYI:
  • I've run rpi-update
  • I've done a complete apt-get update and upgrade
  • I've got gcc 4.8 installed (but my default is still 4.6)
If you could also put in some instructions on what I should do next, that'll be great!

Thanks!

demonx42
Posts: 3
Joined: Fri Feb 13, 2015 10:30 am

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 10:44 am

alfonder wrote:I've already written about it. Just post here "/proc/config.gz" file from your pi2 and I will make module for you.
Hi

I also have problem with my USB Wifi (ID: 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter).

My uname -a return :
Linux raspberrypi 3.18.7-v7+ #755 SMP PREEMT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linex
(It's a Raspberry Pi 2, B)

Is that possible to make me a module ?
My "/proc/config.gz" : https://mega.co.nz/#!wQwwWLRa!Fq5J-fudK ... 2tZJ2CVmeI

Thanx !

Valvert
Posts: 3
Joined: Fri Feb 13, 2015 12:51 pm

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 12:58 pm

Hello,
When I try to 'make', I have this result :

Code: Select all

make -C tools
make[1]: Entering directory '/tmp/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/tmp/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
/tmp/mt7610u_wifi_sta_v3002_dpo_20130916/tools/bin2h
chipset = mt7650u
chipset = mt7630u
chipset = mt7610u
cp -f os/linux/Makefile.6 /tmp/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/Makefile
make -C /lib/modules/3.18.7-v7+/build SUBDIRS=/tmp/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux modules
make[1]: Entering directory '/lib/modules/3.18.7-v7+/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/lib/modules/3.18.7-v7+/build'
Makefile:393: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2
I don't know what to do and I don't want to wait each time I do an update/upgrade to ask someone else to recompile the driver for me :-)
TIA,
Valvert

MrEngman
Posts: 3946
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 5:37 pm

Valvert wrote:Hello,
When I try to 'make', I have this result :

Code: Select all

make[1]: Entering directory '/lib/modules/3.18.7-v7+/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/lib/modules/3.18.7-v7+/build'
Makefile:393: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2
I don't know what to do and I don't want to wait each time I do an update/upgrade to ask someone else to recompile the driver for me :-)
TIA,
Valvert
Make expects a link to the Linux source directory. So /lib/modules/3.18.7-v7+/build should be a symbolic link to the Linux source directory which can be made using a command something like

Code: Select all

sudo ln -s /home/pi/src/linux /lib/modules/$(uname -r)/build
where /home/pi/src/linux would need to be changed to point to where your Linux source directory is.

I am able to generate the same error you have if I make directory /lib/modules/3.18.7-v7+/build using

Code: Select all

sudo mkdir /lib/modules/3.18.7-v7+/build
and build directory is empty, or if I generate the symbolic link using the command sudo ln -s ... as above but then the Linux directory is empty or does not include the necessary data required for the compile.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

alfonder
Posts: 35
Joined: Sun Jul 06, 2014 9:19 pm

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 8:29 pm

aalaap, meet the module for you.

Here is the driver for kernel 3.18.6-v7+ (for Raspberry Pi 2).
How to install
Ssh to your RaspberryPi and enter the following commands (better copy-paste to avoid typos):

Code: Select all

cd /tmp
wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.6-v7.tar.gz
sudo tar xf mt7601_3.18.6-v7.tar.gz -C /
sudo depmod 3.18.6-v7+
sudo reboot
To support me, register Dropbox account via invitation https://db.tt/xrV5BqTf

alfonder
Posts: 35
Joined: Sun Jul 06, 2014 9:19 pm

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 8:54 pm

demonx42, meet the driver for you.

Here is the driver for kernel 3.18.7-v7+ (for Raspberry Pi 2).
How to install
Ssh to your RaspberryPi and enter the following commands (better copy-paste to avoid typos):

Code: Select all

cd /tmp
wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.7-v7.tar.gz
sudo tar xf mt7601_3.18.7-v7.tar.gz -C /
sudo depmod 3.18.7-v7+
sudo reboot
To support me, register Dropbox account via invitation https://db.tt/xrV5BqTf

Valvert
Posts: 3
Joined: Fri Feb 13, 2015 12:51 pm

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 9:06 pm

Amazing!
alfonder you rock.
Thank you very much.

Valvert
Posts: 3
Joined: Fri Feb 13, 2015 12:51 pm

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 9:09 pm

Thank you MrEngman for your answer, I quit.
I'm not a Linux expert, I'm always getting errors.

amazon83
Posts: 22
Joined: Thu Feb 05, 2015 3:42 pm

Re: Dynamode USB Wifi Dongle issues

Fri Feb 13, 2015 11:33 pm

alfonder wrote:demonx42, meet the driver for you.

Here is the driver for kernel 3.18.7-v7+ (for Raspberry Pi 2).
How to install
Ssh to your RaspberryPi and enter the following commands (better copy-paste to avoid typos):

Code: Select all

cd /tmp
wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.7-v7.tar.gz
sudo tar xf mt7601_3.18.7-v7.tar.gz -C /
sudo depmod 3.18.7-v7+
sudo reboot
alfonder,can input this ID?
{USB_DEVICE(0x2717,0x4106)}, /* Xiaomi Wi

so that in future I can use yr link, I'm lazy to compile :P

User avatar
aalaap
Posts: 9
Joined: Tue Dec 03, 2013 12:12 pm
Location: Mumbai, India
Contact: Website

Re: Dynamode USB Wifi Dongle issues

Sat Feb 14, 2015 4:39 am

alfonder wrote:demonx42, meet the driver for you.

Here is the driver for kernel 3.18.7-v7+ (for Raspberry Pi 2).
How to install
Ssh to your RaspberryPi and enter the following commands (better copy-paste to avoid typos):

Code: Select all

cd /tmp
wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.7-v7.tar.gz
sudo tar xf mt7601_3.18.7-v7.tar.gz -C /
sudo depmod 3.18.7-v7+
sudo reboot
I ended up doing a dist-upgrade, which bumped me up from v6 to v7, so I used this code instead of the one you gave specifically for me. After rebooting, I got an ra0 entry with lots of details after running iwconfig, but wpa_supplicant still wasn't able to do anything with it. Even auto ra0 didn't seem to do anything.

I swapped my Ralink for an RTL8188CUS with a friend and it works like a charm. I'm giving up on the MT7601. It's just not worth the time and effort. Even if I did get it to work eventually, one dist-upgrade or rpi-update would throw me back offline anyway.

Thank you, alfonder. Your help is very much appreciated!

alfonder
Posts: 35
Joined: Sun Jul 06, 2014 9:19 pm

Re: Dynamode USB Wifi Dongle issues

Sat Feb 14, 2015 8:44 am

amazon83 wrote: alfonder,can input this ID?
{USB_DEVICE(0x2717,0x4106)}, /* Xiaomi Wi

so that in future I can use yr link, I'm lazy to compile :P
You haven't answered if the module, which was compiled for you with your ID, works (https://dl.dropboxusercontent.com/u/676 ... 601Usta.ko).
And secondly, you have Raspberry Pi or Pi 2?
To support me, register Dropbox account via invitation https://db.tt/xrV5BqTf

alfonder
Posts: 35
Joined: Sun Jul 06, 2014 9:19 pm

Re: Dynamode USB Wifi Dongle issues

Sat Feb 14, 2015 10:12 am

aalaap wrote: I ended up doing a dist-upgrade, which bumped me up from v6 to v7,
I think you mean "from .6 to .7", because v6 and v7 are for different processors.
After rebooting, I got an ra0 entry with lots of details after running iwconfig, but wpa_supplicant still wasn't able to do anything with it. Even auto ra0 didn't seem to do anything.
It should be configured according to Pi's FAQ ("/etc/wpa_supplicant/wpa_supplicant.conf: network={}" method) and not by "auto ra0" method.
I swapped my Ralink for an RTL8188CUS with a friend and it works like a charm. I'm giving up on the MT7601. It's just not worth the time and effort. Even if I did get it to work eventually, one dist-upgrade or rpi-update would throw me back offline anyway.
Unfortunately, this is almost true, unless MediaTek GPL'ed their driver and then it included in a package. But there is a workaround. After "rpi-update" don't reboot immediately, but at first install posted here driver for the new kernel version, and only after that reboot device. Then your device will not lose connectivity.
To support me, register Dropbox account via invitation https://db.tt/xrV5BqTf

demonx42
Posts: 3
Joined: Fri Feb 13, 2015 10:30 am

Re: Dynamode USB Wifi Dongle issues

Sat Feb 14, 2015 11:38 am

alfonder wrote:demonx42, meet the driver for you.

Here is the driver for kernel 3.18.7-v7+ (for Raspberry Pi 2).
How to install
Ssh to your RaspberryPi and enter the following commands (better copy-paste to avoid typos):

Code: Select all

cd /tmp
wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.7-v7.tar.gz
sudo tar xf mt7601_3.18.7-v7.tar.gz -C /
sudo depmod 3.18.7-v7+
sudo reboot
Waoh ! Thanx you very much alfonder ! It work !!

I just have a little question: How do you do to "create" the Driver?
Do you have information, website, etc. ?

Thank you again !

ginner159
Posts: 8
Joined: Fri Dec 13, 2013 10:53 am

Re: Dynamode USB Wifi Dongle issues

Sat Feb 14, 2015 12:53 pm

@Alfonda

Just a big thank you for this! please keep up the great work your doing have you sent your patches to the ras pi people so that it can be compiled into the main kernel for future updates?

so yeah big kudos to you!

alfonder
Posts: 35
Joined: Sun Jul 06, 2014 9:19 pm

Re: Dynamode USB Wifi Dongle issues

Sat Feb 14, 2015 4:39 pm

Here is the driver for kernel 3.18.7+ #755 - for Raspberry Pi 1st gen. (A, A+, B, B+).
How to install
Ssh to your RaspberryPi and enter the following commands (better copy-paste to avoid typos):

Code: Select all

cd /tmp
wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.7_755.tar.gz
sudo tar xf mt7601_3.18.7_755.tar.gz -C /
sudo depmod 3.18.7+
sudo reboot
To support me, register Dropbox account via invitation https://db.tt/xrV5BqTf

mhutti1
Posts: 1
Joined: Sat Feb 14, 2015 5:33 pm

Re: Dynamode USB Wifi Dongle issues

Sat Feb 14, 2015 5:36 pm

alfonder wrote:Here is the driver for kernel 3.18.7+ #755 - for Raspberry Pi 1st gen. (A, A+, B, B+).
How to install
Ssh to your RaspberryPi and enter the following commands (better copy-paste to avoid typos):

Code: Select all

cd /tmp
wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.7_755.tar.gz
sudo tar xf mt7601_3.18.7_755.tar.gz -C /
sudo depmod 3.18.7+
sudo reboot
Thanks I have spent 4 days trying to compile this module and have got invalid module format every time. This worked first time though.

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: Dynamode USB Wifi Dongle issues

Sat Feb 14, 2015 5:58 pm

Is there an apt-get install package name to get the right version of the linux sources? I'd like to be able to easily re-build it myself.

I have this same adapter, and the default raspbian for the Pi 2 is .5-v7+; doing a apt-get upgrade gets me to .7-v7+ while the binary in the above link is for .6-v7+. (UPDATE: a new version is available given the links in the previous posts)

And, ideally, this driver would actually be folded into the distribution -- the difficulty of making this actually work is not a good thing for the community!

amazon83
Posts: 22
Joined: Thu Feb 05, 2015 3:42 pm

Re: Dynamode USB Wifi Dongle issues

Sun Feb 15, 2015 2:59 am

alfonder wrote:
amazon83 wrote: alfonder,can input this ID?
{USB_DEVICE(0x2717,0x4106)}, /* Xiaomi Wi

so that in future I can use yr link, I'm lazy to compile :P
You haven't answered if the module, which was compiled for you with your ID, works (https://dl.dropboxusercontent.com/u/676 ... 601Usta.ko).
And secondly, you have Raspberry Pi or Pi 2?
Hi Alfonder,

It working Perfectly, in future please include Xiaomi ID, i will use this website for my update driver. Possible to make Pi 2 Support also? I'm going to get pi 2 :) I believe it should work.

Step:
1. cd /lib/modules/3.18.7+/kernel/drivers/net/wireless
2. wget https://dl.dropboxusercontent.com/u/676 ... 601Usta.ko
3. sudo depmod 3.18.7+

Done.

Thanks

Return to “Troubleshooting”