title: Trouble connecting with Connman using dbus, but only the first time
body: <p>I've been trying to use various Python libraries for working with Connman and the dbus, particularly this sample code:</p>
  
  <p><a href="https://github.com/liamw9534/pyconnman/blob/master/demo/demo.py" rel="nofollow noreferrer">https://github.com/liamw9534/pyconnman/blob/master/demo/demo.py</a></p>
  
  <p>The problem I have is that when connecting to a WPA2 access point for the very first time, I will always receive a timeout message. For example:</p>
  
  <pre><code>CONN&gt; list-services
  CONN&gt; agent-start /test/agent ssid=myNetwork passphrase=myPassphrase
  CONN&gt; service-connect /net/connman/service/wifi_xxxxx__managed_psk
  </code></pre>
  
  <p>Eventually this is the message I receive back from the interface:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>I can confirm at this point that Connman has no connected to a wifi network or obtained an IP address. The only way I can manage to get this to work is by using the Connman application itself from a Linux terminal:</p>
  
  <pre><code>connmanctl
  connmanctl&gt; agent on
  connmanctl&gt; connect wifi_xxxxx__managed_psk
  Agent RequestInput wifi_xxxxx__managed_psk
      Passphrase = [ Type=psk, Requirement=mandatory ]
  Passphrase? myPassword
  connmanctl&gt; Connected wifi_xxxxx__managed_psk
  </code></pre>
  
  <p>This creates a settings folder under /var/lib/connman for the wifi network. I can now use the demo.py script mentioned above to either disconnect or reconnect.</p>
  
  <p>Connman is still a bit of a mystery to me in many ways, and I'm not sure why I have to use the interactive shell to connect to a network for the first time. Any ideas?</p>