Selecting channel for SyncMLClient

Bug #376845 reported by kylea
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
multisync (Ubuntu)
New
Undecided
Unassigned

Bug Description

2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux

Description: Ubuntu 9.04
Release: 9.04 - Jaunty 64bit

I purchased a new Nokia 5800 - nice phone - and set up Bluetooth - worked fine for a while (1 Day) and then half the time I had to force a connect FROM the phone to the PC.

Worked in this mode on and off for 4 days then it stopped, no sdptool browse response. So restarted the phone, could not transfer the calendar but sdptool browse <id> worked.

I then checked the output from sdptool browse <id> and noticed that the SyncMLClient channel had changed from 6 to 5 !!!

So I changed my settings to 5 in the Multisync tool, all good calender transfer worked.

Next evening transfer failed. So I checked the channel again - and it had reset back to 6!

Here are some comments from another bug - suggestion is that Multisync should be able to query the phone (via SDPtool?) and determine the correct channel.

kylea wrote:
> I then checked the output from sdptool browse <id> and noticed that the
> SyncMLClient channel had changed from 6 to 5 !!!

That's fine. It's not much different to computers changing IP address.
Apps should read the metadata (from sdptool!) and work out the right channel to use.

> So I changed my settings to 5 in the Multisync tool, all good calender
> transfer worked

Sounds like the bug is Multisync requiring you to enter the channel number.
It should work it out automatically. Maybe you could file a bug report for Multisync?

Revision history for this message
kylea (kylea) wrote :

Here it is on Channel 5

Service Name: SyncMLClient
Service RecHandle: 0x10006
Service Class ID List:
  UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)

    Channel: 5

  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding: 0x6a
  base_offset: 0x100
Profile Descriptor List:
  "" (0x00000002-0000-1000-8000-0002ee000002)
    Version: 0x0100

Revision history for this message
kylea (kylea) wrote :

Service Name: SyncMLClient
Here it is on Channel 8

few hours later after a restart

Service RecHandle: 0x1001a
Service Class ID List:
  UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)

    Channel: 8

  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding: 0x6a
  base_offset: 0x100
Profile Descriptor List:
  "" (0x00000002-0000-1000-8000-0002ee000002)
    Version: 0x0100

Revision history for this message
kylea (kylea) wrote :

For what its worth I made up some scripts to fix this - run as a cron job a reboot.

stored in a dir called Scripts under home dir

/home/user_id/Scripts/

The script (check_sdptool_status.sh) basically does this

sdptool browse 00:24:7C:31:78:C8 > /home/kylea/Desktop/sdptool.log

# The it Processes the sdptool log file
# Extracts the correct channel number for the syncMLClient
# Gets a template for the XML file for opensync
# Replaces the template holder for the bluetooth channel with a new value for "x_x"
# Replaces the existing XML file with the updated one with the
# Correct channel number

Revision history for this message
kylea (kylea) wrote :

/home/kylea/Scripts/extract_sdpserver_channel.sh

does all the awk and other stuff

Revision history for this message
kylea (kylea) wrote :

#! /bin/bash
HOME=/home/kylea
LOGNAME=kylea

awk -f extract_syncmlclient.awk /home/kylea/Desktop/sdptool.log > output.in

awk -f extract_channel_no.awk output.in | awk '{print $2}' > output2.in

cat output2.in | xargs ./replace_sdl_channel.sh > /home/kylea/.opensync-0.22/group1/2/syncml-obex-client.conf

Revision history for this message
kylea (kylea) wrote :
Revision history for this message
kylea (kylea) wrote :

Update the openync XML file with the correct channel number for syncMLClient

Revision history for this message
kylea (kylea) wrote :

This is the XML template file I created - note Bluetooth channel is "x_x" - awk replaces this place holder with the correct values

Revision history for this message
kylea (kylea) wrote :

<?xml version="1.0"?>
<config>
  <!-- (Only for bluetooth) The bluetooth address if the bluetooth mode is selected -->
  <!-- bluetooth_address>00:1B:AF:F8:86:9D</bluetooth_address -->
  <bluetooth_address>00:24:7C:31:78:C8</bluetooth_address>

  <!-- (Only for bluetooth) The bluetooth channel to use. `sdptool browse $MAC` to search for the correct channel -->
  <bluetooth_channel>x_x</bluetooth_channel>

  <!-- (Only for USB) The usb interface number of the SYNCML-SYNC target. use syncml-obex-client -u (you will need access to the USB raw device) to find it. -->
  <interface>0</interface>

  <!-- The string that the plugin will use to identify itself. Some devices need a special string here. -->
  <identifier>PC Suite</identifier>

  <!-- The syncml version to use: 0 for 1.0, 1 for 1.1 and 2 for 1.2 -->
  <version>1</version>

  <!-- if the plugin should use wbxml -->
  <wbxml>1</wbxml>

  <!-- The username to use. Leave empty to not require a username -->
  <username></username>

  <!-- the password for the username -->
  <password></password>

  <!-- sets the connection type to use. 5 means obex over usb, 2 means obex over bluetooth -->
  <type>2</type>

  <!-- If wbxml is enabled, defines wether the wbxml should use string tables -->
  <usestringtable>1</usestringtable>

  <!-- Never send ADD command, but send REPLACE (not needed normally) -->
  <onlyreplace>0</onlyreplace>

  <!-- Workaround around for mobile phones which only use local timestamps and _no_ UTC timestamps! -->
  <onlyLocaltime>0</onlyLocaltime>

  <!-- Sets the maximum allowed size in bytes of incoming messages (some device need this option set). Example: 10000 -->
  <recvLimit>50000</recvLimit>

  <maxObjSize>0</maxObjSize>

  <!-- The name of the contacts db. Must be the same as the phones sends -->
  <contact_db>Contacts</contact_db>

  <!-- The name of the calendar db. Must be the same as the phones sends -->
  <calendar_db>Calendar</calendar_db>

  <!-- The name of the note db. Must be the same as the phones sends -->
  <note_db>Notes</note_db>
</config>

Revision history for this message
tankdriver (stoneraider-deactivatedaccount) wrote :

Hi,
I can confirm this issue:
after phone restart channel changed from 7 to 4!!
I haven't tested your scripts jet.

But I don't know if multisync is the right package for this report.
I use multisync0.90, the GUI for the opensync framework.

Revision history for this message
kylea (kylea) wrote :

Be-aware, that sometimes the phone will not accept connections via bluetooth.

Quite often I have to connect to the PC from the phone and then they seem to be happy to sync with each other.

Revision history for this message
pavel (pavel-zorin) wrote :

I had the same problem, thanks for your help!

For everyone:
I changed the scripts a little bit and packed them, together with the template and awk scripts, in one archive.
You can unpack it to ~/bin/syncml/ and change the phone ID and paths (directory you unpacked to & path to the config file you have to generate) in "syncml-channel-update.sh".

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.