We have moved to a new Sailfish OS Forum. Please start new discussions there.

# Wlan/WiFi connection can't be established

I've been trying to connect to a WRT54G wifi (b/g) router with DD-WRT firmware recently, which gave me some headache. First, let me say that any other mobile device I ever had talked with the router without any issues. It's clearly a Jolla-specific thing, and currently I have no clue where the problem lies.

There are a number of similar reports on the net, however none of them got me further (search Google for "jolla wrt54g connect"). The network itself has a decent signal strength BTW, so genral reception problems can be safely ignored.

Event though I completely omitted the UI after I saw that it's futile to try further, here's the behaviour: When going to System Settings > WLAN, the network in question ("gwark") and a couple more show up. Next I'm selecting gwark, the UI wants me to supply a password. After hitting connect I receive a "Problem with connection" error (green message box on top of the screen).

After that, I went on configuring wpa-supplicant to match the router configuration and supply the necessary data:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="gwark"
proto=RSN
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="XXXX"
scan_ssid=1
priority=2
}


Afterwards I launch wpa_supplicant (after killing the old process and removing its /var/run file):

wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -d


When correctly configured, the ESSID should show up now in iwconfig for the wlan0 interface, but it doesn't. The regular log states

wlan0: Trying to associate with SSID 'gwark'
wlan0: CTRL-EVENT-ASSOC-REJECT status_code=1


The debug output of wpa_suplicant can be found here: wpa_supplicant.log.

I don't expect the problem to go away magically. It's quite consisten, so any hints are appreciated.

edit retag close delete

Did you try to add the network to connman from commandline?

( 2014-01-27 18:37:15 +0300 )edit

I didn't try this, as I lacked the connectivity to install it at the time. What indication do you have though that it makes a difference compared to the native tools that operate below? In the end connman abstracts wpa_supplicant.

( 2014-01-27 20:27:59 +0300 )edit

I had some problems with the native tools and connman interfering each other so I stayed with connman to fix my ipv6 issues and wlan 802.1x issues. But it's just a guess which worked for me.

( 2014-01-27 20:33:16 +0300 )edit

Going to try it, thanks. But it would still be very interesting to me if people involved in WiFi connectivity engineering of the Jolla could give their 5 ct.

( 2014-01-27 22:59:54 +0300 )edit

I received the Jolla Tablet and I have this exact same thing happening trying to connect to my WLAN. My phone (Jolla) works just fine against the same WLAN ap. I'm trying to investigate a bit.

( 2016-04-16 19:16:51 +0300 )edit

Sort by » oldest newest most voted

I had the exact same problem with my connection to a WRT54GS router (running DD-WRT) and none of the potential solutions that I've encountered worked. The WLAN security on the router is set to WPA2 Personal using AES. The UI on Jolla would just return a non-informative error when trying to connect so here's how I solved it.

First, I've installed the connman-test package (pkcon install connman-test) and then obtained the SSID hash using: /usr/lib/connman/test/test-connman scan wifi && /usr/lib/connman/test/test-connman services | grep wifi_. This returns a nice list of identifier strings for each WiFi AP in range with structure like wifi_<LOCAL_MAC>_<SSID_HEX>_<TYPE>

I then proceeded with creating a directory with the matching identifier string of my AP returned from the above command in /var/lib/connman (mkdir /var/lib/connman/<IDENTIFIER>) and created a new settings file within it (touch /var/lib/connman/<IDENTIFIER>/settings). I then edited the settings file to contain:

[<IDENTIFIER>]
Name=<SSID>
SSID=<SSID_HEX>
Favorite=true
AutoConnect=true
Passphrase=<PASS>


I've also added a set of IPv4 entries to make my IP static and other related network info but I don't think it is required.

Turning the WLAN off and on again automatically picked up the settings and connected to the router without any troubles, and it now appears in the UI where I can turn off auto-connect and even remove it from favorites - the settings remain so once I go to Connect to internet and select its SSID it connects without a fuss. No need to mess with wpa_supplicant or anything of the sort.

This is on 1.0.5.16 firmware, don't know if the solution would work on earlier ones as I've seen people mentioning standard connman .conf files in /var/lib/connman instead of the current folder structure.

more

Thanks @incognito. This works for me as well (Jolla 1 version 2.0.5.6, connected to Netgear R7000 router using DD-WRT settings: WPA Personal and EAS security).

( 2016-12-17 19:46:23 +0300 )edit

Trying to use connman produced at least some hints, albeit no solution to the problem. Using the approach described here:

https://wiki.merproject.org/wiki/Minimal/Networking

I'm unable to connect. However issueing 'test-connman connect gwark' returns the following error:

org.freedesktop.DBus.Error.UnknownObject: Method "Connect" with signature "" on interface "net.connman.Service" doesn't exist.

I suppose this message should not show up. Any ideas regarding the reason?

more

Continuing my monologue, as I discovered today that trying to establish a tethering connection to an Sony Android handset yields the same error, i.e. I can't connect to this WPA2 network as well.

What I've done:

/usr/lib/connman/test/test-connman enable wifi
/usr/lib/connman/test/test-connman scan wifi
/usr/lib/connman/test/test-connman services


The last shows the network I'm after. So I try to get the authentification agent started:

/usr/lib/connman/test/simple-agent Identity=wifi_<MAC_ADDR>_<SSID_HEX>_managed_psk Passphrase="wifi_passphrase"


which returns a "Cannot register connman agent." error. This is probably something to resolve first.

Might be that connectionagent interferes at this point, as the error does not show up when I kill the connectionagent process.

Is there any other process that could clash with simple-agent?

[TBC]

more

In ConnMan 1.15 (version in Jolla), there can be only one agent running which normally is the UI or similar (connectionagent in this case). You can run simple-agent after killing the other agent as you noticed.

The connmanctl tool would work actually much better than simple-agent but you would need to compile it yourself as it does not come installed. connmanctl is part of connman sources.

( 2014-02-04 17:31:34 +0300 )edit