After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 486331 - gnome-phone-manager does not select the corrent bluetooth channel
gnome-phone-manager does not select the corrent bluetooth channel
Status: RESOLVED FIXED
Product: gnome-phone-manager
Classification: Other
Component: general
0.10
Other All
: Normal major
: ---
Assigned To: none
none
Depends on:
Blocks:
 
 
Reported: 2007-10-13 14:48 UTC by Malcolm Caldwell
Modified: 2007-10-22 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the problem with "channel" vs the correct "rfcomm_channel" (1.71 KB, patch)
2007-10-13 14:50 UTC, Malcolm Caldwell
none Details | Review
sdptool browse (3.47 KB, text/plain)
2007-10-22 09:45 UTC, Pedro Silva
  Details
gpm-debug.patch (589 bytes, patch)
2007-10-22 10:51 UTC, Bastien Nocera
rejected Details | Review

Description Malcolm Caldwell 2007-10-13 14:48:32 UTC
Please describe the problem:
gnome-phone-manager does not select the correct bluetooth channel.  It works if a phone uses channel is 0 as that is the default for gnokii anyway, but for phones that use another channel it fails

Steps to reproduce:
1. Try to connect to a phone that does not use the default channel
2. 
3. 


Actual results:
gnome-phone-manager tries to connect again and again and again in a loop.  This is due to a timeout as the rfcomm listener on channel 0 (at least on my phone) does not respond to AT commands

Expected results:
It should just connect

Does this happen every time?
Yes

Other information:
gnokii uses config parameter "rfcomm_channel", while gnome-phone-manager incorrectly sets the variable "channel"
Comment 1 Malcolm Caldwell 2007-10-13 14:50:45 UTC
Created attachment 97167 [details] [review]
patch to fix the problem with "channel" vs the correct "rfcomm_channel"

This also adds debuging support.  I don't know what the best way to turn on and off this debugging would be: environment variable? gconf?
Comment 2 Bastien Nocera 2007-10-13 23:56:59 UTC
Where do you see that gnokii uses rfcomm_channel as opposed to channel?

Please separate the debugging into another issue.
Comment 3 Malcolm Caldwell 2007-10-14 13:44:01 UTC
(In reply to comment #2)
> Where do you see that gnokii uses rfcomm_channel as opposed to channel?

/usr/share/doc/gnokii-0.6.18/sample/gnokiirc

(rfcomm_channel is also mentioned in the Changelog while channel is not)

./common/cfgreader.c line 499

(Also this change is needed to make my phone work..)

> Please separate the debugging into another issue.

Ok.


Comment 4 Bastien Nocera 2007-10-14 13:54:59 UTC
(In reply to comment #0)
> Please describe the problem:
> gnome-phone-manager does not select the correct bluetooth channel.  It works if
> a phone uses channel is 0 as that is the default for gnokii anyway, but for
> phones that use another channel it fails

Gnokii's default is actually channel 1:
gn_config_default.rfcomm_cn = 1;

2007-10-14  Bastien Nocera  <hadess@hadess.net>

        * libgsm/phonemgr-utils.c: (phonemgr_utils_write_config):
        Really use the right channel to connect to a phone, as gnokii
        uses rfcomm_channel, not channel in its config
        spotted by Malcolm Caldwell <malcolm.caldwell@cdu.edu.au>
        (Closes: #486331)
Comment 5 Pedro Silva 2007-10-22 07:57:20 UTC
(In reply to comment #4)
> (In reply to comment #0)
> > Please describe the problem:
> > gnome-phone-manager does not select the correct bluetooth channel.  It works if
> > a phone uses channel is 0 as that is the default for gnokii anyway, but for
> > phones that use another channel it fails
> 
> Gnokii's default is actually channel 1:
> gn_config_default.rfcomm_cn = 1;
> 
> 2007-10-14  Bastien Nocera  <hadess@hadess.net>
> 
>         * libgsm/phonemgr-utils.c: (phonemgr_utils_write_config):
>         Really use the right channel to connect to a phone, as gnokii
>         uses rfcomm_channel, not channel in its config
>         spotted by Malcolm Caldwell <malcolm.caldwell@cdu.edu.au>
>         (Closes: #486331)
> 

I think this bug is not yet solved. I have a Sony Ericsson K800i and the rfcomm channel for Dialup Networking is 2. gnokii --identify works but g-phone-manager doesn't connect.
Comment 6 Bastien Nocera 2007-10-22 09:33:09 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #0)
> > > Please describe the problem:
> > > gnome-phone-manager does not select the correct bluetooth channel.  It works if
> > > a phone uses channel is 0 as that is the default for gnokii anyway, but for
> > > phones that use another channel it fails
> > 
> > Gnokii's default is actually channel 1:
> > gn_config_default.rfcomm_cn = 1;
> > 
> > 2007-10-14  Bastien Nocera  <hadess@hadess.net>
> > 
> >         * libgsm/phonemgr-utils.c: (phonemgr_utils_write_config):
> >         Really use the right channel to connect to a phone, as gnokii
> >         uses rfcomm_channel, not channel in its config
> >         spotted by Malcolm Caldwell <malcolm.caldwell@cdu.edu.au>
> >         (Closes: #486331)
> > 
> 
> I think this bug is not yet solved. I have a Sony Ericsson K800i and the rfcomm
> channel for Dialup Networking is 2. gnokii --identify works but g-phone-manager
> doesn't connect.

Which channel does it select instead then?
Comment 7 Pedro Silva 2007-10-22 09:39:03 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (In reply to comment #0)
> > > > Please describe the problem:
> > > > gnome-phone-manager does not select the correct bluetooth channel.  It works if
> > > > a phone uses channel is 0 as that is the default for gnokii anyway, but for
> > > > phones that use another channel it fails
> > > 
> > > Gnokii's default is actually channel 1:
> > > gn_config_default.rfcomm_cn = 1;
> > > 
> > > 2007-10-14  Bastien Nocera  <hadess@hadess.net>
> > > 
> > >         * libgsm/phonemgr-utils.c: (phonemgr_utils_write_config):
> > >         Really use the right channel to connect to a phone, as gnokii
> > >         uses rfcomm_channel, not channel in its config
> > >         spotted by Malcolm Caldwell <malcolm.caldwell@cdu.edu.au>
> > >         (Closes: #486331)
> > > 
> > 
> > I think this bug is not yet solved. I have a Sony Ericsson K800i and the rfcomm
> > channel for Dialup Networking is 2. gnokii --identify works but g-phone-manager
> > doesn't connect.
> 
> Which channel does it select instead then?
> 

I don't know. I tried to put channel = 2 in .gnokiirc but g-p-m still can't connect. xgnokii seems to work fine, pulling SMS and contacts. 
Comment 8 Pedro Silva 2007-10-22 09:45:00 UTC
Created attachment 97594 [details]
sdptool browse

sdptool browse with Sony Ericsson K800i
Comment 9 Bastien Nocera 2007-10-22 09:58:38 UTC
(In reply to comment #7)
<snip>
> I don't know. I tried to put channel = 2 in .gnokiirc but g-p-m still can't
> connect. xgnokii seems to work fine, pulling SMS and contacts. 

It's rfcomm_channel, not channel. Would you mind checking whether it works with gnokii, puttin rfcomm_channel in the .gnokiirc?

Also, could you add g_message () outputs in phonemgr-utils.c where it uses the channel to check if all the values used are correct?
Comment 10 Pedro Silva 2007-10-22 10:11:15 UTC
(In reply to comment #9)
> (In reply to comment #7)
> <snip>
> > I don't know. I tried to put channel = 2 in .gnokiirc but g-p-m still can't
> > connect. xgnokii seems to work fine, pulling SMS and contacts. 
> 
> It's rfcomm_channel, not channel. Would you mind checking whether it works with
> gnokii, puttin rfcomm_channel in the .gnokiirc?
> 
> Also, could you add g_message () outputs in phonemgr-utils.c where it uses the
> channel to check if all the values used are correct?
> 

I didn't make myself understood, I already use rfcomm_channel = 2 in .gnokiirc but g-p-m doesnt recognize it.

I don't understand C very much, I tried to put a g_message(channel); in phonemgr-utils.c in "find_dun_channel" and "get_rfcomm_channel" right before the return(channel); but I can't find any msg about which channel g-p-m is using. I have basic C development skills.
Comment 11 Bastien Nocera 2007-10-22 10:21:23 UTC
(In reply to comment #10)
<snip>
> I didn't make myself understood, I already use rfcomm_channel = 2 in .gnokiirc
> but g-p-m doesnt recognize it.

g-p-m doesn't use ~/.gnokiirc, it generates the configuration in-memory, on the fly.

> I don't understand C very much, I tried to put a g_message(channel); in
> phonemgr-utils.c in "find_dun_channel" and "get_rfcomm_channel" right before
> the return(channel); but I can't find any msg about which channel g-p-m is
> using. I have basic C development skills.

The line should be:
g_message ("in function bleh, channel is %d", channel);

You can pepper that whenever "channel" is used in the code, in both phonemgr-listener.c and phonemgr-utils.c
Comment 12 Pedro Silva 2007-10-22 10:40:39 UTC
(In reply to comment #11)
> (In reply to comment #10)
> <snip>
> > I didn't make myself understood, I already use rfcomm_channel = 2 in .gnokiirc
> > but g-p-m doesnt recognize it.
> 
> g-p-m doesn't use ~/.gnokiirc, it generates the configuration in-memory, on the
> fly.
> 
> > I don't understand C very much, I tried to put a g_message(channel); in
> > phonemgr-utils.c in "find_dun_channel" and "get_rfcomm_channel" right before
> > the return(channel); but I can't find any msg about which channel g-p-m is
> > using. I have basic C development skills.
> 
> The line should be:
> g_message ("in function bleh, channel is %d", channel);
> 
> You can pepper that whenever "channel" is used in the code, in both
> phonemgr-listener.c and phonemgr-utils.c
> 

I've used your line in both phonemgr-listener.c and phonemgr-utils.c but I still can't see any messages about the channel, none at console or gui.

The outcome is always this:

** Message: bdaddr 00:1B:59:52:99:41
** Message: New connection device is 00:1B:59:52:99:41 (changed)
** Message: New connection device is 00:1B:59:52:99:41 (not changed)
** Message: Connecting...
** Message: Status 1
** Message: Making serial port connection
conn_complete:  status 0x00

** (gnome-phone-manager:29609): WARNING **: gn_gsm_initialise: Command timed out.
** Message: Failed connection to device on 00:1B:59:52:99:41
** Message: Exiting connect thread
Comment 13 Bastien Nocera 2007-10-22 10:51:22 UTC
Created attachment 97596 [details] [review]
gpm-debug.patch

That's with my debug:
** Message: Connecting...
** Message: Status 1
** Message: Making serial port connection
conn_complete:  status 0x00
** Message: channel1 1
** Message: channel2 1
** Message: Using driver '6230'
** Message: Status 2
** Message: Serial port connected
** Message: Connected to device on 00:12:D2:79:B7:33
Comment 14 Pedro Silva 2007-10-22 11:10:55 UTC
(In reply to comment #13)
> Created an attachment (id=97596) [edit]
> gpm-debug.patch
> 
> That's with my debug:
> ** Message: Connecting...
> ** Message: Status 1
> ** Message: Making serial port connection
> conn_complete:  status 0x00
> ** Message: channel1 1
> ** Message: channel2 1
> ** Message: Using driver '6230'
> ** Message: Status 2
> ** Message: Serial port connected
> ** Message: Connected to device on 00:12:D2:79:B7:33
> 

I'm sorry, I owe you a couple of beers.

When I applied your patch, nothing happened. It was strange that my code wouldn't do nothing, but yours too? I investigated a little more and I found out that I was actually using an old binary in /usr/local/bin and my new compiled g-p-m was never being used. Yep, this was really dumb and a waste of your time. Everything is working, including your patch.

Apologies and thank you for your work.
Comment 15 Bastien Nocera 2007-10-22 11:17:56 UTC
No worries, just glad it's working! Closing this bug then.