Bug 285637 - Can't tethering to iPhone 3GS using PAN
Summary: Can't tethering to iPhone 3GS using PAN
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: bluetooth-daemon (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 11:37 UTC by Richard Jennings
Modified: 2013-03-06 09:46 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
debug output (45.66 KB, application/octet-stream)
2011-11-12 13:05 UTC, Richard Jennings
Details
Fix Bluetooth PAN creation (5.99 KB, patch)
2011-11-13 15:03 UTC, Rajeesh K V
Details
Fix Bluetooth PAN creation v2 (5.79 KB, patch)
2011-11-13 17:58 UTC, Rajeesh K V
Details
Fix Bluetooth APN connection creation (2.83 KB, patch)
2011-11-13 19:25 UTC, Lamarque V. Souza
Details
Fix Bluetooth APN connection creation v2 (2.80 KB, patch)
2011-11-14 00:59 UTC, Lamarque V. Souza
Details
Fix Bluetooth PAN creation v3 (5.79 KB, patch)
2011-11-15 05:07 UTC, Rajeesh K V
Details
Fix Bluetooth PAN creation v4 (7.75 KB, patch)
2011-11-19 19:15 UTC, Rajeesh K V
Details
iPhone NAP tethering with BlueDevil (2.42 KB, patch)
2012-05-01 17:29 UTC, Rajeesh K V
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Jennings 2011-11-03 11:37:18 UTC
Version:           unspecified (using KDE 4.7.2) 
OS:                Linux

I can pair my iPhone with Bluedevil
I can connect with Bluedevil
With the system try pop-up, I see my iPhone listed but if I mouse-over, the greyed out message 'No supported services found' appears. Hence I can't use the PAN service or any other service.
My Windows laptop appears in the pop-up list and various services are available.
My openSUSE laptop also appears, with 'Send files' service available.

Reproducible: Always

Steps to Reproduce:
Just try to tether.
Using sdptool browse <my iPhone addr>, provides a full list of services, first of which is NAP. Results in 'Actual Results'.
If I use hciconfig, hcitool, l2ping etc, I get all the expected results which seems to indicate that the Bluetooth stack is working correctly.

Actual Results:  
Service Name: PAN Network Access Profile
Service Description: Network Access Point
Service RecHandle: 0x4f491116
Service Class ID List:
  "Network Access Point" (0x1116)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 15
  "BNEP" (0x000f)
    Version: 0x0100
    SEQ8: 0 6 0 dd
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Network Access Point" (0x1116)
    Version: 0x0100

Service Name: Wireless iAP
Service RecHandle: 0x4f499620
Service Class ID List:
  UUID 128: 00000000-deca-fade-deca-deafdecacafe
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Serial Port" (0x1101)
    Version: 0x0100

Service Name: AVRCP Device
Service Description: Remote Control Device
Service RecHandle: 0x4f49110c
Service Class ID List:
  "AV Remote Target" (0x110c)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 23
  "AVCTP" (0x0017)
    uint16: 0x102
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "AV Remote" (0x110e)
    Version: 0x0100

Service Name: Audio Source
Service RecHandle: 0x4f49110a
Service Class ID List:
  "Audio Source" (0x110a)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 25
  "AVDTP" (0x0019)
    uint16: 0x102
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Advanced Audio" (0x110d)
    Version: 0x0102

Service Name: Phonebook
Service RecHandle: 0x4f49112f
Service Class ID List:
  "Phonebook Access - PSE" (0x112f)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 13
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Phonebook Access" (0x1130)
    Version: 0x0100

Service Name: IrMC Sync
Service RecHandle: 0x4f491104
Service Class ID List:
  "IrMC Sync" (0x1104)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "IrMC Sync" (0x1104)
    Version: 0x0100

Service Name: Handsfree Gateway
Service RecHandle: 0x4f49111f
Service Class ID List:
  "Handsfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 8
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0105

Service Description: PnP Information
Service RecHandle: 0x4f491200
Service Class ID List:
  "PnP Information" (0x1200)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130

Expected Results:  
From what I have read of other accounts of tethering from Google searches, I would expect to see a service named 'Network Access Point' or some such when I mouse-over the iPhoe service list.  When I select this, I would expect to see a wired interface being created and appearing in NetworkManager as bnep0. Connecting to this should give me internet access.
But this is only a guess because I can't find any documentation which indicates what should happen, nor can I find an account of a successful iPhone tether.
This lack of information is very frustrating.

Tried on a Kubuntu netbook and OpenSUSE laptop, details as follows:
Netbook:
HP Mini 110-1120
KDE Version 4.7.2
Bluedevil version 1.2.1-Oubuntu1
Network-manager version 0.9.1.90-Oubuntu4
Laptop:
KDE version 4.6.0
Bluedevil version 1.0.2
Nwtwork-manager version 0.8.2-15.24.1

I succeeded to get my iPhone to tether to Ubuntu 10.04 by 'hand wiring'. This blocked my wifi connection.  I upgraded to KDE because it suites my work style better but I need BT to work because I do a lot of work 'on the move'.
There must be a lot of people who want to tether via iPhone.
Comment 1 Lamarque V. Souza 2011-11-03 15:48:50 UTC
You are using Bluedevil 1.0.2, which does not support tethering. You need to upgrade to Bluedevil 1.2.

Also, you are using NetworkManager 0.8. Plasma NM for NM 0.8 is unmaintained, which means nobody is fixing bugs in it, so you should upgrade to NetworkManager 0.9 and the proper Plasma NM for that NM version.
Comment 2 Richard Jennings 2011-11-03 22:18:54 UTC
If you look at the para following 'expected results', you will note that first I cited an HP netbook, which is running the latest version of Bluedevil and the latest version of NetworkManager.  The second entry, to which you refer, serves as a comparison with the earlier versions showing that there is no material improvement where this bug is concerned. I'm sorry that I did not clearly indicate that. Hence, I guess my report is still valid.
Comment 3 Lamarque V. Souza 2011-11-03 22:27:11 UTC
(In reply to comment #2)
> If you look at the para following 'expected results', you will note that first
> I cited an HP netbook, which is running the latest version of Bluedevil and the
> latest version of NetworkManager.  The second entry, to which you refer, serves
> as a comparison with the earlier versions showing that there is no material
> improvement where this bug is concerned. I'm sorry that I did not clearly
> indicate that. Hence, I guess my report is still valid.

Post the version numbers of Bluedevil, NetworkManager and Plasma NM you are using. That information is very important and so far you have not informed what they are. "latest Bluedevil" is not that informative, we need the exact number.
Comment 4 Richard Jennings 2011-11-03 23:21:20 UTC
My post stated:
KDE Version 4.7.2
Bluedevil version 1.2.1-Oubuntu1
Network-manager version 0.9.1.90-Oubuntu4

The plasma NM is:
plasma-widget-networkmanagement version 0.9~svngit.nm09.20110610.0c83d8-0ubuntu5

The content of your last comment is largely incorrect and your tone is aggressive. Please treat me with the same courtesy that I have treated you. That I have not provided all the information you need is hardly surprising, I am not an expert in this area.
Comment 5 Lamarque V. Souza 2011-11-03 23:53:00 UTC
You are using a very old Plasma NM version, you should upgrade. Anyway, bluetooth tethering is supposed to work even with that old version.

I think you are trying to enable PAN after you have paired your phone, that does not work, you have to select between DUN or PAN in the last step of the paring process. If your phone is already paired you have to pair it again.
Comment 6 Richard Jennings 2011-11-04 10:16:54 UTC
OK, so I have replaced the old plasma widget with version: 0.9~svngit.nm09.20111023.ff843e-0ubuntu1.  This is the latest available from Ubuntu.

'Enable KDE Bluetooth Integration' is checked.
I deleted my iPhone from the list of known Bluetooth devices.

1. Searched for Bluetooth devices.
2. Selected my iPhone from list of devices found, clicked 'Next'.
3. Received pairing code on phone and accepted it.
4. Clicked 'Matches' on Bluetooth Device Wizard.
5. Wizard closes without offering me any choice, neither PAN nor DUN.

Left with 'Configure the known Bluetooth remote devices' window, which lists my phone.

If I mouse-over the phone listed under 'Known Devices' in the NM widget, it still says 'No supported services found'. This seems consistent with step 5 above since if it finds no services it can't offer me anything.

It seems to me that after the actual pairing is achieved, code probably is doing an 'sdptool browse'-like action on my phone to fetch the services supported and the result is coming back as failed or null. Hence, no service, no PAN, no DUN.

If there is anything else you want me to try, just let me know.
Comment 7 Richard Jennings 2011-11-04 10:29:44 UTC
I have just noticed something else:
In the list of nearby Bluetooth devices, I can see services offered by my OpenSUSE Linux laptop and my Windows laptop. However, I get the same 'No supported services found' message for my Mac. Could this be an Apple related protocol problem?
Comment 8 Alex Fiestas 2011-11-04 14:37:09 UTC
If sdptool browse is not showing anything, then we can assume that the problem is somewhere below in the stack, BlueZ -- Drivers.

Can  you check if you can see the IPhone services from OSX ?

Thanks.
Comment 9 Richard Jennings 2011-11-06 15:24:39 UTC
I'm sorry, perhaps we have an English problem.

In my comment #6, I made the assumption that after my phone pairs with my netbook, your Bluedevil code then tries to execute a query on my phone to determine the services offered by the phone. I called this an "'sdptool browse'-like action", but this seems to have caused a misunderstanding.

I have found no reason to believe there is a problem with the Bluetooth stack.

In my tests, the 'sdptool browse <my iPhone addr>' command, executed from the command line, functions and returns all the services offered by my iPhone.

Following your request "Can  you check if you can see the IPhone services from OSX ?", I tried pairing with my Mac. This worked successfully and I was able to provide Internet access to my Mac via my iPhone using PAN.

Following up on my observation in comment #7, I upgraded my iPhone software to the latest version 5.0, hoping that this later version would correct any protocol problems.

Now I cannot connect either to my Mac or to my Netbook. In both cases I can pair correctly but when I try to connect, my iPhone reports '"devnotebook-0" is not supported' or '"Mac" is not supported'. I now believe that the problem is in the iPhone code and not the Bluedevil code.  Maybe Apple wants to bar this functionality on non-Apple products?

I will try to resolve the iPhone/Mac connection problem and then come back to you if there is still a problem with Bluedevil.

I am sorry this post is so long, but I am trying to be precise and complete.
Comment 10 Richard Jennings 2011-11-06 17:12:00 UTC
That was faster than expected.  I have discovered that with the new software version, the connection Mac/iPhone has to be initiated from the Mac, it can't be initiated from the iPhone.  Working this way round, tethering my Mac to my iPhone works.

This means that we are back to understanding what happens exactly when pairing occurs between the iPhone and the Bluedevil code. After pairing, I am guessing that your code interrogates the device (my iPhone) to find what services are offered. If it sees a NAP service offered, it should then ask the user if this should be enabled. Again, I am guessing that your code is not getting an expected response and is concluding that there are 'No supported services'.

Could it be that the iPhone service classes are non-standard? These are in hex and I can't find an information source which tells me what they mean, so I can't check them.

I hope this helps.
Comment 11 Lamarque V. Souza 2011-11-06 18:41:14 UTC
(In reply to comment #10)
> That was faster than expected.  I have discovered that with the new software
> version, the connection Mac/iPhone has to be initiated from the Mac, it can't
> be initiated from the iPhone.  Working this way round, tethering my Mac to my
> iPhone works.

Bluedevil / Plasma NM do not expect the phone to start the connection either. During pairing if Bluedevil detects the PAN/NAP service record it creates a connection in Plasma NM's for that service. Then you use Plasma NM to start the connection.
 
> This means that we are back to understanding what happens exactly when pairing
> occurs between the iPhone and the Bluedevil code. After pairing, I am guessing
> that your code interrogates the device (my iPhone) to find what services are
> offered. If it sees a NAP service offered, it should then ask the user if this
> should be enabled. Again, I am guessing that your code is not getting an
> expected response and is concluding that there are 'No supported services'.

Yes, that is how Bluedevil works. If 'sdptool browse <your iPhone addr>' works then Bluedevil should also be able to retrieve the PAN/NAP service record.
 
> Could it be that the iPhone service classes are non-standard? These are in hex
> and I can't find an information source which tells me what they mean, so I
> can't check them.

I do not think so. Please attach the output of 'sdp browse <your iPhone addr>'.
Comment 12 Richard Jennings 2011-11-06 19:54:29 UTC
> I do not think so. Please attach the output of 'sdp browse <your iPhone addr>'.


Service Name: PAN Network Access Profile
Service Description: Network Access Point
Service RecHandle: 0x4f491116
Service Class ID List:
  "Network Access Point" (0x1116)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 15
  "BNEP" (0x000f)
    Version: 0x0100
    SEQ8: 0 6 0 dd
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Network Access Point" (0x1116)
    Version: 0x0100

Service Name: Wireless iAP
Service RecHandle: 0x4f499428
Service Class ID List:
  UUID 128: 00000000-deca-fade-deca-deafdecacafe
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Serial Port" (0x1101)
    Version: 0x0100

Service Name: AVRCP Device
Service Description: Remote Control Device
Service RecHandle: 0x4f49110e
Service Class ID List:
  "AV Remote" (0x110e)
  "Video Conferencing" (0x110f)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 23
  "AVCTP" (0x0017)
    uint16: 0x103
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "AV Remote" (0x110e)
    Version: 0x0104

Service Name: AVRCP Device
Service Description: Remote Control Device
Service RecHandle: 0x4f49110c
Service Class ID List:
  "AV Remote Target" (0x110c)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 23
  "AVCTP" (0x0017)
    uint16: 0x103
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "AV Remote" (0x110e)
    Version: 0x0104

Service Name: Audio Source
Service RecHandle: 0x4f49110a
Service Class ID List:
  "Audio Source" (0x110a)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 25
  "AVDTP" (0x0019)
    uint16: 0x102
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Advanced Audio" (0x110d)
    Version: 0x0102

Service Name: Phonebook
Service RecHandle: 0x4f49112f
Service Class ID List:
  "Phonebook Access - PSE" (0x112f)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 13
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Phonebook Access" (0x1130)
    Version: 0x0100

Service Name: Handsfree Gateway
Service RecHandle: 0x4f49111f
Service Class ID List:
  "Handsfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 8
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0106

Service Description: PnP Information
Service RecHandle: 0x4f491200
Service Class ID List:
  "PnP Information" (0x1200)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  code_ISO639: 0x6672
  encoding:    0x6a
  base_offset: 0x110
  code_ISO639: 0x6465
  encoding:    0x6a
  base_offset: 0x120
  code_ISO639: 0x6a61
  encoding:    0x6a
  base_offset: 0x130

This is not exactly the same as the output I posted first but the NAP is unchanged.

If there is anything else you want me to try, just let me know.
Comment 13 Lamarque V. Souza 2011-11-06 20:14:02 UTC
(In reply to comment #12)
> This is not exactly the same as the output I posted first but the NAP is
> unchanged.

I know, that is why I asked to send it again.
 
> If there is anything else you want me to try, just let me know.

Strange, I added a comment explaining what I thougth is the cause of this problem but it is not listed here. Anyway, I was right in my comment: Bluedevil is search for the PANU service not NAP service (00001116-0000-1000-8000-00805F9B34FB), which is the one iPhone uses.

Alex, you need to fix that in Bluedevil. networkmanagement_configshell already searches for the NAP service, which is the one that worked when Rajeesh implemented tethering for his iPhone 3GS.
Comment 14 Lamarque V. Souza 2011-11-06 20:15:53 UTC
Until Bluedevil is fixed you can use networkmanagement_configshell directly to create the tether connection in Plasma NM. Just follow the instructions in my blog:

http://lamarque-lvs.blogspot.com/2011/04/plasma-nm-bluetooth-tethering.html
Comment 15 Alex Fiestas 2011-11-07 00:37:04 UTC
At the moment I'm going to add the uuid to the current panu and later add a separate plugin.
Comment 16 Richard Jennings 2011-11-07 20:30:04 UTC
OK Lamarque, so I tried your suggestion in comment #14:
>Until Bluedevil is fixed you can use networkmanagement_configshell directly to
>create the tether connection in Plasma NM. Just follow the instructions in my
>blog:

>richard@devnotebook:~$ $(kde4-config --path exe --locate >networkmanagement_configshell) create --type bluetooth --specific-args >"<my >iPhone addr> nap"

When I did it, I got the Mobile Connection Wizard window as you said.
However, after completing the wizard and clicking OK, I get

richard@devnotebook:~$ Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

Sometimes I get:

richard@devnotebook:~$ Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x5a00012

but there seems to be no connection between this and what parameters I enter in the wizard.

It hangs there until I do a return.
There is no connection in Plasma NM.

please tell me what should I do now?
Comment 17 Lamarque V. Souza 2011-11-07 20:46:21 UTC
(In reply to comment #16)
> When I did it, I got the Mobile Connection Wizard window as you said.
> However, after completing the wizard and clicking OK, I get
> 
> richard@devnotebook:~$ Connecting to deprecated signal
> QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

This is just a warning and does not affect the final result.
 
> Sometimes I get:
> 
> richard@devnotebook:~$ Connecting to deprecated signal
> QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
> X Error: BadWindow (invalid Window parameter) 3
>   Major opcode: 20 (X_GetProperty)
>   Resource id:  0x5a00012

Same here.
 
> but there seems to be no connection between this and what parameters I enter in
> the wizard.
> 
> It hangs there until I do a return.

networkmanagement_configshell just launches the wizard and save the connection when you click on the Finish button. It forks itself in background so clicking on the return button has no practical effect here.

> There is no connection in Plasma NM.
> 
> please tell me what should I do now?

Have you reached the last wizard page and clicked on the Finish button? The connection will be save only when you click on the Finish button.
Comment 18 Richard Jennings 2011-11-07 21:42:08 UTC
My wizard has just 2 tabs, 'Bluetooth' and 'IPv4 Address'. both have an 'OK' button.  It makes no difference which I click.
Comment 19 Lamarque V. Souza 2011-11-07 22:41:49 UTC
That is not the wizard. This is the wizard:

http://lamarque-lvs.blogspot.com/2010/09/plasma-nm-mobile-connection-wizard.html

the tabs are the edit dialog, which the wizard shows after you click on the Finish button. Usually you do not need to change anything in the edit dialog, just click on the Ok button and the connection should have been added to Plasma NM. Then you just need to click on the plasmoid systray icon and then on the newly created connection.

Can you create a screencast using recordmydesktop program and send me?
Comment 20 Richard Jennings 2011-11-09 20:58:11 UTC
OK, I've sent the screencast to you. I have not included it here, I don't want my phone address to be published on the web.

Hope this is ok.

I'm ready for the next step.
Comment 21 Lamarque V. Souza 2011-11-09 22:23:59 UTC
Can you add it to youtube? If it is less than 10 MB you can send it to lamarque@gmail.com.
Comment 22 Lamarque V. Souza 2011-11-10 05:39:46 UTC
The wizard is not appearing probably because you do not have the package mobile-broadband-provider-info installed. Probably the missing data from mobile-broadband-provider-info is preventing the connection from being added.
Comment 23 Lamarque V. Souza 2011-11-10 05:54:08 UTC
Hmmm I am looking at the source code here and now I remember that for NAP there is not wizard. For some reason it is not saving the connection, please enable Plasma NM debug using kdebugdialog (just launch kdebugdialog, search for the string network and check all check boxes that appear), reproduce the problem and send me your ~/.xsession-errors? .
Comment 24 Richard Jennings 2011-11-12 13:05:55 UTC
Created attachment 65552 [details]
debug  output

As requested in comment #23
Comment 25 Richard Jennings 2011-11-12 13:09:54 UTC
That's interesting, using the 'attachment' dialogue deletes any associated comments made in this field.

Comment #24 should have included:

Sorry for the delay, busy week.

~/.xsession-erros attached.

HTH.

Ready for the next step.
Comment 26 Rajeesh K V 2011-11-12 15:00:09 UTC
(In reply to comment #23)
I've built the latest nm09 branch and debugged, but couldn't find anything wrong. Looks all the parameters are passed correctly to NMDBusSettingsConnectionProvider::addConnection(), but the connection doesn't appear to be created/saved. Nothing interesting was found in .xsession-errors; and "dbus-monitor --system" didn't show as if NM receives any communication for adding connection.
Comment 27 Lamarque V. Souza 2011-11-12 15:42:42 UTC
My guest is that one of the NM's tests is blocking the adding action. It should be a error message in NM's log about that. Can you test it for me?

With DUN devices it works for me, but I do not have a NAP enabled device to test it here.
Comment 28 Rajeesh K V 2011-11-12 16:10:33 UTC
Hm, I should have looked at `dmesg` too. Here's the output of 'tail -f /var/log/messages' while running networkmanagement_configshell (with bluetooth address masked):

Nov 12 21:37:04 phoenix NetworkManager[878]: <warn> (11:22:33:44:55:66): failed to look up interface index
Nov 12 21:37:04 phoenix NetworkManager[878]: <info> BT device Rajeesh's iPhone  (F8:1E:DF:6D:8E:C1) added (NAP)
Nov 12 21:37:04 phoenix NetworkManager[878]: <info> (11:22:33:44:55:66): new Bluetooth device (driver: 'bluez' ifindex: -1)
Nov 12 21:37:04 phoenix NetworkManager[878]: <info> (11:22:33:44:55:66): exported as /org/freedesktop/NetworkManager/Devices/5
Nov 12 21:37:04 phoenix NetworkManager[878]: <info> (11:22:33:44:55:66): now managed
Nov 12 21:37:04 phoenix NetworkManager[878]: <info> (11:22:33:44:55:66): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Nov 12 21:37:04 phoenix NetworkManager[878]: <info> (11:22:33:44:55:66): deactivating device (reason 'managed') [2]
Nov 12 21:37:04 phoenix NetworkManager[878]: nm_system_iface_flush_routes: assertion `ifindex > 0' failed
Nov 12 21:37:04 phoenix NetworkManager[878]: nm_system_iface_flush_addresses: assertion `ifindex > 0' failed
Nov 12 21:37:04 phoenix NetworkManager[878]: <info> (11:22:33:44:55:66): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Comment 29 Lamarque V. Souza 2011-11-12 16:58:11 UTC
Hey Rajeesh, did you edit that log? 11:22:33:44:55:66 is not your phone's bluetooth address. The correct address appears in the second line but in all other places it is wrong.

This can be a problem in NM itself, which NM versions do you use?

qdbus --system org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.Version
Comment 30 Rajeesh K V 2011-11-12 17:03:55 UTC
(In reply to comment #29)
> Hey Rajeesh, did you edit that log? 11:22:33:44:55:66 is not your phone's
> bluetooth address. The correct address appears in the second line but in all
> other places it is wrong.

Yeah, I edited it (and terribly failed at it, stupid me).

> 
> This can be a problem in NM itself, which NM versions do you use?
> 
> qdbus --system org.freedesktop.NetworkManager /org/freedesktop/NetworkManager
> org.freedesktop.NetworkManager.Version

NM version: 0.9.1.90

But, when I'm trying to add the connection again, nothing is logged in dmesg :-/
Comment 31 Lamarque V. Souza 2011-11-12 17:27:44 UTC
Well, so this is very strange because NM added the phone as a bluetooth device and as far as I know NM only adds a bluetooth device if there is at least one bluetooth connection.

Can you check if the is such a bluetooth connection in /etc/NetworkManager/system-connection?
Comment 32 Rajeesh K V 2011-11-13 15:03:55 UTC
Created attachment 65589 [details]
Fix Bluetooth PAN creation

I've found the issue. The NetworkManager logs mentioned in comment #28 was from a build I patched, and NM logs nothing without that patch - in short, connection was not being added. Rest of the debugging I did was on a build without it, hence no debug messages :-/

Issue was that GsmSetting, PppSetting and SerialSetting were added for all Knm::Connection::Bluetooth type connections and NetworkManager silently fails if those settings are passed for PANU connection. The attached ugly patch fixes it for me here, hopefully without introducing regression in DUN case.
Comment 33 Rajeesh K V 2011-11-13 17:58:40 UTC
Created attachment 65618 [details]
Fix Bluetooth PAN creation v2

After having a short discussion with Lamarque, here's a slightly modified patch which uses NMBluetoothCapabilities enum as additional flag (didn't want to add another enum just for it ;-))

Richard, could you try this patch and see if it helps?
Comment 34 Richard Jennings 2011-11-13 19:01:56 UTC
Rajeesh, I would love to try this patch but that may be beyond my capabilities without some hand-holding. If you tell me what to do, I'll do my best. I'm a Python programmer, I know 'make' etc and I can figure out 'patch'. I don't know where the NM files are. Sorry, not the best support you could hope for.
Comment 35 Lamarque V. Souza 2011-11-13 19:25:09 UTC
Created attachment 65620 [details]
Fix Bluetooth APN connection creation

Rajeesh and Richard, can you test the attached patch?

Rajeesh's patch causes a crash when editing a Bluetooth DUN connection because when Plasma NM reads the connection list from NM's DBus interface it sets Bluetooth DUN connections with NM_BT_CAPABILITY_NONE.

My patch always add the Gsm, Ppp and Serial settings and removes then only when editing or creating a PAN connection, that should keep things working while fixing this bug.
Comment 36 Lamarque V. Souza 2011-11-14 00:59:13 UTC
Created attachment 65633 [details]
Fix Bluetooth APN connection creation v2

There is an error in the first patch. This is just should.
Comment 37 Richard Jennings 2011-11-14 18:13:43 UTC
I'm ready to do this, just give me some clues (comment #34)
Comment 38 Lamarque V. Souza 2011-11-14 18:29:01 UTC
1. git clone git://anongit.kde.org/networkmanagement
2. cd networkmanagement; checkout nm09
3. patch -p1 < fix_bluetooth_pan_creation_v2.patch
3. mkdir networkmanagement_build
4. cd networkmanagement_build
5. cmake -DCMAKE_INSTALL_PREFIX=/usr ..
6. make; make install
Comment 39 Richard Jennings 2011-11-14 21:58:10 UTC
Great clues!
Sorry for the delay, took a little time to set up the development environment.
During cmake I had some problems with Openconnect in that my version is 3.02 and it should be 3.03, so I don't have the OpenConnect plug-in. Otherwise all seemed to go well.

During make I got some warnings, but no errors.

Had to re-pair my phone, but I am writing to you over my iPhone Personal Hotspot.

Is there any other testing I can do?

If not, thanks for your great support. When this is tidied up and released, Network Manager will be a really impressive all-round tool.

Thanks again. If I knew how, I'd stand you that case of beer!
Comment 40 Richard Jennings 2011-11-14 22:09:50 UTC
When I tore down the mobile connection, I noticed that I can't stop the bluetooth connection.  I'm going to continue with some testing tomorrow and let you know the results.
Comment 41 Lamarque V. Souza 2011-11-14 22:17:17 UTC
Great, good to know it worked :-)

For more testing try editing the connection, for example change it to system
connection and back to user connection. Try deleting the connection too, just
to check if there is any dangling pointer floating around.

What do you mean by "can't stop the bluetooth connection"? Does not the disconnect button work?
Comment 42 Lamarque V. Souza 2011-11-15 00:28:59 UTC
Git commit 8111226467b08fb1d5426aad177a7138b81f20fb by Lamarque V. Souza.
Committed on 15/11/2011 at 00:07.
Pushed by lvsouza into branch 'master'.

Fix creation of Bluetooth PAN connections.

NM refuses to add Bluetooth PAN connections if they include settings for
Gsm, Ppp and Serial configurations. On the other hand those settings are
required by Bluetooth DUN connections. Because of the way our internal
libraries are coded it is not that trivial to check the correct type
(DUN / PAN) before creating a connection, so I am removing the unneeded
settings when creating / editing a connection.

BUG: 285637

M  +13   -0    libs/internals/connection.cpp
M  +5    -1    libs/internals/connection.h
M  +10   -0    libs/ui/bluetoothconnectioneditor.cpp

http://commits.kde.org/networkmanagement/8111226467b08fb1d5426aad177a7138b81f20fb
Comment 43 Lamarque V. Souza 2011-11-15 00:34:52 UTC
Git commit bcd8ebe500909f50e116f63f146488a03a9bd6e2 by Lamarque V. Souza.
Committed on 15/11/2011 at 00:07.
Pushed by lvsouza into branch 'nm09'.

Fix creation of Bluetooth PAN connections.

NM refuses to add Bluetooth PAN connections if they include settings for
Gsm, Ppp and Serial configurations. On the other hand those settings are
required by Bluetooth DUN connections. Because of the way our internal
libraries are coded it is not that trivial to check the correct type
(DUN / PAN) before creating a connection, so I am removing the unneeded
settings when creating / editing a connection.

BUG: 285637
(cherry picked from commit 8111226467b08fb1d5426aad177a7138b81f20fb)

M  +13   -0    libs/internals/connection.cpp
M  +5    -1    libs/internals/connection.h
M  +10   -0    libs/ui/bluetoothconnectioneditor.cpp

http://commits.kde.org/networkmanagement/bcd8ebe500909f50e116f63f146488a03a9bd6e2
Comment 44 Alex Fiestas 2011-11-15 00:49:06 UTC
So, now is my tun of implementing NAP in BlueDevil right ? or is it with PAN enough?
Comment 45 Lamarque V. Souza 2011-11-15 00:59:24 UTC
(In reply to comment #44)
> So, now is my tun of implementing NAP in BlueDevil right ? or is it with PAN
> enough?

Well, this bug is two bugs actually. The first is in BlueDevil, which does not identify NAP service. The second one is Plasma NM that sends unneeded settings to NM when creating a connection.

Richard Jennings, did you create the successfull PAN connection using Bluedevil or networkmanagement_configshell?
Comment 46 Rajeesh K V 2011-11-15 05:07:03 UTC
Created attachment 65688 [details]
Fix Bluetooth PAN creation v3

Tested, and connection creation works fine. But editing the connection results in error "nm-settings-connection.c.839 - Connection didn't have requested setting 'gsm'.", but no crash.

A concern I have with the commit is that everywhere Knm::Connection is called (like ManageConnectionWidget), the caller class needs to be friend class of Knm::Connection and responsibility of removing superfluous Settings resides with the caller. I think the functionality of creating correct Settings reside in Knm::Connection itself. Would you be willing to consider the previous patch with NM_BT_CAPABILITY_DUN as default which would restore previous functionality for DUN connections (attached the same)?
Comment 47 Lamarque V. Souza 2011-11-15 13:20:59 UTC
(In reply to comment #46)
> Created an attachment (id=65688) [details]
> Fix Bluetooth PAN creation v3
> 
> Tested, and connection creation works fine. But editing the connection results
> in error "nm-settings-connection.c.839 - Connection didn't have requested
> setting 'gsm'.", but no crash.
> 
> A concern I have with the commit is that everywhere Knm::Connection is called
> (like ManageConnectionWidget), the caller class needs to be friend class of
> Knm::Connection and responsibility of removing superfluous Settings resides
> with the caller. I think the functionality of creating correct Settings reside
> in Knm::Connection itself. Would you be willing to consider the previous patch
> with NM_BT_CAPABILITY_DUN as default which would restore previous functionality
> for DUN connections (attached the same)?

I agree that it should be in Knm::Connection, but it is not that trivial. Your patch does not work for editing PAN connections yet because it adds the Gsm/Ppp/Serial settings to them.

There are two BluetoothConnectionEditor constructors, you have changed only the first one, which is used when creating connections. The other constructor is used when editing connections. A Knm::Connection object is passed to this second constructor, so we do not have the oportunity in BluetoothConnectionEditor to create a new Knm::Connection with the correct settings. One option is removing the Gsm/Ppp/Serial settings like I did. The other option is creating that Knm::Connection object with the correct settings and that is the non-trivial part.

The Knm::Connection used in the second constructor is created in ConnectionDbus::fromDbusMap, if I am correct. But the flag that identificate if it is a DUN or PAN connection is in the connection's bluetooth setting, not in the connection object itself, so we need to read all settings before creating the connection. For doing that we will need to refactor ConnectionDbus::fromDbusMap and potentially create new bugs in a crutical part of Plasma NM.

We may try to do that in master branch, but not in (stable) nm09 branch.
Comment 48 Richard Jennings 2011-11-15 20:32:46 UTC
Comment #42
> What do you mean by "can't stop the bluetooth connection"? Does not the
> disconnect button work?

The Disconnect button in NM tears down the network connection but not the bluetooth connection. The only way to stop the bluetooth connection is to stop or reset the hardware. If I do a disconnect in NM, I cannot reconnect again afterwards. In effect, I get one connection per boot.
Comment #45
I got the PAN connection using networkmanagement_configshell. It doesn't work the other way.

I'm not sure there is any value in further testing, but I am willing to do it if it would be useful to you.
Comment 49 Alex Fiestas 2011-11-16 21:49:38 UTC
You should be able to disconnect the connection from bluedevil 
systemtray icon.
Comment 50 Richard Jennings 2011-11-17 05:26:36 UTC
Yes, but unfortunately I can't. I will do a desktop recording to demo later today.
Should this be raised in a separate bug report or should this one be reopened?
Comment 51 Alex Fiestas 2011-11-17 07:37:24 UTC
Until I see such video or more description I won't be able to tell.

Anyway in a few days I will get an iPhone 4G in my hands (I have it in 
another place) and I will be able to implement whatever needs to be done 
in the bluetooth side.
Comment 52 Lamarque V. Souza 2011-11-17 10:39:45 UTC
Let's reopen it until all problems are solved.
Comment 53 Richard Jennings 2011-11-17 19:34:48 UTC
(In reply to comment #51)
> Until I see such video or more description I won't be able to tell.
> 
> Anyway in a few days I will get an iPhone 4G in my hands (I have it in 
> another place) and I will be able to implement whatever needs to be done 
> in the bluetooth side.

I have the video now, but it is too big (7MB) to upload to bugs.kde.org. If you email me I will send it in reply.
Comment 54 Rajeesh K V 2011-11-19 19:15:35 UTC
Created attachment 65846 [details]
Fix Bluetooth PAN creation v4

Here's another revision of the patch (could be considered for master branch). So far all my testing works fine (creating and editing PAN connection, editing existing other Wireless/Mobile Broadband connections etc).
I'll do more testing tomorrow.
Comment 55 Lamarque V. Souza 2011-11-19 21:32:19 UTC
Git commit a06cb1a384a4c9680f4aacd449fa77889e96722f by Lamarque V. Souza.
Committed on 19/11/2011 at 22:29.
Pushed by lvsouza into branch 'master'.

Reimplement fix for "Can't tethering to iPhone 3GS using PAN".
Thanks Rajeesh K Nambiar for this patch. I did some small changes in
your patch and it works for DUN connections as well.

CCBUG: 285637

M  +6    -1    backends/NetworkManager/connectiondbus.cpp
M  +19   -13   libs/internals/connection.cpp
M  +6    -4    libs/internals/connection.h
M  +8    -1    libs/ui/bluetoothconnectioneditor.cpp
M  +1    -1    plasma_nm_version.h

http://commits.kde.org/networkmanagement/a06cb1a384a4c9680f4aacd449fa77889e96722f
Comment 56 Richard Jennings 2011-11-20 13:36:22 UTC
(In reply to comment #55)
> Git commit a06cb1a384a4c9680f4aacd449fa77889e96722f by Lamarque V. Souza.
> Committed on 19/11/2011 at 22:29.
> Pushed by lvsouza into branch 'master'.
> 
> Reimplement fix for "Can't tethering to iPhone 3GS using PAN".
> Thanks Rajeesh K Nambiar for this patch. I did some small changes in
> your patch and it works for DUN connections as well.
> 
> CCBUG: 285637
> 
> M  +6    -1    backends/NetworkManager/connectiondbus.cpp
> M  +19   -13   libs/internals/connection.cpp
> M  +6    -4    libs/internals/connection.h
> M  +8    -1    libs/ui/bluetoothconnectioneditor.cpp
> M  +1    -1    plasma_nm_version.h
> 
> http://commits.kde.org/networkmanagement/a06cb1a384a4c9680f4aacd449fa77889e96722f

I would like to test this as well. Can someone please give me some hints as to how I build and install?
Comment 57 Lamarque V. Souza 2011-11-20 16:17:55 UTC
Git commit 4714f5b7333fb4089031c8c0d4ee90ddcfd312de by Lamarque V. Souza.
Committed on 19/11/2011 at 22:29.
Pushed by lvsouza into branch 'nm09'.

Reimplement fix for "Can't tethering to iPhone 3GS using PAN".
Thanks Rajeesh K Nambiar for this patch. I did some small changes in
your patch and it works for DUN connections as well.

CCBUG: 285637

M  +6    -1    backends/NetworkManager/connectiondbus.cpp
M  +19   -13   libs/internals/connection.cpp
M  +6    -4    libs/internals/connection.h
M  +8    -1    libs/ui/bluetoothconnectioneditor.cpp
M  +1    -1    plasma_nm_version.h

http://commits.kde.org/networkmanagement/4714f5b7333fb4089031c8c0d4ee90ddcfd312de
Comment 58 Lamarque V. Souza 2011-11-20 16:20:06 UTC
(In reply to comment #56)
> I would like to test this as well. Can someone please give me some hints as to
> how I build and install?

I cherry-picked the new implemenation to nm09 branch. You can follow the instructions from comment #38 to test it. The changes are less intrusive than I had thought so I do not think there will be any new bugs because of this new implementation.
Comment 59 Richard Jennings 2011-11-20 20:30:28 UTC
(In reply to comment #58)
> (In reply to comment #56)
> > I would like to test this as well. Can someone please give me some hints as to
> > how I build and install?
> 
> I cherry-picked the new implemenation to nm09 branch. You can follow the
> instructions from comment #38 to test it. The changes are less intrusive than I
> had thought so I do not think there will be any new bugs because of this new
> implementation.

I have retested the latest version and emailed the vid to Lamarque and Rajeesh. Basically, the NetworkManager now sees the iPhone when the connection is made so networkmanagement_configshell is not necessary. The other problems remain and you will see them demo'ed.
Comment 60 Lamarque V. Souza 2011-11-20 21:42:19 UTC
Some things I want to point out about the video:

. when you create a bluetooth connection it stays there until you remove it manually using the edit connections dialog, even if you unpair your phone. The fact that there is a bluetooth interface without using networkmanagement_configshell is because you successfully had created one bluetooth connection before. To fully test the new code you must remove that bluetooth connection by clicking on Manage Connections -> Mobile Broadband -> "select the connection" -> Delete. You will need a newer BlueDevil version or use networkmanagement_configshell to re-create the bluetooth connection.

. the missing bluetooth interface item's icon (the one at the left part of Plasma NM's main window) is because I am using the wrong icon name. I will fix it.

. the fact that the system tray icon does not work is probably because the file /usr/share/apps/desktoptheme/default/icons/network2.svgz is missing. Can you check if it is there?

. I also have this problem of connecting only once with my 3G modem (Sony Ericsson MD300). Different modems can behave differently when ModemManager uses the same initialization string and that can cause this kind of problem. Since I do not have a iPhone I cannot test this. In my case I remove my 3G modem from the USB port and insert it again when I have this problem.

. if you turn your notebook's bluetooth controller off that must certainly drop the bluetooth connection with your phone. The same is true if you turn your iPhone's bluetooth off. You do not need to reboot the notebook.
Comment 61 Lamarque V. Souza 2011-11-20 21:43:47 UTC
Git commit af9df71042c9858e8fbae3f77999e95145e9f357 by Lamarque V. Souza.
Committed on 20/11/2011 at 22:37.
Pushed by lvsouza into branch 'master'.

Fix icons for bluetooth interface item and system tray (when the
bluetooth interface is the default one).

CCBUG: 285637

M  +3    -2    applet/networkmanager.cpp
M  +1    -1    libs/internals/uiutils.cpp

http://commits.kde.org/networkmanagement/af9df71042c9858e8fbae3f77999e95145e9f357
Comment 62 Lamarque V. Souza 2011-11-20 21:49:07 UTC
Git commit 0491c7d660cdddbd1b3a3ec3411042b5a3615346 by Lamarque V. Souza.
Committed on 20/11/2011 at 22:37.
Pushed by lvsouza into branch 'nm09'.

Fix icons for bluetooth interface item and system tray (when the
bluetooth interface is the default one).

CCBUG: 285637

M  +3    -2    applet/networkmanager.cpp
M  +1    -1    libs/internals/uiutils.cpp

http://commits.kde.org/networkmanagement/0491c7d660cdddbd1b3a3ec3411042b5a3615346
Comment 63 Richard Jennings 2011-11-20 23:05:12 UTC
(In reply to comment #60)
> Some things I want to point out about the video:
> 
> . when you create a bluetooth connection it stays there until you remove it
> manually using the edit connections dialog, even if you unpair your phone. The
> fact that there is a bluetooth interface without using
> networkmanagement_configshell is because you successfully had created one
> bluetooth connection before. To fully test the new code you must remove that
> bluetooth connection by clicking on Manage Connections -> Mobile Broadband ->
> "select the connection" -> Delete. You will need a newer BlueDevil version or
> use networkmanagement_configshell to re-create the bluetooth connection.
> 
You're right, I missed that when I was resetting the setup. As you say, I need networkmanagement_configshell to re-create the bluetooth connection.

> . the missing bluetooth interface item's icon (the one at the left part of
> Plasma NM's main window) is because I am using the wrong icon name. I will fix
> it.
> 
> . the fact that the system tray icon does not work is probably because the file
> /usr/share/apps/desktoptheme/default/icons/network2.svgz is missing. Can you
> check if it is there?

I do not have a 'desktoptheme' in /usr/share/apps.
> 
> . I also have this problem of connecting only once with my 3G modem (Sony
> Ericsson MD300). Different modems can behave differently when ModemManager uses
> the same initialization string and that can cause this kind of problem. Since I
> do not have a iPhone I cannot test this. In my case I remove my 3G modem from
> the USB port and insert it again when I have this problem.
>
Understood, but I am tethered by bluetooth which I can't 'unplug'.
 
> . if you turn your notebook's bluetooth controller off that must certainly drop
> the bluetooth connection with your phone. The same is true if you turn your
> iPhone's bluetooth off. You do not need to reboot the notebook.

It's true, if I turn off the iPhone's BT,it must cut the connection. But my point was that the BT system tray still shows a connection and this can't be cleared through the UI. If I don't turn off the iPhone BT connection, then I observe that the iPhone continues to say there is a connection until the hardware resets. I would have expected the netbook BT connection to be stopped when the netbook shuts down, but this doesn't happen. It might not be important, but this is how it works.

My take-away from this testing is that from a user perspective, the new version works just as the last version did.
Comment 64 Lamarque V. Souza 2011-11-21 10:56:36 UTC
(In reply to comment #63)
> I do not have a 'desktoptheme' in /usr/share/apps.

It is probably in a different path. Does the command below return something?

for i in $(kde4-config --path data | sed 's/:/ /g'); \
do \
    ls $i/desktoptheme/default/icons/network2.svgz 2> /dev/null; \
done

> Understood, but I am tethered by bluetooth which I can't 'unplug'.

The fact that BlueDevil does not turn bluetooth off looks like a different bug. You should fill a different bug report for that problem.

The no "disconnect" option for your iPhone in BlueDevil is probably because BlueDevil did not find  any service in your phone, which is due to the problem we talked about in comments #13 and #15.

> It's true, if I turn off the iPhone's BT,it must cut the connection. But my
> point was that the BT system tray still shows a connection and this can't be
> cleared through the UI. If I don't turn off the iPhone BT connection, then I
> observe that the iPhone continues to say there is a connection until the
> hardware resets. I would have expected the netbook BT connection to be stopped
> when the netbook shuts down, but this doesn't happen. It might not be
> important, but this is how it works.

Well, it is certain that the BT connection is stopped when you shuts the netbook down.
Comment 65 Richard Jennings 2011-11-21 20:42:47 UTC
(In reply to comment #64)
> (In reply to comment #63)
> > I do not have a 'desktoptheme' in /usr/share/apps.
> 
> It is probably in a different path. Does the command below return something?
> 
> for i in $(kde4-config --path data | sed 's/:/ /g'); \
> do \
>     ls $i/desktoptheme/default/icons/network2.svgz 2> /dev/null; \
> done
> 
so desktoptheme is in /usr/share/kde4/apps

> > Understood, but I am tethered by bluetooth which I can't 'unplug'.
> 
> The fact that BlueDevil does not turn bluetooth off looks like a different bug.
> You should fill a different bug report for that problem.
>
OK, will do.
 
> The no "disconnect" option for your iPhone in BlueDevil is probably because
> BlueDevil did not find  any service in your phone, which is due to the problem
> we talked about in comments #13 and #15.

OK.
> 
> > It's true, if I turn off the iPhone's BT,it must cut the connection. But my
> > point was that the BT system tray still shows a connection and this can't be
> > cleared through the UI. If I don't turn off the iPhone BT connection, then I
> > observe that the iPhone continues to say there is a connection until the
> > hardware resets. I would have expected the netbook BT connection to be stopped
> > when the netbook shuts down, but this doesn't happen. It might not be
> > important, but this is how it works.
> 
> Well, it is certain that the BT connection is stopped when you shuts the
> netbook down.

No argument there!
Comment 66 Richard Jennings 2011-11-21 20:56:18 UTC
Carrying on from comment #65:

I tested a bit further and the 'system connection' and 'connect automatically' work fine.

I didn't test the IPv4 stuff, this didn't seem relevant and I don't know how to create relevant test cases either.

In the NM system tray pop-up, the 'Enable mobile broadband' check-box doesn't work. If you check it, the tick appears for a fraction of a second and then disappears. I seem to remember that it worked ok in the first version I tested.

I also noticed that networkmanagement_configshell is not 100% reliable, you sometimes have to try once or twice more before you are successful. Not a problem if you know.

Until I can disconnect the BT without shutting down, I can't test reconnection. Maybe you should leave this bug open until the BT disconnection problem is solved and I can test this?

I guess that's it.
Comment 67 Lamarque V. Souza 2011-11-26 13:38:33 UTC
(In reply to comment #66)
> Carrying on from comment #65:
> In the NM system tray pop-up, the 'Enable mobile broadband' check-box doesn't
> work. If you check it, the tick appears for a fraction of a second and then
> disappears. I seem to remember that it worked ok in the first version I tested.

I can be wrong but I think NM treats PAN bluetooth connections as regular ethernet (wired connection). In that case it will not let Plasma NM to enable the mobile broadband checkbox. That checkbox is supposed to be enabled only if there is at least one Gsm, Cdma, LTE or Wimax device enabled by ModemManager (or any other means NM uses to detect them).

DUN bluetooth connections are a subset of Gsm, but since we removed the Gsm part from PAN bluetooth connections that can explain why NM does not let the mobile broaband checkbox enabled anymore.

In any case if the checkbox is being unchecked it is NM that is requesting Plasma NM to do that.
 
> I also noticed that networkmanagement_configshell is not 100% reliable, you
> sometimes have to try once or twice more before you are successful. Not a
> problem if you know.

Successful about which part? 1. opening the dialog to create the connection; 2. saving the connection; 3. saving a connection that works.

I guess it is #2 you are referring to, right?
 
> Until I can disconnect the BT without shutting down, I can't test reconnection.
> Maybe you should leave this bug open until the BT disconnection problem is
> solved and I can test this?

Ok. Thanks for helping us debug and test tethering in KDE :-)
Comment 68 Richard Jennings 2011-12-02 09:07:06 UTC
(In reply to comment #67)

> > I also noticed that networkmanagement_configshell is not 100% reliable, you
> > sometimes have to try once or twice more before you are successful. Not a
> > problem if you know.
> 
> Successful about which part? 1. opening the dialog to create the connection; 2.
> saving the connection; 3. saving a connection that works.
> 
> I guess it is #2 you are referring to, right?

In fact no, sometimes the dialog doesn't open. If the dialog opens, I have not had a problem to create the connection. so the answer is #1

> > Maybe you should leave this bug open until the BT disconnection problem is
> > solved and I can test this?
> 
> Ok. Thanks for helping us debug and test tethering in KDE :-)

You're welcome. If you are willing to fix the problems, the least I can do is help to test.
Comment 69 Lamarque V. Souza 2011-12-03 15:22:27 UTC
(In reply to comment #68)
> In fact no, sometimes the dialog doesn't open. If the dialog opens, I have not
> had a problem to create the connection. so the answer is #1

I think that is because networkmanagement_configshell is a singleton, that is, there is only one instance of it running at a time. If you try to launch a second instance it will silently exit. In some situations the first instance can take some time to exit by itself.
Comment 70 Lamarque V. Souza 2011-12-03 15:32:50 UTC
Git commit 74a9053b30dcab181636e922a0729d2e640e4315 by Lamarque V. Souza.
Committed on 03/12/2011 at 16:21.
Pushed by lvsouza into branch 'master'.

Change networkmanagement_configshell to inform error using dialogs
instead of console messages.

CCBUG: 285637

M  +1    -1    plasma_nm_version.h
M  +12   -10   settings/configshell/bluetooth.cpp
M  +3    -7    settings/configshell/manageconnection.cpp

http://commits.kde.org/networkmanagement/74a9053b30dcab181636e922a0729d2e640e4315
Comment 71 Lamarque V. Souza 2011-12-03 15:32:51 UTC
Git commit 96274a4cdb784303b61e5c0a7a1b83e645dc31c3 by Lamarque V. Souza.
Committed on 03/12/2011 at 16:21.
Pushed by lvsouza into branch 'nm09'.

Change networkmanagement_configshell to inform error using dialogs
instead of console messages.

CCBUG: 285637

M  +1    -1    plasma_nm_version.h
M  +11   -8    settings/configshell/bluetooth.cpp
M  +2    -5    settings/configshell/manageconnection.cpp

http://commits.kde.org/networkmanagement/96274a4cdb784303b61e5c0a7a1b83e645dc31c3
Comment 72 Alex Fiestas 2012-04-28 02:50:40 UTC
Any update on this issue? should be fixed now? do we need more feedback?
Comment 73 Rajeesh K V 2012-05-01 17:29:09 UTC
Created attachment 70794 [details]
iPhone NAP tethering with BlueDevil

Alex, the attached patch to BlueDevil fixes the tethering issue with iPhones. Could you please consider applying?

Richard, could you try the following to test?
1. Apply this patch over bluedevil-1.2.3, compile and install (see http://www.afiestas.org/bluedevil-1-0-7-1-1-4-1-2-3-and-1-3-rc2-bug-fixing-frenezy/)
2. If your iPhone is already tethered and connection is present in Plasma NM, remove the device from BlueDevil as well as remove the connection from Plasma NM
3. Tether from BlueDevil system tray icon by clicking "Add Device"
This time the pairing and subsequent connection creation should be successful.
Comment 74 Kai Uwe Broulik 2012-05-31 15:46:51 UTC
I just applied your patch, Rajeesh, and indeed, when I add my Samsung Galaxy S (Android smartphone), to BlueDevil, it offers to do "Connect to internet via PANU" and then a NM dialog pops up letting me configure the connection. After that, I clicked the connection in NM (although connecting the first time does not work properly, which seems a NM issue?) and it worked. Thanks! :-)
Comment 75 Alex Fiestas 2012-06-30 08:39:34 UTC
Git commit 85034e937f617e7758e76d0958297b58840a4dfd by Alex Fiestas.
Committed on 30/06/2012 at 10:37.
Pushed by afiestas into branch '1.2'.

We want to connect to the NAP profile not PANU

Patch by Rajeesh K Nambiar

M  +1    -1    src/actionplugins/networkpanu/bluedevil-network-panu.desktop
M  +2    -2    src/actionplugins/networkpanu/helper/networkpanuhelper.cpp
M  +2    -2    src/actionplugins/networkpanu/networkpanu.cpp

http://commits.kde.org/bluedevil/85034e937f617e7758e76d0958297b58840a4dfd
Comment 76 pdf 2013-03-04 04:38:02 UTC
Is this in a released version? I'm not able to connect to an Android NAP/PANU device with 1.2.2
Comment 77 Alex Fiestas 2013-03-05 20:40:38 UTC
You have either:
http://download.kde.org/stable/bluedevil/1.2.4/src/

or
http://download.kde.org/stable/bluedevil/1.3/src/

Your distribution should to upgrade at least to 1.2.4, though only 1.3 is supported.
Comment 78 pdf 2013-03-05 23:06:32 UTC
Hmm, apparently my subsequent comment didn't post successfully - I backported 1.2.4 and that is working as expected, sorry for the noise.
Comment 79 Alex Fiestas 2013-03-06 09:46:44 UTC
Awesome! glad it worked for you.

Thanks for reporting.