bluetooth modem DUN not available - NM 0.7.0.99

Bug #345060 reported by Michal Matyska
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm using Blueman 1.02 to connect GSM cell phone serial port over RFCOMM. With network-manager 0.7.0 the phone was recognized and I was able to initiate the GSM mobile broadband connection. Current network-manager 0.7.0.99 can't do that and I have to estabilish the connection from the command line. It works, but as more packages depend on the network-manager "connected status", it seems that there is no connection at all. I can force to go online e.g. in Firefox, but not e.g. in Pidgin.

I did some debugging and the only clue was, that network-manager (ran in no-daemon mode) shows following message:
NetworkManager: <WARN> modem_device_creator(): could not determine sysfs path for '/dev/rfcomm0'

The modem was added by blueman and HAL shows this info:
udi = '/org/freedesktop/Hal/devices/rfcomm0'
  access_control.file = '/dev/rfcomm0' (string)
  access_control.type = 'modem' (string)
  info.bluetooth_address = '00:12:12:12:12:12' (string)
  info.callouts.add = {'hal-acl-tool --add-device'} (string list)
  info.callouts.remove = {'hal-acl-tool --remove-device'} (string list)
  info.capabilities = {'serial', 'modem', 'access_control'} (string list)
  info.category = 'serial' (string)
  info.parent = '/org/freedesktop/Hal/devices/bt_rfcomm_layer' (string)
  info.product = 'DUN (00:12:12:12:12:12)' (string)
  info.udi = '/org/freedesktop/Hal/devices/rfcomm0' (string)
  info.vendor = 'Bluetooth' (string)
  linux.device_file = '/dev/rfcomm0' (string)
  modem.command_sets = {'GSM-07.07', 'GSM-07.05'} (string list)
  serial.device = '/dev/rfcomm0' (string)
  serial.originating_device = '/org/freedesktop/Hal/devices/rfcomm0' (string)
  serial.port = 0 (0x0) (int)
  serial.type = 'unknown' (string)

I've found that there is code recently added in the network-manager's hal manager, which shows this WARN and rejects the serial device, even though there is another code few lines later, which tries to determine the modem type (GSM/CDMA) from the HAL info (deprecated).

I've created patch (attached) which changes the check and tries to use the HAL info to detect the modem type like it was in NM-0.7.0. Now the modem is detected and I can connect.

I saw the comment, that HAL info modem type detection is deprecated, but shouldn't we get some grace period before Blueman/udev/??? is updated to the new sysfs way of properties exhibition?

Description: Ubuntu jaunty (development branch)
Release: 9.04
updated today

network-manager: 0.7.1~rc3-0ubuntu2
blueman: 1.02-1~ppa2j (from blueman team launchpad PPA)

Revision history for this message
Michal Matyska (michal-matyska) wrote :
Revision history for this message
jac0b (jacbrooks) wrote :

Can you create a package with this patch?

Revision history for this message
Michal Matyska (michal-matyska) wrote :

Yes I did. Just added the patch into the series of patches and rebuilt. I'm using it on my laptop - now there is new NM version in the repository, I'd have to check if the patch works with that version. Unfortunatelly I'm not familiar with the PPA building stuff, so I can't promise that I'll publish it there, but I'll give it a try.

Revision history for this message
Valmantas Palikša (walmis) wrote :

This bug is fixed in blueman svn. Basically linux.sysfs_path = /sys/class/tty/rfcomm* needs to be exported too.

Revision history for this message
jac0b (jacbrooks) wrote :

I tried the svn of blueman but it didn't work for me. It did work when I used network-manager 0.7 with blueman. Blueman sees my phone and makes the connection its network-manager that doesn't see it.

Revision history for this message
Valmantas Palikša (walmis) wrote :

Mar 24 10:56:00 walmis-laptop NetworkManager: <info> (rfcomm0): found serial port (udev: hal:GSM)
Mar 24 10:56:00 walmis-laptop NetworkManager: <info> (rfcomm0): ignoring due to lack of probed mobile broadband capabilties

Just great... well, now nm definitely needs a patch.

Revision history for this message
Michal Matyska (michal-matyska) wrote :

jac0b: I'm sorry I missed, that there is system reboot needed after netowrk-manager update (certailnly affected by bug #332945)... so it was working with my patched nm package. After your comment I get the same NM info in the log.

Anyway, I workarounded that by adding udev rule like this:
$cat /etc/udev/rules.d/33-rfcomm-nm.rules
ACTION=="move", DEVPATH=="*/rfcomm*", ENV{ID_NM_MODEM_GSM}="1"

It might be challenging to get rock solid rule, which will use the already selected in Blueman correct modem type (GSM/CDMA) and based on that set the appropriate udev ID_NM_..... The DEVPATH/address file could be inspected to get the MAC of the device and then check which type it should be set reading Blueman Config. It shouldn't be much complicated Valmantas, should it? Unfortunatelly I'm not familiar with Python to prepare this patch...

The other way might be to patch the network manager itself to rely on the hal modem properties, when the udev ones are not set at all and if the modem is connected via rfcomm....

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.