Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to WiFi: Invalid Arguments #225

Closed
silentsnake14 opened this issue Apr 10, 2014 · 26 comments
Closed

Can't connect to WiFi: Invalid Arguments #225

silentsnake14 opened this issue Apr 10, 2014 · 26 comments

Comments

@silentsnake14
Copy link

Using 0.4.0-rc3 on a Raspberry Pi 512 MB with Edimax Wireless 802.11b/g/n nano USB Adapter I can't connect to my WiFi. Only message I get is "Invalid Arguments".

Tested on two devices (Separate Raspberry Pi's, Wireless Adapters and SD cards) with a clean install on each.

Signal strength is at 100 %, network is working fine on all other devices and both Raspberry Pi's worked without problems on Xbian and Arch Linux.

Given advice in another Issue (Use shorter passphrase) is not possible for me.

@vulcanjedi
Copy link

silentsnake14, I haven't tried wifi on my Rasplex simply because I have a wired connection readily available right at it but I can try.
Aside from that, is your SID being broadcast or is it hidden? Also does the SID have any unique characters like punctuation or spaces? I did have issues with OpenElec XBMC I'm not sure where you get the 'invalid arguments' I dont recall seeing that or not; was that in the OSD or in a log?

@silentsnake14
Copy link
Author

Thank for the fast reply!
SSID is broadcasted and just 7 [a-z] characters, nothing special. Passphrase contains 32 alphanumeric chars.

@vulcanjedi
Copy link

Was this an issue pre RC3 and now no longer works or you just starting out on RC3?

@silentsnake14
Copy link
Author

Was definitely an issue before. I tried RasPlex some time ago (0.3.1 as far as I remember) and ended up with this problem. Switched back to Xbian for a while and decided to give RasPlex another try when RC1 was released.
Since I really like RasPlex and it works great with Ethernet plugged in, I hoped I can solve the Problem somehow.
Is there anything I can try to connect to WiFi manually via SSH or something? Some research showed that OpenELEC uses conman but didn't find a way to access it's configuration.

@NedtheNerd
Copy link

Why not try Powerline adapters, using WiFi can limit you to low bitrate, low res videos.

Regards

@LongChair LongChair reopened this Apr 10, 2014
@vulcanjedi
Copy link

silentsnake, just trying to further isolate and get potentially helpful details for the team/devs.
What security protocol is the network in question using? You mention mutliple adapters, can you specify? Since multiple adapters don't work seems like potentially a more holistic issue?

@silentsnake14
Copy link
Author

Actually it's not that bad. Since the Ethernet port is driven by Raspberry's internal USB it isn't so fast anyway. But ok, might be a bit better than WiFi, taking signal stability into account.

I appreciate your help and will provide as much information as I can.
Security protocol is WPA2 Personal, the access point uses 802.11a/b/g/n/ac, since the adapter is 802.11n I assume it tries to connect over 802.11n.
Unfortunately both adapters I have for the Raspberry Pi are of the same type, as specified in my first post. Just tried both to ensure it is not a defect.

For testing I did set up another access point. RasPlex connects to it as long as the passphrase is short, like 12 characters. Using a passphrase with 24-32 characters throws the invalid arguments error. I think it has something to do with the way the passphrase is provided by the configuration page to the connection configuration itself.

@silentsnake14
Copy link
Author

Don't know if this helps, but I tried something. ^^

Connected to SSH, used su to gain root permissions and done the following:

-# connmanctl
-> scan wifi
Scan completed for wifi
-> services
*AR Wired ethernet_CABLESOMEID_cable
Network wifi_NETWORKSOMEID_managed_psk
NetworkGuest wifi_NETWORKGUESTSOMEID_managed_psk
-> connect wifi_NETWORKSOMEID_managed_psk
== Unfortunately now the keypad appears on the TV and no passphrase prompt on the shell so I have to use the remote to type the password :( ==
Error /net/connman/service/wifi_NETWORKSOMEID_managed_psk: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

(The error appears on the shell BEFORE I have completely typed my passphrase.) Nothing happens after I hit done - neither on the shell nor on the GUI.

Some very strange guess, but maybe I am too slow? So for example, connmanctl puts up the agent GUI at front and says "lets wait for $interval seconds for a result before I time out and cancel the whole thing" and reaches the timeout before I can finish typing. ^^

I try to get a keyboard from somewhere and check if faster typing solves the problem.

Edit: Problem is "solved". I think you should increase the timeout anyway.

@vulcanjedi
Copy link

Hey silentsnake, thanks for all responding with all the details and help, glad its sorted, but how was it 'solved'? Is it related to the password length?

@silentsnake14
Copy link
Author

Sorry that this wasn't clear.
Problem was, that I took to long to type the password and the connection attempt timed out. Took me 2 minutes or so to type the complete thing via the TV remote control. So I attached a hardware keyboard and quickly typed the password and it worked.

Since the time needed to enter the password corresponds to its length I was fast enough to type passwords like 123456789012 on my test setup that it didn't time out.

As far as I understand this technically (and I am not very experienced with it, so it might be wrong) the connection to WiFi is established via a tool called connman. When connman is asked to connect to a network that is password protected it talks to another piece of software called "agent" - that is some GUI to bring up a password dialog for the user to enter the password. Conman than waits to hear back from this agent for a while to get the password and establish the connection. BUT after some time connman thinks that the user aborted the process (since no password came back in time) and aborts the complete process. This is whats leads to the "Invalid arguments" error in the menu.

One could easily reproduce the problem. For example just try to connect to a network that is known working, wait for the password prompt to appear, leave it on screen for 5 minutes or so and then enter your password and hit done and it will fail. Do the exact same thing without waiting it works fine.
Another possibility is to go to SSH, log in as root, and follow these steps:
root# connmanctl
-> scan wifi
(Wait for completion message)
-> services
(Look for the ID of your network SSID)
-> connect ID

At this point the password prompt will appear at the TV (the display directly connected to your Raspberry Pi). Now do nothing, just wait. After some time the following message will appear on the SSH prompt.
Error /net/connman/service/wifi_NETWORKSOMEID_managed_psk: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

That indicates that the timeout was reached.

Hope this might help you to fix this bug or at least is helpful to the next person searching for it. ^^

@vulcanjedi
Copy link

First off, thanks so much for the detailed responsive posts. I'm sure the devs will check this out and I'll bring it up to them as possibly we can get this as an enhancement request or at least documented somewhere for others.

@LongChair
Copy link
Member

Well if connman is timeouting .. i am not sure what we can do about that ...

@silentsnake14
Copy link
Author

Manpage for connman.conf says

InputRequestTimeout=secs
Set input request timeout. Default is 120 seconds The request
for inputs like passphrase will timeout after certain amount of
time. Use this setting to increase the value in case of
different user interface designs.

Maybe increasing this value to 10 min would help.

@LongChair
Copy link
Member

@dalehamel : can you have a look at this ?

@LongChair LongChair added the bug label Apr 12, 2014
@LongChair LongChair added this to the 0.4.0. rc4 milestone Apr 12, 2014
@dalehamel dalehamel removed this from the 0.4.0. rc4 milestone Feb 13, 2015
@NedtheNerd
Copy link

@silentsnake14 Is this still an issue in 0.5.1.

If not can you please close this issue.

@trondvh
Copy link

trondvh commented Mar 3, 2015

Still the same issue on 0.5.1 on pi2.

@NedtheNerd
Copy link

Can you test on 0.7.1, if no feedback issue will be closed.

@Qrbaker
Copy link

Qrbaker commented Sep 28, 2015

To jump on this, I'm trying to use connman over ssh to connect to an EAP network. Perhaps if a config file could be created with VIM and connman could pull from that to prevent the timeout issue...?

@NedtheNerd
Copy link

No further feedback since March, closing issue.

@falahati
Copy link

falahati commented Jun 21, 2016

Still an issue Ned, v1.6 Pi2

@GarlandM
Copy link

GarlandM commented Aug 4, 2016

Can confirm, still had this issue.

@johnnyKaZOO
Copy link

I can also confirm this is still an issue. My password is 36 characters long and it takes ages to type it in on a TV remote, after 4 attempts I finally managed to do it quick enough.

Would it not be possible to start the connection attempt after the user has typed the password? You can take as long as you want then.

@D0048
Copy link

D0048 commented Oct 10, 2017

Can confirm that this issue still exists.

@cpfaff
Copy link

cpfaff commented Jan 6, 2018

I have this now with the latest release and an edimax wifi dongle.

@stdclass
Copy link

stdclass commented Feb 3, 2018

Have the same problem. Raspberry Pi 3 with the latest 2017-11-29-raspbian-stretch image.

@cpfaff
Copy link

cpfaff commented Feb 3, 2018

You can try to use the console as I did. Ssh to the machine and use connman. That works! That way you also get it working remembering multiple connections which never worked for me from the UI.

https://gist.github.com/maoueh/8260199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests