Re: GSM modem via Bluetooth?



On Wed, Nov 24, 2010 at 6:55 AM, Dan Williams <dcbw redhat com> wrote:
> On Sat, 2010-11-20 at 23:28 +0300, Andrey Borzenkov wrote:
>> On Sat, Nov 20, 2010 at 1:24 AM, Dan Williams <dcbw redhat com> wrote:
>> > On Thu, 2010-11-04 at 15:33 +0300, Andrey Borzenkov wrote:
>> >> I have Nokia E51 and am using KDE with bluedevil; Modemmanager 0.4 and
>> >> NM 0.8.2-rc1. I can browse phone and transfer files, but modemmanager
>> >> does not display any available device when BT is activated. Is it
>> >> supposed to work at all and if yes, what is requires to get it
>> >> working? Pointers to documentation is appreciated. Thank you!
>> >
>> > Getting this working first requires adding a "connection" for the
>> > device, since we can't scan for it.  Once the connection is added and
>> > known to NM, it'll show up in the menu and you can choose it.  While it
>> > doesn't help you immediately with bluedevil, this is how we did the
>> > gnome side of things:
>> >
>> > http://blogs.gnome.org/dcbw/2009/07/10/unwire-with-networkmanager/
>> >
>>
>> Yes, I know this but it does not really help to make it running using
>> "Bordmittel".
>>
>> OK, I have phone that exports DUN:
>>
>> {pts/1}% sdptool search DUN
>> Inquiring ...
>> Searching for DUN on 00:24:03:BE:1A:29 ...
>> Service Name: Dial-Up Networking
>> Service RecHandle: 0x100c5
>> Service Class ID List:
>>   "Dialup Networking" (0x1103)
>> Protocol Descriptor List:
>>   "L2CAP" (0x0100)
>>   "RFCOMM" (0x0003)
>>     Channel: 4
>> Language Base Attr List:
>>   code_ISO639: 0x454e
>>   encoding:    0x6a
>>   base_offset: 0x100
>> Profile Descriptor List:
>>   "Dialup Networking" (0x1103)
>>     Version: 0x0100
>>
>> As I understand, I need serial port that is used by ModemManager. I
>> now create serial port for the phone:
>>
>> {pts/0}% sudo rfcomm bind 00:24:03:BE:1A:29 4
>> {pts/0}% ll /dev/rfcomm0
>> crw-rw---- 1 root dialout 216, 0 Ноя 20 23:22 /dev/rfcomm0
>>
>> But this port is ignored by ModemManager:
>>
>> {pts/0}% dbus-send --print-reply --system
>> --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager
>> org.freedesktop.ModemManager.EnumerateDevices
>> method return sender=:1.10 -> dest=:1.315 reply_serial=2
>>    array [
>>    ]
>>
>> So what is missing in this case? Thank you!
>
> You don't actually need to create the rfcomm port yourself.  NM will
> create that on-the-fly when starting up DUN for the device.  Since we
> cannot scan for devices with Bluetooth (takes way too long and
> interrupts existing connections) NM requires that a 'connection' already
> be defined for a phone before you can use it; that connection stores
> various config we want to know before connecting (like the BT address!).
>

Yes, that was the missing bit; it is not documented anywhere clear
that such connection is required.

> Here's how it works for GNOME desktops:
>

And for those who do not use Gnome?

Anyway, I had to use "rfcomm connect", not "rfcomm bind"; rfcomm
connect creates BT connection to phone that is happily recognized by
MM now and exported for NM use. But now NM was ignoring it :)

For testing I commented out the bits
        /* If it was a Bluetooth modem and no bluetooth device claimed
it, ignore
         * it.  The rfcomm port (and thus the modem) gets created automatically
         * by the Bluetooth code during the connection process.
         */

        if (driver && !strcmp (driver, "bluetooth")) {
                nm_log_info (LOGD_MB, "ignoring modem '%s' (no
associated Bluetooth device)", ip_iface);
                return;
        }

and was able to finally connect without any obvious problems.

What is the reason for this "ignorance" :) ? If I understand
correctly, we are ignoring rfcomm because we are going to create it
ourselves. But by this logic if there is no pre-existing connection,
we will *not* create any rcomm in the first place. And if any
connection was defined for it, it would have claimed device before and
we would not reach this place at all. So if we are here, we see serial
connection to BT modem ready for us; why not let user to just use it?


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