Re: [PATCH] Fix for Blueman modem being ignored



On Tue, 2012-10-23 at 13:24 +0200, Aleksander Morgado wrote:
> On 23/10/12 12:15, Nick Peskett wrote:
> > If this is the case could memcmp(ip_iface, "rfcomm", 6) also be added to
> > the condition? This might allow generic unclaimed bluetooth modems to
> > still work.
> 
> That memcmp() is quite equivalent to just comparing the driver with
> "bluetooth" as we did before.
> 
> 
> Dan:
> 
> What could happen if we end up allowing bluetooth-based modems not being
> grabbed by the NMDeviceBt and therefore created as plain NMDeviceModem
> objects? As far as I can see, the bluetooth DUN settings required for
> the modem to connect don't really have any bluetooth-specific stuff in
> there, not sure why plain gsm/cdma modem settings aren't enough.

We want the bluetooth information so we can actually show something
useful in various user interfaces, like the name of the device, and
possibly it's state at some point.  If we have the Bluetooth address,
then NM creates the rfcomm port automatically for you when you start the
DUN connection.  No need for something like Blueman to create it for
you, and this also lets NM monitor the rfcomm device for events like
bluetooth disconnections so we can provide better error handling, like
"Your Phone is too far away" instead of "PPP disconnected" like we'd get
if we only know about PPP failure on the rfcomm interface.

Second, just creating an NMModem means there's no API/UI linkage between
some device that NM knows about (your phone) and the thing that's being
used for networking, which isn't very helpful to the user.  Which is one
major reason why we require the Connection to be created (which
typically happens when pairing), which in turn creates the NMDeviceBt
what you see in the menu.  And since we know it's a Bluetooth device,
and we know its name, you see the name you gave the phone, instead of
"rfcomm0" which is completely unhelpful.

Basically, the reason Blueman got created was because at the time there
wasn't a great way to add/remove DUN connections via the GUI with the
standard NM tools.  The way that was done was via the GNOME Bluetooth
applet.  A year or so ago, the bluetooth applet got updated to show
these options all the time, instead of just when pairing.  That
basically replaces any additional functionality Blueman provided.

Dan



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