dl324
Posts: 122
Joined: Mon May 06, 2019 7:33 pm
Location: Pacific Northwest, USA

Re: Code to execute wi-fi dongle doesnt work

Sat May 25, 2019 8:14 pm

MrEngman wrote:
Thu May 23, 2019 11:58 am
I compile a variety of drivers for Raspbian OS and I believe one of them, rtl8188fu, will support your wifi.
Thanks for doing this for the RPi community. I was headed down this path myself, but found that Stretch already has a driver that supports my adapter.

ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter


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

Re: Code to execute wi-fi dongle doesnt work

Sat May 25, 2019 8:46 pm

deepakdeshp wrote:
Sat May 25, 2019 8:02 pm
Hello,
Good news!! The driver has been installed. Just finding how to connect to the wi fi network now.

Code: Select all

iwconfig
enx00e0262e17fc  unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  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
There is something funny with my pi. It wasnt rebooting with

Code: Select all

sudo reboot
. When I was typing in the terminal response was sluggish, your install script didnt run , I was having problems in installing packages. Now none of the problems exist. I havent done anything like re-installing the os or even changing the memory card.
I've seen lots of weird problems over the years with various different Pis. Generally shutting down the Pi and turning of the power, waiting a short time, and then turning on the power again and the problems often vanished.

One weird problem I had was with a wifi adapter that didn't appear to be detected with the lsusb command. I shut down the Pi unplugged the adapter and plugged it back in again and powered on the Pi and it still wasn't detected. So shutdown and powered of the Pi again and moved the wifi adapter to a different USB connector. Powered on the Pi and the wifi adapter was detected and the Pi connected to my wifi network. Thought it might be a faulty USB port so to check I shutdown the Pi again and moved the wifi adapter back to the USB port it was in when it didn't work. Powered on the Pi and the wifi adapter was detected and the Pi now connected to the wifi network. Never did find out what the issue was.

To set up your wifi connection edit file /etc/wpa_supplicant/wpa_supplicant.conf like

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=IN

network={
	ssid="Network-name"
	psk="Network-password"
}
Replace Network-name and Network-password with your networks settings. All my Pis use this setup.

Raspberry Pi documentation can be found here https://www.raspberrypi.org/documentati ... /README.md


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

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

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: Code to execute wi-fi dongle doesnt work

Sun May 26, 2019 5:02 am

I had tried the reboot more than once when the pi was acting funny, but it didnt behave even after that. I also faced the problem of the dongle not being recognized but after change of the usb port it works. I am yet to ascertain if the first port is ok or bad.

The contents of /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=IN
network={
   ssid="Dlink"
   psk="Uma"
}
No joy . I tried sudo raspi-config I get the error

Code: Select all

Could not communicate with wpa_supplicant 
Again I am working on it.
I tried

Code: Select all

sudo ifconfig enx00e0262e17fc 192.168.1.21
and the whole pi froze, I cant ssh from another terminal session now.
I have set fixed ip for the ethernet interface to 192.168.1.120. Its frustrating , but I learn new things when there are problems.

Code: Select all

iwconfig
enx00e0262e17fc  unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  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
My kernel is 4.19.42+ , I hope your kernel is also the same. Or the difference in kernel version doesn't matter?
Last edited by deepakdeshp on Sun May 26, 2019 6:21 pm, edited 1 time in total.

sushant_ocv
Posts: 15
Joined: Mon May 20, 2019 8:14 am

Re: Code to execute wi-fi dongle doesnt work

Sun May 26, 2019 5:50 am

Thank you.
This thread helped me, i had got some cheap usb wifi and fixed it somehow.

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: Code to execute wi-fi dongle doesnt work

Fri May 31, 2019 1:01 pm

I wasnt able to make any progress. The Dongle works fine on my Linux Mint machine, so there is no hardware error with the dongle and it does work With Linux Mint 19.1.

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: Code to execute wi-fi dongle doesnt work

Sat Jun 01, 2019 3:06 am

MrEngman,
Did you get the same dongle as mine and are you able to install the driver? I am curious.

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

Re: Code to execute wi-fi dongle doesnt work

Sat Jun 01, 2019 9:25 pm

deepakdeshp wrote:
Sat Jun 01, 2019 3:06 am
MrEngman,
Did you get the same dongle as mine and are you able to install the driver? I am curious.
Hello deepakdeshp,

I've got two different wifi modules, one like yours and a different one, https://www.ebay.co.uk/itm/Adaptateur-r ... SwxChcrQo0 and https://www.ebay.co.uk/itm/300Mbps-USB- ... SwcPNc5AX1

Whichever Pi I connect them to they are detected by the USB and the driver loads and the wifi shows in command ifconfig, however they are behaving very strangely.

When I connect to a Pi 2B using Raspbian Stretch 4.19.46 they will not connect to my wifi and the ifconfig command shows no wifi activity, however if I run a wifi scan command, sudo iwlist wlan0 scan, a list of wifi access points is displayed but the ifconfig shows no network activity, no RX/TX packets sent or received which is very strange.

If I connect to the Pi 2B when it is using kernel Rasbian Jessie, updated to kernel 4.14.98, they both work and connect to my wifii network without problems.

So it looks like the problem is due to a change in the way the wifi is set up in Jessie and Stretch. Just need to find out what it is. No easy as I don't understand code very much.


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

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

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: Code to execute wi-fi dongle doesnt work

Sun Jun 02, 2019 6:19 pm

Hello MrEngman,
Thank you so much for your reply.
May be Jessie will solve my problem, but I think Stretch is more recent or advance than Jessie. Other thing to try is to have Kernel 4.14.98 in Stretch , I will explore how to do this.

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: Code to execute wi-fi dongle doesnt work

Sun Jun 02, 2019 6:42 pm

I was able to install the wi-fi dongle on my Mint machine using the following code

Code: Select all

cd
sudo apt-get install build-essential git dkms linux-headers-$(uname -r)
git clone https://github.com/kelebek333/rtl8188fu
sudo dkms add ./rtl8188fu
sudo dkms install rtl8188fu/1.0
Can these commands be applied with some modification to resolve my issue? Wondering. :|

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

Re: Code to execute wi-fi dongle doesnt work

Sun Jun 02, 2019 11:09 pm

deepakdeshp wrote:
Sun Jun 02, 2019 6:42 pm
I was able to install the wi-fi dongle on my Mint machine using the following code

Code: Select all

cd
sudo apt-get install build-essential git dkms linux-headers-$(uname -r)
git clone https://github.com/kelebek333/rtl8188fu
sudo dkms add ./rtl8188fu
sudo dkms install rtl8188fu/1.0
Can these commands be applied with some modification to resolve my issue? Wondering. :|
Hello deepakdeshp,

I really don't know if it will make any difference.

I have been testing and I have the wifi working on Stretch kernel 4.14.98-v7+ #1200. I made a new SD card image using the 2019-04-08-raspbian-stretch-lite image, installed and ran my script install-wifi and installed the wifi driver for 4.14.98 and the wifi is working.

I'm going to update the image and then see what happens. Maybe its a problem with kernel versions 4.19.xx.


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

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

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

Re: Code to execute wi-fi dongle doesnt work

Mon Jun 03, 2019 3:11 am

Hello deepakdeshp,

I think the problem is mainly fixed. I now have the rtl8188fu wifi running on my Pi 2B using Raspbian Stretch kernels 4.19.42 and 4.19.46.

I changed the source code to use the code from https://github.com/ulli-kroll/rtl8188fu

I have updated the drivers on my web page so if you run my install-wifi script to update the drivers you have installed hopefully you will find your wifi now works.

There is one issue that I have which is the wifi is dropping quite a large number of RX packets. This could be a driver issue but could be due to where my Pi is in my house with respect to where my access point is situated.


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

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

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: Code to execute wi-fi dongle doesnt work

Mon Jun 03, 2019 8:27 am

Hello MrEngman,
The device works flawlessly, doesnt drop any packets at all. I have fixed the router 5ft from the ground in the hall from where there is a good sight visibility all over my house.
Here is the iwconfig

Code: Select all

iwconfig
wlx00e0262e17fc  IEEE 802.11bgn  ESSID:"Dlink"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.417 GHz  Access Point: A0:AB:1B:C7:24:83   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=97/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
The devices works only because of you. Even if I would have to purchase, I wouldnt have known which type of the device to purchase so that it would work with the P.
A Big thank you !!

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

Re: Code to execute wi-fi dongle doesnt work

Mon Jun 03, 2019 9:31 am

deepakdeshp wrote:
Mon Jun 03, 2019 8:27 am
Hello MrEngman,
The device works flawlessly, doesnt drop any packets at all. I have fixed the router 5ft from the ground in the hall from where there is a good sight visibility all over my house.
Here is the iwconfig

Code: Select all

iwconfig
wlx00e0262e17fc  IEEE 802.11bgn  ESSID:"Dlink"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.417 GHz  Access Point: A0:AB:1B:C7:24:83   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=97/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
The devices works only because of you. Even if I would have to purchase, I wouldnt have known which type of the device to purchase so that it would work with the P.
A Big thank you !!
Hello deepakdeshp,

Really good to hear your wifi is now working. I think we really need to thank @ulli-kroll for the changes he made to the source code of the driver so it works wth the Pi.

Anyway, glad to be able to help. Have fun with your Pi.


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

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

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: Code to execute wi-fi dongle doesnt work

Mon Jun 03, 2019 10:03 am

Thank you ulli-kroll for changing the source code of the driver so that my wi-fi is working now.

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

Re: Code to execute wi-fi dongle doesnt work

Mon Jun 03, 2019 10:14 am

Just a thought. It will help others who may be looking for a working driver if you edit the title of the thread in your first post to include (Solved).

e.g. (Solved) Code to execute wi-fi dongle doesnt work



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

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

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: Code to execute wi-fi dongle doesnt work

Mon Jun 03, 2019 5:43 pm

MrEngman wrote:
Mon Jun 03, 2019 10:14 am
Just a thought. It will help others who may be looking for a working driver if you edit the title of the thread in your first post to include (Solved).

e.g. (Solved) Code to execute wi-fi dongle doesnt work



MrEngman
Done

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: [SOLVED] Code to execute wi-fi dongle doesnt work

Wed Jun 05, 2019 12:58 pm

Hello,
I had to re-install the system from scratch due to some issues. The wi-fi driver is successfully installed but wifi isnt working.

Code: Select all

   429079  22
pi@raspberrypi:~ $ iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"Dlink"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.417 GHz  Access Point: A0:AB:1B:C7:24:83   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.
I am not able to attach files, with no extension, with .txt or with .doc extension. Wonder how to do that

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

Re: [SOLVED] Code to execute wi-fi dongle doesnt work

Wed Jun 05, 2019 1:18 pm

deepakdeshp wrote:
Wed Jun 05, 2019 12:58 pm
Hello,
I had to re-install the system from scratch due to some issues. The wi-fi driver is successfully installed but wifi isnt working.

Code: Select all

   429079  22
pi@raspberrypi:~ $ iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"Dlink"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.417 GHz  Access Point: A0:AB:1B:C7:24:83   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.
I am not able to attach files, with no extension, with .txt or with .doc extension. Wonder how to do that
I'm not sure what you mean by "not able to attach files". Do you mean you can't copy the files using wifi?

Wifi looks as though it is connected OK. What does command ifconfig wlan0 show.


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

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

User avatar
rpdom
Posts: 15184
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: [SOLVED] Code to execute wi-fi dongle doesnt work

Wed Jun 05, 2019 1:23 pm

One of the few file formats that can be attached to a forum post is .zip, so just zip up the files to be attached.

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: [SOLVED] Code to execute wi-fi dongle doesnt work

Wed Jun 05, 2019 1:56 pm

Please see information about my wi-fi in the attachment.
wireless-info.tar.gz
(5.49 KiB) Downloaded 14 times
The wifi works and I need to ssh to 192.168.1.4 for it to work. I want to assign a static ip 192.168.1.20 to wi-fi . I changed the /etc/dhcpcd.conf ip 192.168.1.20 gets assigned to the ethernet now.

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: [SOLVED] Code to execute wi-fi dongle doesnt work

Wed Jun 05, 2019 2:07 pm

nmap cant find the wlan0 192.168.1.4 ip. I wonder why so.

Code: Select all

nmap -sn 192.168.1.0/24

Starting Nmap 7.60 ( https://nmap.org ) at 2019-06-05 19:34 IST
Nmap scan report for 192.168.1.1
Host is up (0.0026s latency).
Nmap scan report for 192.168.1.2
Host is up (0.0097s latency).
Nmap scan report for 192.168.1.5
Host is up (0.039s latency).
Nmap scan report for 192.168.1.6
Host is up (0.047s latency).
Nmap scan report for 192.168.1.10
Host is up (0.00018s latency).
Nmap done: 256 IP addresses (5 hosts up) scanned in 16.04 seconds

deepakdeshp
Posts: 103
Joined: Thu Oct 26, 2017 7:23 pm

Re: [SOLVED] Code to execute wi-fi dongle doesnt work

Wed Jun 05, 2019 2:54 pm

I added the following code and wi-fi with 192.168.1.20 works now.

/etc/dhcpcd.conf additional lines.

Code: Select all

interface wlan0
static ip_address=192.168.1.20/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.1.1

omikron
Posts: 13
Joined: Sat May 25, 2019 8:30 am

Re: [SOLVED] Code to execute wi-fi dongle doesnt work

Thu Jun 20, 2019 10:29 am

MrEngman

Is the source of rtl8192 driver available, in the case I will build my own kernel?

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

Re: [SOLVED] Code to execute wi-fi dongle doesnt work

Thu Jun 20, 2019 11:21 am

omikron wrote:
Thu Jun 20, 2019 10:29 am
MrEngman

Is the source of rtl8192 driver available, in the case I will build my own kernel?
rtl8192cu or rtl8192eu?


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

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

Return to “Troubleshooting”