RE: Problem activating hotspot




(Apologies for the top post... blame it on outlook)

I added lines starting with # to indicate which call failed, and which succeeded.

I'll try to get a code snippet.

signal time=1476802044.025068 sender=org.freedesktop.DBus -> destination=:1.224 serial=2 
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.224"
signal time=1476802044.025104 sender=org.freedesktop.DBus -> destination=:1.224 serial=4 
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.224"
method call time=1476802047.121780 sender=:1.225 -> destination=org.freedesktop.NetworkManager serial=5 
path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=GetAllDevices
# FIRST CALL (my app) - THIS FAILED
method call time=1476802047.132799 sender=:1.225 -> destination=org.freedesktop.NetworkManager serial=15 
path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; 
member=AddAndActivateConnection
   array [
      dict entry(
         string "802-11-wireless"
         array [
            dict entry(
               string "mac-address"
               variant                   array of bytes [
                     a0 21 b7 4a 9b 80
                  ]
            )
            dict entry(
               string "mode"
               variant                   string "adhoc"
            )
            dict entry(
               string "security"
               variant                   string "802-11-wireless-security"
            )
            dict entry(
               string "ssid"
               variant                   array of bytes "toaster"
            )
         ]
      )
      dict entry(
         string "802-11-wireless-security"
         array [
            dict entry(
               string "key-mgmt"
               variant                   string "none"
            )
            dict entry(
               string "wep-key-type"
               variant                   uint32 1
            )
            dict entry(
               string "wep-key0"
               variant                   string "87c77b7552"
            )
         ]
      )
      dict entry(
         string "connection"
         array [
            dict entry(
               string "autoconnect"
               variant                   boolean false
            )
            dict entry(
               string "id"
               variant                   string "Hotspot"
            )
            dict entry(
               string "type"
               variant                   string "802-11-wireless"
            )
         ]
      )
      dict entry(
         string "ipv4"
         array [
            dict entry(
               string "addresses"
               variant                   array [
                  ]
            )
            dict entry(
               string "dns"
               variant                   array [
                  ]
            )
            dict entry(
               string "method"
               variant                   string "shared"
            )
            dict entry(
               string "routes"
               variant                   array [
                  ]
            )
         ]
      )
   ]
   object path "/org/freedesktop/NetworkManager/Devices/0"
   object path "/"
method call time=1476802047.211788 sender=:1.226 -> destination=:1.207 serial=240 
path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=GetPermissions
method call time=1476802047.288394 sender=:1.227 -> destination=:1.207 serial=240 
path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=GetPermissions
method call time=1476802056.956319 sender=:1.228 -> destination=org.freedesktop.NetworkManager serial=322 
path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=GetPermissions
# SECOND CALL (gnome applet) - THIS WORKED
method call time=1476802062.780997 sender=:1.228 -> destination=org.freedesktop.NetworkManager serial=337 
path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; 
member=AddAndActivateConnection
   array [
      dict entry(
         string "802-11-wireless"
         array [
            dict entry(
               string "security"
               variant                   string "802-11-wireless-security"
            )
            dict entry(
               string "ssid"
               variant                   array of bytes "toaster"
            )
            dict entry(
               string "mode"
               variant                   string "adhoc"
            )
            dict entry(
               string "mac-address"
               variant                   array of bytes [
                     a0 21 b7 4a 9b 80
                  ]
            )
         ]
      )
      dict entry(
         string "connection"
         array [
            dict entry(
               string "id"
               variant                   string "Hotspot"
            )
            dict entry(
               string "autoconnect"
               variant                   boolean false
            )
            dict entry(
               string "type"
               variant                   string "802-11-wireless"
            )
         ]
      )
      dict entry(
         string "ipv4"
         array [
            dict entry(
               string "addresses"
               variant                   array [
                  ]
            )
            dict entry(
               string "dns"
               variant                   array [
                  ]
            )
            dict entry(
               string "method"
               variant                   string "shared"
            )
            dict entry(
               string "routes"
               variant                   array [
                  ]
            )
         ]
      )
      dict entry(
         string "802-11-wireless-security"
         array [
            dict entry(
               string "wep-key-type"
               variant                   uint32 1
            )
            dict entry(
               string "wep-key0"
               variant                   string "68a7ff97a0"
            )
            dict entry(
               string "key-mgmt"
               variant                   string "none"
            )
         ]
      )
   ]
   object path "/org/freedesktop/NetworkManager/Devices/0"
   object path "/"


STÉPHANE BOUCHER
Consultant software


D-BOX Technologies Inc. | A. 2172 de la Province, Longueuil, QC J4G 1R7 CANADA | T. 450-442-3003 | D. | W. 
d-box.com


AVIS : Ce courriel contient des renseignements confidentiels. Si vous n'êtes pas le véritable destinataire, 
la diffusion ou l'usage de ce courriel, des renseignements qu'il contient ou des documents qui lui sont 
joints pourrait être illégal. Il est donc strictement interdit de les diffuser ou de les utiliser. Si vous 
avez reçu ce courriel par erreur, nous vous saurions gré d’en aviser l'expéditeur immédiatement et de le 
supprimer sans le lire, l'imprimer, le sauvegarder ou le diffuser. Nous vous remercions de votre aimable 
collaboration.

NOTICE: This e-mail contains confidential information. If you are not the intended recipient, any disclosure 
or other use of this e-mail or the information contained herein or attached hereto may be unlawful and is 
strictly prohibited. If you have received this e-mail in error, please notify the sender immediately and 
delete this e-mail without reading, printing, copying or forwarding it to anyone. Thank you for your kind 
cooperation.
-----Message d'origine-----
De : Dan Williams [mailto:dcbw redhat com]
Envoyé : October 18, 2016 2:00 PM
À : Stéphane Boucher <sboucher d-box com>; networkmanager-list gnome org
Objet : Re: Problem activating hotspot

On Tue, 2016-10-18 at 15:26 +0000, Stéphane Boucher wrote:
I’m on Ubuntu 16.04.1.

I’m using QDBus to interact with NetworkManager.

At the time I do all of the following, there’s no existing
/org/freedesktop/NetworkManager/Settings/?? For the Hotspot.

When I call AddAndActivateConnection, I get the error: “A 'wireless'
setting is required if no AP path was given.”

This would indicate the partial connection dict you're sending to NetworkManager as part of the 
AddAndActivateConnection call doesn't have all the required properties.

What NM needs here is either the object path to an existing AP that it can pull the SSID and security 
settings from, or you need to specify those manually (which you must do here because you're doing a hotspot).
 Apparently it's not getting that from the D-Bus method call, or there's a bug in the code...

Can you share sanitized/condensed code that shows how you're calling AddAndActivate?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]