05-14-2015 10:55 AM
Hello everyone,
I bought a very simple wifi dongle for the myRIO-1950 and I am trying to install the module.
A EDIMAX Wireless 802.11bgn nano USB Adapter using the rtl8188CUS drivers from realtek.
Unfortunatly, the dongle is not recognised as a wlan0 because it is lacking those driver that needs to be compiled for that linux version.
lsusb is succesfully detecting the dongle and the associated drivers:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 008: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
I have the drivers and everything I need to compile the drivers, the only challenge is to correctly configure the Makefile for the Linux-RT achitecture.
I have for that purpose created a new platform however I am missing an important piece the kernel headers files path.
ifeq ($(CONFIG_PLATFORM_ARM_NI-RT), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -mfpu=vfpv3
EXTRA_CFLAGS += -mfloat-abi=softfp
ARCH := arm
CROSS_COMPILE := arm-nirt-linux-gnueabi-
KVER := 3.2.35-rt52-2.0.0f0
KSRC ?= /lib/modules/3.2.35-rt52-2.0.0f0/kernel/lib/
MODULE_NAME := edi-nano-wlan
endif
When I try to compile the file is giving me that type of error:
make ARCH=arm CROSS_COMPILE=arm-nirt-linux-gnueabi- -C
/lib/modules/3.2.35-rt52-2.0.0f0/kernel/lib/
M=/home/lvuser/wifi/driver/rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911
modules
make[1]: Entering directory `/lib/modules/3.2.35-rt52-2.0.0f0/kernel/lib'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.2.35-rt52-2.0.0f0/kernel/lib'
make: *** [modules] Error 2
Does someone know where I can find the kernel source of the myRIO-1950 ver 3.2.35-rt52-2.0.0f0 ?
Or maybe there is a simpler work around using opkg ?
Thank you
EDIT 18/09/2015
The compilation does not work with newer kernel : 3.14.x
The RTL8192cu is not updated, the work around is to keep using the older kernel from 2014 (3.2.x)
Arthur
05-15-2015 10:42 AM
Can you list the output of
uname -a
05-15-2015 10:58 AM
Output, uname -a:
Linux NI-myRIO-1950-FW1 3.2.35-rt52-2.0.0f0 #1 SMP PREEMPT RT Tue Jun 3 20:49:19 CDT 2014 armv7l GNU/Linux
05-15-2015 11:48 AM
I guess another important question is whether you are attempting to build the modules on the target itself or if you're attempting to cross-compile.
I would recommend compiling on the target itself.
*looks at the driver*
Actually, if downloaded from Realtek, that thing is a steaming pile of outdated sadness.
*digs deeper*
and, it seems that we've configured support for the module, I have a feeling this is a lack-of-firmware issue. Can you plug in the adapter and post the result of
dmesg | tail
05-18-2015 02:11 AM
I am trying to compile it on the target itself, thats why I'm looking for those linux header files so the makefile could deliver and not be stuck on that error (see first post).
The driver compilation should not be a problem though, but maybe there an easiest way to do it
dmesg | tail
[ 11.705970] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm) [ 15.305199] NET: Registered protocol family 10
[ 25.452880] usb0: no IPv6 routers present
[ 375.590322] usb 1-1.1: USB disconnect, device number 3
[ 379.740340] usb 1-1: USB disconnect, device number 2
[ 384.362555] usb 1-1: new high-speed USB device number 4 using xusbps-ehci
[ 384.653059] rtl8192cu: MAC address: 74:da:38:2e:05:b5
[ 384.653087] rtl8192cu: Board Type 0
[ 414.681582] rtl8192cu:rtl92cu_init_sw_vars():<0-0> Failed to request firmware!
[ 414.681610] rtlwifi:rtl_usb_probe():<0-0> Can't init_sw_vars.
05-18-2015 04:24 PM
Last week, when I posted my response, I took a quick, 10 minute stab at trying to build the module on the 9068 that I have at my desk when I ran into a slew of issues that come from old, outdated attempts at support for a smattering of different platforms in the driver package downloaded from Realtek (almost always cross-compiling-oriented support).
If you wanted to give this a shot, I'd recommend reading through some of the documentation that we've put together regarding building modules on the controller. Tutorial: Adding Kernel Modules on NI Linux Real-Time
05-19-2015 02:16 AM
I already tried to follow that guide, the problem is the same as my problem here. I don't have the kernel source headers files.
KERNELSOURCE=/var/volatile/tmp/headers/kernel doesn't exist
ls /var/volatile/tmp
MXS:EventSharedMemory lvt1085632577.xml ni_boot_mode_input NetworkInterfacesChanged natinst/
I need to have this kernel source it has to be on some package or somewhere on the device.
05-19-2015 08:41 AM
The kernel headers are being made available during the setup_versioning_env command (mounting the headers at /var/volatile/tmp/headers/kernel, as I recall), and the versioning_call sets the standard kbuild (kernel build system) environment variable KERNELHEADERS to point to where the headers are located.
Also, just a note, you don't want to set CROSS_COMPILE since you are not, in fact, cross-compiling anything (you are compiling the module on the system it is intended to run on)
05-19-2015 11:03 AM
Thank you for the help, the compilation worked using the tutorial and unsetting the CROSS_COMPILE flags.
The OS is still using the old non working driver
[ 744.936841] rtl8192cu: MAC address: 74:da:38:2e:05:b5
[ 744.936868] rtl8192cu: Board Type 0
[ 774.969657] rtl8192cu:rtl92cu_init_sw_vars():<0-0> Failed to request firmware!
[ 774.969685] rtlwifi:rtl_usb_probe():<0-0> Can't init_sw_vars.
I need now to replace the non-working module with the one I just compiled using the command:
I need now to install the module I compiled and replace it.
install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR)
Problem now is that command is not recognised by bash:
-bash: install: command not found
Do you have a workaround this ?
05-19-2015 11:17 AM
It looks like the install program is in the coreutils package. Install the package with
opkg update && opkg install coreutils