WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: 64 bit wifi.sh gives me "failed to connect"  (Read 6754 times)

aus9

  • Guest
64 bit wifi.sh gives me "failed to connect"
« on: July 21, 2018, 03:48:57 AM »
Hi

I normally get the net via ethernet cable and so this is a low priority request.

In case ethernet interferes with wifi I first
Code: [Select]
tce-load -i wicd
sudo /usr/local/etc/init.d/dbus start
sudo /usr/local/etc/init.d/wicd start

then use wicd to disconnect ethernet

then
Code: [Select]
tce-load -i wifi
sudo wifi.sh

I can not capture the next output but it scans networks and gives me something like this

Code: [Select]
Select Wifi Network

    ESSID                  Enc Qual Channel Type
 1. WiFi-Y5VY               on   0   1 WPA
 2. lucky2                 on   0   6 WPA
 3. SMA1992022723           on   0   6 WPA
 4. Fon WiFi              off   0 11

Enter selection ( 1 - 4 ) or (q)uit:

I select my router by number and input the passphrase and press enter

Code: [Select]
Sending credentials to requested access point <router-name> .......
under /tmp I can see a file with the correct passphrase....filename is wpa.<4 digit number>
contents is the correct passphrase .....eliminating my classic fail to wear googles and input wrong passphrase ;)

Code: [Select]
Failed to connect.
and it kicks me back to prompt

2) I can use ethernet  and I CAN use wicd but looking for help on how to get a log to try and find out why wifi.sh does not party

hidden agenda.....I forced wicd as a running dep of 8188eu for this reason

thanks for reading

3) the possible reason....if I am right I put in the info file as
https://github.com/lwfinger/rtl8188eu/issues/197

Quote
In short, the (sub) driver that rtl8188eu requires to talk with wpa_supplicant (wext) is now deprecated, and NetworkManager apparently ignores all attempts to use wext. The only good long term solution is for rtl8188eu to become compatible with the modern 'nl80211' wpa_supplicant driver.

does this reason seem reasonable?

I am not of course a normal wifi user so rely on my gurus to reveal all.


« Last Edit: July 21, 2018, 03:55:11 AM by aus9 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #1 on: July 21, 2018, 04:40:12 AM »
What happens if you try wifi.sh without first having loaded or used wicd?

aus9

  • Guest
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #2 on: July 21, 2018, 06:45:20 AM »
Hi

no change still failed to connect.

no wicd loaded and ethernet cable left intact, no attempt to remove ethernet module either

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #3 on: July 21, 2018, 12:46:04 PM »
 Have you tried to connect manually with wpa_supplicant?

aus9

  • Guest
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #4 on: July 21, 2018, 11:47:06 PM »
Hi

I have attempted to follow the wiki here
http://wiki.tinycorelinux.net/wiki:setting_up_wifi#more_advanced_setupusing_wireless_tools
Connecting to a WPA-PSK secured access point

Code: [Select]
tce-load -i 8188eu wireless_tools wpa_supplicant-dbus

iwconfig
output in quote box
Quote
snip
wlan0     unassociated  ESSID:""  Nickname:"<WIFI@REALTEK>"
          Mode:Auto  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/100  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
snip

so we know the kernel module and FW works.....at this point....wicd is not loaded...next
Code: [Select]
wpa_passphrase lucky2  <my-passphrase>
I then create /opt/wpa_supplicant with disguised contents of
Quote
ctrl_interface=/var/run/wpa_supplicant

network={

      ssid=lucky2
      proto=WPA
      key_mgmt=WPA-PSK
      pairwise=TKIP
      group=TKIP
      psk=long-string

}

next
Code: [Select]
wpa_supplicant -i lucky2 -c/opt/wpa_configure.conf &
tc@box:~$ Successfully initialized wpa_supplicant
Failed to open config file '/opt/wpa_configure.conf', error: No such file or directory
Failed to read or parse configuration '/opt/wpa_configure.conf'.
( it hangs here so I press enter to get prompt back)
[1]+  Done(255)                  wpa_supplicant -i lucky2 -c/opt/wpa_configure.conf

it claims it can not find my file.

Code: [Select]
ls -al /opt/wpa_configure.conf
-rw-r--r--    1 tc       staff          223 Jul 22 11:15 /opt/wpa_configure.conf

### Interesting for me....there is no /var/run/wpa_supplicant  at this stage

I know I do not always wear my goggles but it looks correct?

I gave up ....loaded wicd as above etc and then the /var/run/wpa_supplicant appears

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #5 on: July 22, 2018, 06:55:08 AM »
This works for me:
Code: [Select]
$ sudo wpa_supplicant -B -Dwext -i wlan0 -c/etc/wpa_configure.conf
Successfully initialized wpa_supplicant
$ sudo udhcpc -b -i wlan0 -x hostname:boxdell -p /var/run/udhcpc.wlan0.pid
udhcpc: started, v1.27.2
udhcpc: sending discover
udhcpc: sending select for 192.168.1.105
udhcpc: lease of 192.168.1.105 obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.1.1

..but I wonder if you need to replace "-Dwext" with "-Dnl80211"?

aus9

  • Guest
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #6 on: July 22, 2018, 09:32:53 AM »
reply part one

you have used sudo....sudo appears not required in the wiki unless I run the diagnostic and here that is

Code: [Select]
sudo wpa_supplicant -i lucky2 -c/opt/wpa_configure.conf -d
wpa_supplicant v2.6
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'lucky2' conf '/opt/wpa_configure.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/opt/wpa_configure.conf' -> '/opt/wpa_configure.conf'
Reading configuration file '/opt/wpa_configure.conf'
Failed to open config file '/opt/wpa_configure.conf', error: No such file or directory
Failed to read or parse configuration '/opt/wpa_configure.conf'.
Failed to add interface lucky2
: Cancelling scan request
: Cancelling authentication timeout

####################################################
part two

using sudo now gives better info?

Code: [Select]
sudo wpa_supplicant -i lucky2 -c/opt/wpa_configure.conf &
tc@box:/opt$ Successfully initialized wpa_supplicant
Line 5: failed to parse ssid 'lucky2'.
Line 5: failed to parse ssid 'lucky2'.
Line 12: failed to parse network block.
Failed to read or parse configuration '/opt/wpa_configure.conf'

EDIT part three

the wiki in one section showed mynetwork with  quotes but the conf without it
just amended conf and now I get

Code: [Select]
sudo wpa_supplicant -i lucky2 -c/opt/wpa_configure.conf &
tc@box:/opt$ Successfully initialized wpa_supplicant
Could not read interface lucky2 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=lucky2 disabled_11b_rates=0
Could not read interface lucky2 flags: No such device
lucky2: Failed to initialize driver interface

« Last Edit: July 22, 2018, 09:36:39 AM by aus9 »

aus9

  • Guest
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #7 on: July 22, 2018, 09:42:19 AM »
part 4 reply so now attempting your other way

Code: [Select]
sudo wpa_supplicant -B -Dnl80211 -i wlan0 -c/opt/wpa_configure.conf
Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface

nl80211: Driver does not support authentication/association or connect commands...does not look promising.

In my OP....I claimed the reason for using wicd is because
In short, the (sub) driver that rtl8188eu requires to talk with wpa_supplicant (wext) is now deprecated, and NetworkManager apparently ignores all attempts to use wext. The only good long term solution is for rtl8188eu to become compatible with the modern 'nl80211' wpa_supplicant driver.

are you now in agreement?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #8 on: July 22, 2018, 09:47:47 AM »
..and "sudo wpa_supplicant -B -Dwext -i wlan0 -c/opt/wpa_configure.conf" doesn't work either?

aus9

  • Guest
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #9 on: July 22, 2018, 10:46:52 AM »
Code: [Select]
tce-load -i 8188eu wireless_tools wpa_supplicant-dbus
8188eu.tcz: OK
libiw.tcz: OK
wireless-4.14.10-tinycore64.tcz: OK
wireless_tools.tcz: OK
ncursesw.tcz: OK
readline.tcz: OK
libnl.tcz: OK
wpa_supplicant-dbus.tcz: OK
tc@box:~$ sudo wpa_supplicant -B -Dwext -i wlan0 -c/opt/wpa_configure.conf
Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted
tc@box:~$ tce-load -i rfkill
rfkill.tcz: OK
tc@box:~$ sudo wpa_supplicant -B -Dwext -i wlan0 -c/opt/wpa_configure.conf
Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

ioctl[SIOCSIWAP]: Operation not permitted
tc@box:~$ ls /var/run/
klogd.pid        udhcpc.eth0.pid  wpa_supplicant/
syslogd.pid      utmp
tc@box:~$ sudo rm -rf /var/run/wpa_supplicant/wlan0
tc@box:~$ sudo wpa_supplicant -B -Dwext -i wlan0 -c/opt/wpa_configure.conf
Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted

EDIT

in at least one post I confused interface with router name

forgot to start rfkill done now

Code: [Select]
sudo /usr/local/etc/init.d/rfkill start
Unblocking rfkill device: all
done.

« Last Edit: July 22, 2018, 10:59:04 AM by aus9 »

aus9

  • Guest
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #10 on: July 22, 2018, 11:01:03 AM »
no more edits above so after rfkill I try

Code: [Select]
sudo rm -rf /var/run/wpa_supplicant/
tc@box:~$
tc@box:~$ sudo wpa_supplicant -B -Dwext -i wlan0 -c/opt/wpa_configure.conf
Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted
tc@box:~$ sudo wpa_supplicant -B -Dnl80211 -i wlan0 -c/opt/wpa_configure.conf
Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface

edit

ethernet is still up....is that interfering?

Code: [Select]
sudo udhcpc -b -i wlan0 -x hostname:box -p /var/run/udhcpc.wlan0.pid
udhcpc: started, v1.27.2
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, forking to background
tc@box:~$ ls /var/run
klogd.pid         udhcpc.eth0.pid   utmp
syslogd.pid       udhcpc.wlan0.pid  wpa_supplicant/
« Last Edit: July 22, 2018, 11:03:41 AM by aus9 »

aus9

  • Guest
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #11 on: July 22, 2018, 11:07:44 AM »
no rush to reply with any suggestions as its bed time for me

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #12 on: July 22, 2018, 12:42:42 PM »
I think the title is misleading as wifi.sh works fine for all my systems with only wifi.tcz, deps and appropriate firmware extensions..

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #13 on: July 22, 2018, 05:19:22 PM »
FYI: "wpa_configure.conf" is usually called "wpa_supplicant.conf"

Try adding "nl80211,wext" to /etc/sysconfig/wifi-wpadrv

aus9

  • Guest
Re: 64 bit wifi.sh gives me "failed to connect"
« Reply #14 on: July 22, 2018, 08:46:36 PM »
@ coreplayer2

the title area does not give me enough room to provide a more friendly description of the issue.

and I said ME in the subject line.....so not sure why you inferring that I think you are are unable to use wifi.sh?

roughly its this
title=
I normally have no trouble using ethernet to get net, I can get wicd with no issues for my module 8188eu, but if I try to use wifi.sh I get "failed to connect"

also a long time ago I had a dongle that did work with wifi.sh so I have nothing personal against wifi.sh


if you read my OP
Quote
I can use ethernet  and I CAN use wicd but looking for help on how to get a log to try and find out why wifi.sh does not party

I would appreciate it, if you have time to answer that question and the other question as my attempt to explain why I am using wicd

so from my OP

Quote
3) the possible reason....if I am right I put in the info file as
https://github.com/lwfinger/rtl8188eu/issues/197

Quote

    In short, the (sub) driver that rtl8188eu requires to talk with wpa_supplicant (wext) is now deprecated, and NetworkManager apparently ignores all attempts to use wext. The only good long term solution is for rtl8188eu to become compatible with the modern 'nl80211' wpa_supplicant driver.


does this reason seem reasonable?

I am not of course a normal wifi user so rely on my gurus to reveal all.



« Last Edit: July 22, 2018, 08:48:34 PM by aus9 »