drmullins
Posts: 29
Joined: Fri Jun 23, 2017 9:22 pm

Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sun Aug 27, 2017 10:14 am

Problem with realtek wireless adapter (needed to extend wireless range),
which works fine in Raspbian Jessie, but will not connect in Raspbian Stretch

Fresh install of Raspbian Stretch

Reboot with CSL 300MBit/s USB wireless adapter (in powered hub) which uses
realtek RTL8191SU chipset supported by r8712u kernel module

Configured /etc/wpa_supplicant/wpa_supplicant.conf correctly (via gui)

ls -1 /sys/class/net says:
enxb827ebf3cefa
lo
wlan0
wlx24050f6664f6
where last entry is correct predictable name for wireless adapter

sudo iwlist wlx24050f6664f6 scan - lists available wireless networks

However adapter resolutely refuses to connect !

iwconfig gives :

wlx24050f6664f6 unassociated Nickname:"rtl_wifi"
Mode:Auto Access Point: Not-Associated Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

wlan0 IEEE 802.11 ESSID:"D & A Visitors"
Mode:Managed Frequency:2.432 GHz Access Point: **:**:**:**:**:**
Bit Rate=72.2 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=70/70 Signal level=-34 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

where I have suppressed the true MAC address of the Access Point

A ralink adapter, substituted for the realtek, works fine (without powered hub)
with both internal and external adapters connecting simultaneously

With Jessie this realtek adapter also works fine (without powered hub)
with both internal and external adapters connecting simultaneously

User avatar
Swampy42
Posts: 10
Joined: Sat Sep 02, 2017 9:19 pm
Location: Kempten (Germany)
Contact: Website

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sat Sep 02, 2017 10:10 pm

Hello,

I also have problems with a RTL8191SU wireless adapter. I hope this fits in this thread:

I have a self-made Internet-radio (https://github.com/42Swampy/webradio), which is powered by a Raspberry Zero (without W). I manage the access with ssh.

But now to my problem:
I am using a Edimax EW-7612UAn v1 (0bda:8172/Realtek RTL8191SU). With "Raspbian Jessie Lite" all works perfectly . I did the network-configuration with building the files ssh and wpa_supplicant.conf in the boot-partition. After a update to "Raspbian Stretch" the adapter doesn’t work any more. With a fresh image the same problem.

Before (and still having), I had a EW-7612UAn v2 which causes frequently problems. "Raspbian Stretch" recognized it, though only EW-7612UAn v1 applies to be compatible (out of the box). But I would rather use the old model, because it is very reliable.

Anyone tips for running the adapter again? Did the driver change in the kernel?

Thank you and sorry for my bad English! (I am from Germany)
Linux is like wigwam: no Gates, no Windows and Apache inside.

drmullins
Posts: 29
Joined: Fri Jun 23, 2017 9:22 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sun Sep 03, 2017 11:15 am

I worked out how to fix this problem. It was also a problem for Fedora 25. There is a problem with the r8712u driver which is a 'staging' driver. It needs to be replaced with r92u driver. Look up 'r8712u fail fedora 25' on google to get details. As it seemed to be a kernel problem I reported it on the raspberry pi kernel page on github.
https://github.com/raspberrypi/linux/issues/2185
At the post at the end (at the moment !) of the sequence of posts I give my interpretation of the solution which worked for me. It involves downloading driver from github, installing the raspberry pi kernel headers, 'making' the driver, copying it to the right place and blacklisting the old driver before rebooting. I now get a solid connection via the adapter. I think this process may have to be repeated when raspberry pi update the kernel. I hope they integrate the new driver into the kernel so that this is not necessary.

User avatar
Swampy42
Posts: 10
Joined: Sat Sep 02, 2017 9:19 pm
Location: Kempten (Germany)
Contact: Website

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sun Sep 03, 2017 1:40 pm

Thank you for your temporary solution. :D If I have time I'll try it.
I hope it will be repaired in the kernel soon.
Linux is like wigwam: no Gates, no Windows and Apache inside.

User avatar
Swampy42
Posts: 10
Joined: Sat Sep 02, 2017 9:19 pm
Location: Kempten (Germany)
Contact: Website

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sun Sep 03, 2017 3:02 pm

Your solution worked! :D
Thank you!
Linux is like wigwam: no Gates, no Windows and Apache inside.

drmullins
Posts: 29
Joined: Fri Jun 23, 2017 9:22 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sun Sep 03, 2017 9:02 pm

I wrote a script to install r92su
The idea is that I could just run it again if the kernel version is changed - possibly starting some sort of detection script from ~/.config/autostart. Script probably needs a bit more debugging but attached herewith without warranty !

#!/bin/bash
# Install r92su kernel module replacing r8712u

# Initial update
sudo apt-get update

# Install kernel headers
sudo apt-get install raspberrypi-kernel-headers

# Install git
sudo apt-get install git

# Clone the rtl8192su repository if not already cloned
cd ~
if [ ! -d rtl8192su ] ; then
echo " cloning rtl8192su.git"
git clone https://github.com/chunkeey/rtl8192su.git
else
echo " rtl8192su repository already cloned"
fi

# Make kernel updates directory if not already made
UPDATES=/lib/modules/$(uname -r)/updates
if [ ! -d $UPDATES ] ; then
sudo mkdir $UPDATES
echo " creating $UPDATES"
else
echo " $UPDATES already exists"
fi

# Make r92su driver if not already in UPDATES and copy new driver into iy
cd rtl8192su
if [ ! -e $UPDATES/r92su.ko ] ; then
echo " Making r92su.ko driver"
make -f Makefile.r92su
if [ -e r92su/r92su.ko ] ; then
echo " copying r92su.ko"
sudo cp r92su/r92su.ko $UPDATES
else
echo " error creating r92su.ko"
read -p "Error - exit" GO
fi
else
echo " r92su.ko already copied to $UPDATES"
fi

# Blacklist r8712u if not previously black listed
if [ ! -e /etc/modprobe.d/blacklist-r8712u.conf ] ; then
temp_file=$(mktemp)
echo "blacklist r8712u" >temp_file
sudo cp temp_file /etc/modprobe.d/blacklist-r8712u.conf
rm temp_file
echo " module r8712u blacklisted"
else
echo " module r8721u already blacklisted"
fi

# remove r8712u if loaded
lsmod | grep r8712u >/dev/null
if [ $? == 0 ] ; then
echo " stopping networking service"
sudo systemctl stop networking
echo " removing module r8712u"
sudo modprobe -rv r8712u
echo " starting networking service"
sudo systemctl start networking
fi

# install module r92su.ko if available and not already loaded
if [ -e $UPDATES/r92su.ko ] ; then
lsmod | grep r92su >/dev/null
if [ $? == 1 ] ; then
echo " updating dependencies"
sudo depmod
echo " stopping networking service"
sudo systemctl stop networking
echo " inserting module r92su"
sudo modprobe -v r92su
echo " starting networking service"
sudo systemctl start networking
else
echo " module r92su already loaded"
fi
else
echo " module r92su.ko not in $UPDATES"
fi

# pause the exit
read -p " Exit ?" GO

User avatar
Swampy42
Posts: 10
Joined: Sat Sep 02, 2017 9:19 pm
Location: Kempten (Germany)
Contact: Website

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sat Sep 09, 2017 10:41 am

A big thanks to you!

One further question:
How to disable the power management of the wireless adapter?
The old methods doesn't seem to work.
Linux is like wigwam: no Gates, no Windows and Apache inside.

drmullins
Posts: 29
Joined: Fri Jun 23, 2017 9:22 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sat Sep 09, 2017 5:31 pm

I'm using my Raspberry Pi as a desktop replacement, switching off immediately after use - it's never left on without me sitting at keyboard. If I come across anything about power device management I'll post again.

User avatar
Swampy42
Posts: 10
Joined: Sat Sep 02, 2017 9:19 pm
Location: Kempten (Germany)
Contact: Website

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Wed Nov 08, 2017 11:15 am

I tested the script today, cause the kernel changed.
It works like a charm.

Many many thanks for your solution :D
Linux is like wigwam: no Gates, no Windows and Apache inside.

drmullins
Posts: 29
Joined: Fri Jun 23, 2017 9:22 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sun Jan 14, 2018 5:43 pm

Thanks for your comment - yes I've used it myself in earnest after recent kernel updates !

Collie714
Posts: 20
Joined: Thu Nov 22, 2012 2:07 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Tue Feb 06, 2018 12:48 pm

Tried running it this the script a few times on a vanilla image "2017-09-07-raspbian-stretch-lite" .

"make[1]: *** /lib/modules/4.9.41-v7+/build: No such file or directory."

tried updating the firmware to the latest version and tried again but same result (/lib/modules/4.9.79-v7+/build: No such file or directory)

Downloaded the kernel source manually myself as I thought it might be that the headers might not be up to scratch with the kernel. After a lot of work I managed to get it to compile but then it failed in modprobe

"modprobe: ERROR: could not insert 'r92su': Exec format error"

UPDATE: Got it working with the latest version from the Raspberry Pi site ("2017-11-29")- seems to be the headers aren't syncing with old version of the kernel and aren't up to date for the new one. The driver source files may not be working for the newest kernel but it works fine in 4.9.59.

ulno
Posts: 8
Joined: Thu Feb 08, 2018 3:44 am

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Thu Feb 08, 2018 3:51 am

I got it to compile after downgrading with rpi-update to 4.9.59, but loading the module crashes the system. Doesn't look good for using realtek wifi usb sticks on the pi, does it?

Which exact kernel version did you use? I used this hash for the kernel: a6b3e852ca70f2a12850b4542438583cc3b29788

Can it be that the gcc compiler is to new for compiling the kernel module for 4.9.59?

Collie714
Posts: 20
Joined: Thu Nov 22, 2012 2:07 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Thu Feb 08, 2018 11:12 am

Think its the same hash alright. I had to clean it all before it would load (probably remnants from the previous version). Removing any trace of the r92su.ko file from the updates folder and from the folder it was compiled to.
My GCC was up to date (as of Tuesday) too so I don't think it was that.

What error did you get on loading the driver?

ulno
Posts: 8
Joined: Thu Feb 08, 2018 3:44 am

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Thu Feb 08, 2018 3:21 pm

Kind of tough debugging as it's a headless device - just plugged it into a screen and just see the kernel panicking and halting or rebooting.

Encouraged by your success, restarting the whole process:

- Reflashing sd-card with my image,
- doing rpi-update a6b3e852ca70f2a12850b4542438583cc3b29788 first
- Compiling and building with your script -> works.
- Trying to remove stick now for booting. Booting -> success.

Ok must have messed up something the first time (NOT, see below). However, now plugging in the usb-stick and modprobing r92su doesn't do anything -> no wlan1 device (I am on a raspberry pi 3 where wlan0 is the internal wifi).
lsusb doesn't show usb device
Ok, let's try poweroff and power-cycle while stick plugged in -> back to kernel panic -> Argh.

- Ok, booting without usb-stick plugged in -> comes up.8192cu
- Trying to plug in usb-stick -> nothing happens
- Verifying via lsusb - device doesn't even show up (as reference: It's a 0bda:8171 Realtek Semiconductor Corp. RTL8188SU)
- Poweroff again
- taking out usb
- Powercycle -> comes up
- Plug in usb -> instant kernel panic - death messages are the following (trying to repeat, but often can't detect usb-stick at all after power cycle)

Code: Select all

[email protected]:~ $ sudo su
[email protected]:/home/pi# tail -f /var/log/syslog


Feb  8 09:59:43 ulnoiotgw kernel: [  368.314029] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
Feb  8 09:59:43 ulnoiotgw kernel: [  368.446360] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=8171
Feb  8 09:59:43 ulnoiotgw kernel: [  368.446373] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb  8 09:59:43 ulnoiotgw kernel: [  368.446382] usb 1-1.3: Product: RTL8188S WLAN Adapter 
Feb  8 09:59:43 ulnoiotgw kernel: [  368.446390] usb 1-1.3: Manufacturer: Manufacturer Realtek 
Feb  8 09:59:43 ulnoiotgw kernel: [  368.446397] usb 1-1.3: SerialNumber: 00e04c000001
Feb  8 09:59:43 ulnoiotgw kernel: [  368.481438] r92su: loading out-of-tree module taints kernel.
Feb  8 09:59:43 ulnoiotgw systemd[1]: Starting Load/Save RF Kill Switch Status...
Feb  8 09:59:43 ulnoiotgw kernel: [  368.623209] input: ieee80211/phy1/input0 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/ieee80211/phy1/input0
Feb  8 09:59:43 ulnoiotgw kernel: [  368.623231] r92su 1-1.3:1.0: Realtek RTL81XX rev C CUT, rf:1T1R is registered as 'phy1'.
Feb  8 09:59:43 ulnoiotgw kernel: [  368.623320] usbcore: registered new interface driver r92su
Feb  8 09:59:44 ulnoiotgw systemd[1]: Started Load/Save RF Kill Switch Status.
Feb  8 09:59:44 ulnoiotgw systemd[1]: Found device RTL8188SU 802.11n WLAN Adapter.
Feb  8 09:59:44 ulnoiotgw systemd[1]: Started ifup for wlan1.
Feb  8 09:59:44 ulnoiotgw dhcpcd-run-hooks[3797]: wlan1: starting wpa_supplicant
Feb  8 09:59:44 ulnoiotgw kernel: [  368.779743] ieee80211 phy1: firmware version: 0x11ec
Feb  8 09:59:44 ulnoiotgw kernel: [  368.779828] NYET/NAK/ACK/other in non-error case, 0x00000002
Feb  8 09:59:44 ulnoiotgw kernel: [  368.779850] NYET/NAK/ACK/other in non-error case, 0x00000002
Feb  8 09:59:44 ulnoiotgw kernel: [  368.779870] NYET/NAK/ACK/other in non-error case, 0x00000002
Feb  8 09:59:44 ulnoiotgw kernel: [  368.819337] ieee80211 phy1: wait for SYS_SWHW_SEL in adf5
...
[Same message repeats about 100 times]
...
Feb  8 09:59:44 ulnoiotgw kernel: [  368.820791] ieee80211 phy1: wait for SYS_SWHW_SEL in adf5
Feb  8 09:59:44 ulnoiotgw dhcpcd-run-hooks[3808]: wlan1: failed to start wpa_supplicant
Feb  8 09:59:44 ulnoiotgw sh[3783]: tput: No value for $TERM and no -T specified
Feb  8 09:59:44 ulnoiotgw dhcpcd-run-hooks[3810]: wlan1: Successfully initialized wpa_supplicant#012Could not set interface wlan1 flags (UP): Input/output error#012nl80211: Could not set interface 'wlan1' UP#012nl80211: deinit ifname=wlan1 disabled_11b_rates=0#012Could not set interface wlan1 flags (UP): Resource temporarily unavailable#012WEXT: Could not set interface 'wlan1' UP#012wlan1: Failed to initialize driver interface
Feb  8 09:59:44 ulnoiotgw systemd-udevd[3766]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
Feb  8 09:59:44 ulnoiotgw wpa_supplicant[3854]: Successfully initialized wpa_supplicant
Feb  8 09:59:44 ulnoiotgw dhcpcd[357]: eth0: removing interface
Feb  8 09:59:44 ulnoiotgw kernel: [  369.014126] usb usb1-port1: disabled by hub (EMI?), re-enabling...
Feb  8 09:59:44 ulnoiotgw kernel: [  369.014144] usb 1-1: USB disconnect, device number 2
Feb  8 09:59:44 ulnoiotgw kernel: [  369.014150] usb 1-1.1: USB disconnect, device number 3
Feb  8 09:59:44 ulnoiotgw kernel: [  369.014329] smsc95xx 1-1.1:1.0 eth0: unregister 'smsc95xx' usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet
Feb  8 09:59:44 ulnoiotgw kernel: [  369.014363] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Feb  8 09:59:44 ulnoiotgw wpa_supplicant[3854]: Could not set interface wlan1 flags (UP): Resource temporarily unavailable
Feb  8 09:59:44 ulnoiotgw wpa_supplicant[3854]: nl80211: Could not set interface 'wlan1' UP
Feb  8 09:59:44 ulnoiotgw wpa_supplicant[3854]: nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Feb  8 09:59:44 ulnoiotgw wpa_supplicant[3854]: Could not set interface wlan1 flags (UP): Resource temporarily unavailable
Feb  8 09:59:44 ulnoiotgw wpa_supplicant[3854]: WEXT: Could not set interface 'wlan1' UP
Feb  8 09:59:44 ulnoiotgw wpa_supplicant[3854]: wlan1: Failed to initialize driver interface
Feb  8 09:59:44 ulnoiotgw sh[3783]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Feb  8 09:59:44 ulnoiotgw systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Feb  8 09:59:44 ulnoiotgw sh[3783]: ifup: failed to bring up wlan1
Feb  8 09:59:44 ulnoiotgw kernel: [  369.075305] usb 1-1.3: USB disconnect, device number 4
Feb  8 09:59:44 ulnoiotgw dhcpcd[357]: wlan1: removing interface
Feb  8 09:59:44 ulnoiotgw systemd[1]: Stopping ifup for wlan1...
Feb  8 09:59:44 ulnoiotgw ifdown[3883]: ifdown: interface wlan1 not configured
Feb  8 09:59:44 ulnoiotgw systemd[1]: Stopped ifup for wlan1.
Feb  8 09:59:44 ulnoiotgw systemd[1]: [email protected]: Unit entered failed state.
Feb  8 09:59:44 ulnoiotgw systemd[1]: [email protected]: Failed with result 'exit-code'.
Feb  8 09:59:44 ulnoiotgw kernel: [  369.604121] Indeed it is in host mode hprt0 = 00001501
Feb  8 09:59:45 ulnoiotgw kernel: [  369.804046] usb 1-1: new high-speed USB device number 5 using dwc_otg
Feb  8 09:59:45 ulnoiotgw kernel: [  369.804137] Indeed it is in host mode hprt0 = 00001101
Feb  8 09:59:45 ulnoiotgw kernel: [  370.034165] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
Feb  8 09:59:45 ulnoiotgw kernel: [  370.034173] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Feb  8 09:59:45 ulnoiotgw kernel: [  370.034682] hub 1-1:1.0: USB hub found
Feb  8 09:59:45 ulnoiotgw kernel: [  370.034732] hub 1-1:1.0: 5 ports detected
Feb  8 09:59:45 ulnoiotgw kernel: [  370.354016] usb 1-1.1: new high-speed USB device number 6 using dwc_otg
Feb  8 09:59:45 ulnoiotgw kernel: [  370.484322] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
Feb  8 09:59:45 ulnoiotgw kernel: [  370.484336] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Feb  8 09:59:45 ulnoiotgw kernel: [  370.487383] smsc95xx v1.0.5
Feb  8 09:59:45 ulnoiotgw kernel: [  370.578119] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:40:99:34
Feb  8 09:59:46 ulnoiotgw kernel: [  370.674137] usb 1-1.3: new high-speed USB device number 7 using dwc_otg
Feb  8 09:59:46 ulnoiotgw dhcpcd[357]: eth0: waiting for carrier
Feb  8 09:59:46 ulnoiotgw kernel: [  370.806152] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=8171
Feb  8 09:59:46 ulnoiotgw kernel: [  370.806155] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Feb  8 09:59:46 ulnoiotgw kernel: [  370.806162] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb  8 09:59:46 ulnoiotgw kernel: [  370.806167] usb 1-1.3: Product: RTL8188S WLAN Adapter 
Feb  8 09:59:46 ulnoiotgw kernel: [  370.806170] usb 1-1.3: Manufacturer: Manufacturer Realtek 
Feb  8 09:59:46 ulnoiotgw kernel: [  370.806176] usb 1-1.3: SerialNumber: 00e04c000001
Feb  8 09:59:46 ulnoiotgw kernel: [  370.806452] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Feb  8 09:59:46 ulnoiotgw kernel: [  370.936883] input: ieee80211/phy2/input0 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/ieee80211/phy2/input1
Feb  8 09:59:46 ulnoiotgw kernel: [  370.937049] r92su 1-1.3:1.0: Realtek RTL81XX rev C CUT, rf:1T1R is registered as 'phy2'.
Feb  8 09:59:46 ulnoiotgw systemd[1]: Found device RTL8188SU 802.11n WLAN Adapter.
Feb  8 09:59:46 ulnoiotgw systemd[1]: Started ifup for wlan1.
Feb  8 09:59:46 ulnoiotgw dhcpcd-run-hooks[3970]: wlan1: starting wpa_supplicant
Feb  8 09:59:46 ulnoiotgw kernel: [  371.064230] ieee80211 phy2: firmware version: 0x11ec
Feb  8 09:59:46 ulnoiotgw kernel: [  371.154364] NYET/NAK/ACK/other in non-error case, 0x00000002
Feb  8 09:59:46 ulnoiotgw kernel: [  371.154385] NYET/NAK/ACK/other in non-error case, 0x00000002
Feb  8 09:59:46 ulnoiotgw kernel: [  371.154401] NYET/NAK/ACK/other in non-error case, 0x00000002
Feb  8 09:59:46 ulnoiotgw dhcpcd-run-hooks[4013]: wlan1: failed to start wpa_supplicant
Feb  8 09:59:46 ulnoiotgw kernel: [  371.234025] ieee80211 phy2: firmware's imem upload timedout cpu_status=0x0
Feb  8 09:59:46 ulnoiotgw systemd-udevd[3937]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
Things start repeating now quickly (it seems like whole usb bus gets reset). It takes about 5 minutes until finally pi is dead and freezes (so different behavior dependent on each start).

Any ideas?

Cheers,
ulno
Last edited by ulno on Thu Feb 08, 2018 5:21 pm, edited 1 time in total.

ulno
Posts: 8
Joined: Thu Feb 08, 2018 3:44 am

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Thu Feb 08, 2018 4:48 pm

As a side-note:

Testing some of my other usb-wifi sticks yield:
- atheros-based usb devices seem also not to work in that kernel anymore.
- The small mini 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter works well with the 8192cu module
- all tested ralink-based usb sticks seem to work well (just not in AP mode)

I lied - there is also a ralink based chipset not working - see next post.
Last edited by ulno on Fri Feb 09, 2018 9:39 pm, edited 1 time in total.

ulno
Posts: 8
Joined: Thu Feb 08, 2018 3:44 am

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Fri Feb 09, 2018 2:42 pm

I think this here is basically the same problem, even if another driver: viewtopic.php?f=63&t=192263

ulno
Posts: 8
Joined: Thu Feb 08, 2018 3:44 am

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sat Feb 10, 2018 9:54 pm

Got the r92su driver working on kernel 4.9.59-v7+ with hash a6b3e852ca70f2a12850b4542438583cc3b29788.

Unfortunately it's still not available in 4.14, so even new raspberry kernel doesn't help with this issue.

User avatar
Swampy42
Posts: 10
Joined: Sat Sep 02, 2017 9:19 pm
Location: Kempten (Germany)
Contact: Website

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sat Mar 31, 2018 3:35 pm

I also had the same problem after upgrading with

Code: Select all

sudo apt-get update
sudo apt-get upgrade
to the newest kernel.

When I started the script from drmullins I got the error:
"modprobe: ERROR: could not insert 'r92su': Exec format error"
Linux is like wigwam: no Gates, no Windows and Apache inside.

drmullins
Posts: 29
Joined: Fri Jun 23, 2017 9:22 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sat Mar 31, 2018 9:24 pm

Just updated to kernel 4.14 and unfortuately I can confirm that my script is not working any more with a failure in compilation - disappointing.

drmullins
Posts: 29
Joined: Fri Jun 23, 2017 9:22 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Sun Apr 08, 2018 4:44 pm

I had to revert to the 4.9.80 kernel
sudo rpi-update 5c80565c5c0c7f820258c792a98b56f22db2dd03
to get my Realtek wireless adapter working again
- NOT A SATISFACTORY SOLUTION GOING FORWARD.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20472
Joined: Sat Jul 30, 2011 7:41 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Tue Apr 10, 2018 12:43 pm

drmullins wrote:
Sat Mar 31, 2018 9:24 pm
Just updated to kernel 4.14 and unfortuately I can confirm that my script is not working any more with a failure in compilation - disappointing.
Can you post the particular compile error you are seeing?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

drmullins
Posts: 29
Joined: Fri Jun 23, 2017 9:22 pm

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Tue Apr 10, 2018 4:33 pm

Thank you for your reply

See attached output from running my r92su installation/update script as listed earlier in thread.

The error appears to be in linking main.o module to the kernel modules (in the middle of the output) , if I understand it correctly - and I suspect this may be the cause of the problem

Best regards


Get:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Get:3 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages [11.7 MB]
Get:4 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Contents (deb) [35.5 MB]
Get:5 http://raspbian.raspberrypi.org/raspbian stretch/contrib armhf Packages [56.8 kB]
Get:6 http://raspbian.raspberrypi.org/raspbian stretch/contrib armhf Contents (deb) [90.3 kB]
Get:7 http://raspbian.raspberrypi.org/raspbian stretch/non-free armhf Packages [95.2 kB]
Get:8 http://raspbian.raspberrypi.org/raspbian stretch/non-free armhf Contents (deb) [758 kB]
Get:9 http://raspbian.raspberrypi.org/raspbian stretch/rpi armhf Packages [1,360 B]
Get:10 http://raspbian.raspberrypi.org/raspbian stretch/rpi armhf Contents (deb) [328 B]
Fetched 48.2 MB in 22h 36min 13s (591 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
raspberrypi-kernel-headers is already the newest version (1.20180328-1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.11.0-3+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
rtl8192su repository already cloned
creating /lib/modules/4.14.30-v7+/updates
Making r92su.ko driver
make -C /lib/modules/4.14.30-v7+/build M=/home/pi/rtl8192su/r92su CONFIG_R92SU=m CONFIG_R92SU_WPC=y EXTRA_CFLAGS="-DDEBUG -DCONFIG_R92SU=m -DCONFIG_R92SU_WPC=y"
make[1]: Entering directory '/usr/src/linux-headers-4.14.30-v7+'
AR /home/pi/rtl8192su/r92su/built-in.o
CC [M] /home/pi/rtl8192su/r92su/michael.o
CC [M] /home/pi/rtl8192su/r92su/aes_ccm.o
CC [M] /home/pi/rtl8192su/r92su/eeprom.o
CC [M] /home/pi/rtl8192su/r92su/event.o
CC [M] /home/pi/rtl8192su/r92su/debug.o
CC [M] /home/pi/rtl8192su/r92su/main.o
/home/pi/rtl8192su/r92su/main.c:1333:25: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.change_virtual_intf = r92su_change_virtual_intf,
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/rtl8192su/r92su/main.c:1333:25: note: (near initialization for ‘r92su_cfg80211_ops.change_virtual_intf’)
/home/pi/rtl8192su/r92su/main.c: In function ‘r92su_if_setup’:
/home/pi/rtl8192su/r92su/main.c:1741:6: error: ‘struct net_device’ has no member named ‘destructor’; did you mean ‘priv_destructor’?
ndev->destructor = free_netdev;
^~
cc1: some warnings being treated as errors
scripts/Makefile.build:328: recipe for target '/home/pi/rtl8192su/r92su/main.o' failed
make[2]: *** [/home/pi/rtl8192su/r92su/main.o] Error 1
Makefile:1519: recipe for target '_module_/home/pi/rtl8192su/r92su' failed
make[1]: *** [_module_/home/pi/rtl8192su/r92su] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.14.30-v7+'
Makefile.r92su:24: recipe for target 'all' failed
make: *** [all] Error 2
copying r92su.ko
module r8721u already blacklisted
updating dependencies
stopping networking service
inserting module r92su
insmod /lib/modules/4.14.30-v7+/updates/r92su.ko
modprobe: ERROR: could not insert 'r92su': Exec format error
starting networking service
Exit ?

User avatar
Swampy42
Posts: 10
Joined: Sat Sep 02, 2017 9:19 pm
Location: Kempten (Germany)
Contact: Website

Re: Realtek wireless adapter not connecting in Stretch (Jessie OK)

Fri May 11, 2018 9:21 am

I tried to compile with "kernel 4.14.34" and "make -f Makefile.r92su" and I got also these errors:

Code: Select all

make -C /lib/modules/4.14.34+/build M=/home/pi/rtl8192su/r92su CONFIG_R92SU=m CONFIG_R92SU_WPC=y  EXTRA_CFLAGS="-DDEBUG -DCONFIG_R92SU=m -DCONFIG_R92SU_WPC=y"
make[1]: Verzeichnis „/usr/src/linux-headers-4.14.34+“ wird betreten
  AR      /home/pi/rtl8192su/r92su/built-in.o
  CC [M]  /home/pi/rtl8192su/r92su/michael.o
  CC [M]  /home/pi/rtl8192su/r92su/aes_ccm.o
  CC [M]  /home/pi/rtl8192su/r92su/eeprom.o
  CC [M]  /home/pi/rtl8192su/r92su/event.o
  CC [M]  /home/pi/rtl8192su/r92su/debug.o
  CC [M]  /home/pi/rtl8192su/r92su/main.o
/home/pi/rtl8192su/r92su/main.c:1333:25: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .change_virtual_intf = r92su_change_virtual_intf,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/rtl8192su/r92su/main.c:1333:25: note: (near initialization for ‘r92su_cfg80211_ops.change_virtual_intf’)
/home/pi/rtl8192su/r92su/main.c: In function ‘r92su_if_setup’:
/home/pi/rtl8192su/r92su/main.c:1741:6: error: ‘struct net_device’ has no member named ‘destructor’; did you mean ‘priv_destructor’?
  ndev->destructor = free_netdev;
      ^~
cc1: some warnings being treated as errors
scripts/Makefile.build:328: die Regel für Ziel „/home/pi/rtl8192su/r92su/main.o“ scheiterte
make[2]: *** [/home/pi/rtl8192su/r92su/main.o] Fehler 1
Makefile:1528: die Regel für Ziel „_module_/home/pi/rtl8192su/r92su“ scheiterte
make[1]: *** [_module_/home/pi/rtl8192su/r92su] Fehler 2
make[1]: Verzeichnis „/usr/src/linux-headers-4.14.34+“ wird verlassen
Makefile.r92su:24: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2
I hope this could be helpful.
Linux is like wigwam: no Gates, no Windows and Apache inside.

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 20 guests