Linux bluetooth development
 help / color / mirror / Atom feed
* [Bluez-devel] Translated strings in SDP records
@ 2005-04-20 10:21 Fred Schaettgen
  2005-04-20 10:40 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Fred Schaettgen @ 2005-04-20 10:21 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

Hi folks,

A few days ago I have been asked to support translated strings in the SDP 
related parts of kdebluetooth, so that service names are displayed in an 
appropriate language in the user interface.
All my devices use English only for the SDP records, so I asked Alex Dubov, 
who sent the feature request, to show me his sdp records. 
The output of sdptool browse --tree is attached. His device claims to support 
various languages in the LanguageBaseAttributeIDList, but the services names 
themselves are only returned in one language. Shouldn't the names be returned 
in all suported languages at once? Or do I have to request the desired 
languages explicitly somehow? 

thanks for any hints

Fred

-- 
Fred Schaettgen
bluez-devel@schaettgen.de

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sdplogtr.txt --]
[-- Type: text/plain; charset="us-ascii"; name="sdplogtr.txt", Size: 8775 bytes --]

Browsing 00:0A:28:59:8C:6F ...
Attribute Identifier : 0x0 - ServiceRecordHandle
  Integer : 0x0
Attribute Identifier : 0x1 - ServiceClassIDList
  Data Sequence
    UUID16 : 0x1000 - ServiceDiscoveryServerServiceClassID (SDP)
Attribute Identifier : 0x2 - ServiceRecordState
  Integer : 0x1
Attribute Identifier : 0x4 - ProtocolDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x0100 - L2CAP
    Data Sequence
      UUID16 : 0x0001 - SDP (Service Discovery Protocol)
Attribute Identifier : 0x5 - BrowseGroupList
  Data Sequence
    UUID16 : 0x1002 - PublicBrowseGroup (SDP)
Attribute Identifier : 0x9 - BluetoothProfileDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x1000 - ServiceDiscoveryServerServiceClassID (SDP)
      Version (Integer) : 0x100
Attribute Identifier : 0x200 - VersionNumberList
  Data Sequence
    Integer : 0x1000
Attribute Identifier : 0x201 - ServiceDatabaseState
  Integer : 0x1

Attribute Identifier : 0x0 - ServiceRecordHandle
  Integer : 0x10001
Attribute Identifier : 0x1 - ServiceClassIDList
  Data Sequence
    UUID16 : 0x1103 - DialupNetworking (DUN)
Attribute Identifier : 0x2 - ServiceRecordState
  Integer : 0x1
Attribute Identifier : 0x4 - ProtocolDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x0100 - L2CAP
    Data Sequence
      UUID16 : 0x0003 - RFCOMM
      Channel/Port (Integer) : 0x1
Attribute Identifier : 0x5 - BrowseGroupList
  Data Sequence
    UUID16 : 0x1002 - PublicBrowseGroup (SDP)
Attribute Identifier : 0x6 - LanguageBaseAttributeIDList
  Data Sequence
    Code ISO639 (Integer) : 0x6172
    Encoding (Integer) : 0x6a
    Base Offset (Integer) : 0x100
    Integer : 0x6865
    Integer : 0x6a
    Integer : 0xd800
    Integer : 0x7275
    Integer : 0x6a
    Integer : 0xd803
    Integer : 0x656e
    Integer : 0x6a
    Integer : 0xd806
    Integer : 0x6672
    Integer : 0x6a
    Integer : 0xd809
    Integer : 0x6573
    Integer : 0x6a
    Integer : 0xd80c
    Integer : 0x7472
    Integer : 0x6a
    Integer : 0xd80f
Attribute Identifier : 0x9 - BluetoothProfileDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x1103 - DialupNetworking (DUN)
      Version (Integer) : 0x100
Attribute Identifier : 0x100
  Text : "منفذ اتصا"
Attribute Identifier : 0x101
  Text : "منفذ اتصا"
Attribute Identifier : 0x102
  Text : "Motorola"
Attribute Identifier : 0x201
  Data Sequence
    Integer : 0x3002
Attribute Identifier : 0x202
  Data Sequence
    Integer : 0x22b8

Attribute Identifier : 0x0 - ServiceRecordHandle
  Integer : 0x10003
Attribute Identifier : 0x1 - ServiceClassIDList
  Data Sequence
    UUID16 : 0x1112 - HeadsetAudioGateway
    UUID16 : 0x1203 - GenericAudio
Attribute Identifier : 0x2 - ServiceRecordState
  Integer : 0x1
Attribute Identifier : 0x4 - ProtocolDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x0100 - L2CAP
    Data Sequence
      UUID16 : 0x0003 - RFCOMM
      Channel/Port (Integer) : 0x3
Attribute Identifier : 0x5 - BrowseGroupList
  Data Sequence
    UUID16 : 0x1002 - PublicBrowseGroup (SDP)
Attribute Identifier : 0x6 - LanguageBaseAttributeIDList
  Data Sequence
    Code ISO639 (Integer) : 0x6172
    Encoding (Integer) : 0x6a
    Base Offset (Integer) : 0x100
    Integer : 0x6865
    Integer : 0x6a
    Integer : 0xd800
    Integer : 0x7275
    Integer : 0x6a
    Integer : 0xd803
    Integer : 0x656e
    Integer : 0x6a
    Integer : 0xd806
    Integer : 0x6672
    Integer : 0x6a
    Integer : 0xd809
    Integer : 0x6573
    Integer : 0x6a
    Integer : 0xd80c
    Integer : 0x7472
    Integer : 0x6a
    Integer : 0xd80f
Attribute Identifier : 0x9 - BluetoothProfileDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x1108 - Headset
      Version (Integer) : 0x100
Attribute Identifier : 0x100
  Text : "المنفذ "
Attribute Identifier : 0x101
  Text : "منفذ سماع"
Attribute Identifier : 0x102
  Text : "Motorola"

Attribute Identifier : 0x0 - ServiceRecordHandle
  Integer : 0x10007
Attribute Identifier : 0x1 - ServiceClassIDList
  Data Sequence
    UUID16 : 0x111f - HandsfreeAudioGateway
    UUID16 : 0x1203 - GenericAudio
Attribute Identifier : 0x2 - ServiceRecordState
  Integer : 0x1
Attribute Identifier : 0x4 - ProtocolDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x0100 - L2CAP
    Data Sequence
      UUID16 : 0x0003 - RFCOMM
      Channel/Port (Integer) : 0x7
Attribute Identifier : 0x5 - BrowseGroupList
  Data Sequence
    UUID16 : 0x1002 - PublicBrowseGroup (SDP)
Attribute Identifier : 0x6 - LanguageBaseAttributeIDList
  Data Sequence
    Code ISO639 (Integer) : 0x6172
    Encoding (Integer) : 0x6a
    Base Offset (Integer) : 0x100
    Integer : 0x6865
    Integer : 0x6a
    Integer : 0xd800
    Integer : 0x7275
    Integer : 0x6a
    Integer : 0xd803
    Integer : 0x656e
    Integer : 0x6a
    Integer : 0xd806
    Integer : 0x6672
    Integer : 0x6a
    Integer : 0xd809
    Integer : 0x6573
    Integer : 0x6a
    Integer : 0xd80c
    Integer : 0x7472
    Integer : 0x6a
    Integer : 0xd80f
Attribute Identifier : 0x9 - BluetoothProfileDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x111e - Handsfree
      Version (Integer) : 0x101
Attribute Identifier : 0x100
  Text : "منفذ الصوت "
Attribute Identifier : 0x101
  Text : "منفذ الصوت "
Attribute Identifier : 0x102
  Text : "Motorola"
Attribute Identifier : 0x301
  Integer : 0x1
Attribute Identifier : 0x311
  Integer : 0x1f

Attribute Identifier : 0x0 - ServiceRecordHandle
  Integer : 0x10008
Attribute Identifier : 0x1 - ServiceClassIDList
  Data Sequence
    UUID16 : 0x1105 - OBEXObjectPush
Attribute Identifier : 0x2 - ServiceRecordState
  Integer : 0x1
Attribute Identifier : 0x4 - ProtocolDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x0100 - L2CAP
    Data Sequence
      UUID16 : 0x0003 - RFCOMM
      Channel/Port (Integer) : 0x8
    Data Sequence
      UUID16 : 0x0008 - OBEX
Attribute Identifier : 0x5 - BrowseGroupList
  Data Sequence
    UUID16 : 0x1002 - PublicBrowseGroup (SDP)
Attribute Identifier : 0x6 - LanguageBaseAttributeIDList
  Data Sequence
    Code ISO639 (Integer) : 0x6172
    Encoding (Integer) : 0x6a
    Base Offset (Integer) : 0x100
    Integer : 0x6865
    Integer : 0x6a
    Integer : 0xd800
    Integer : 0x7275
    Integer : 0x6a
    Integer : 0xd803
    Integer : 0x656e
    Integer : 0x6a
    Integer : 0xd806
    Integer : 0x6672
    Integer : 0x6a
    Integer : 0xd809
    Integer : 0x6573
    Integer : 0x6a
    Integer : 0xd80c
    Integer : 0x7472
    Integer : 0x6a
    Integer : 0xd80f
Attribute Identifier : 0x9 - BluetoothProfileDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x1105 - OBEXObjectPush
      Version (Integer) : 0x100
Attribute Identifier : 0x100
  Text : "تبادل العناص"
Attribute Identifier : 0x101
  Text : "تبادل العناص"
Attribute Identifier : 0x102
  Text : "Motorola"
Attribute Identifier : 0x303
  Data Sequence
    Integer : 0xff

Attribute Identifier : 0x0 - ServiceRecordHandle
  Integer : 0x10009
Attribute Identifier : 0x1 - ServiceClassIDList
  Data Sequence
    UUID16 : 0x1106 - OBEXFileTransfer
Attribute Identifier : 0x2 - ServiceRecordState
  Integer : 0x1
Attribute Identifier : 0x4 - ProtocolDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x0100 - L2CAP
    Data Sequence
      UUID16 : 0x0003 - RFCOMM
      Channel/Port (Integer) : 0x9
    Data Sequence
      UUID16 : 0x0008 - OBEX
Attribute Identifier : 0x5 - BrowseGroupList
  Data Sequence
    UUID16 : 0x1002 - PublicBrowseGroup (SDP)
Attribute Identifier : 0x6 - LanguageBaseAttributeIDList
  Data Sequence
    Code ISO639 (Integer) : 0x6172
    Encoding (Integer) : 0x6a
    Base Offset (Integer) : 0x100
    Integer : 0x6865
    Integer : 0x6a
    Integer : 0xd800
    Integer : 0x7275
    Integer : 0x6a
    Integer : 0xd803
    Integer : 0x656e
    Integer : 0x6a
    Integer : 0xd806
    Integer : 0x6672
    Integer : 0x6a
    Integer : 0xd809
    Integer : 0x6573
    Integer : 0x6a
    Integer : 0xd80c
    Integer : 0x7472
    Integer : 0x6a
    Integer : 0xd80f
Attribute Identifier : 0x9 - BluetoothProfileDescriptorList
  Data Sequence
    Data Sequence
      UUID16 : 0x1106 - OBEXFileTransfer
      Version (Integer) : 0x100
Attribute Identifier : 0x100
  Text : "تم نقل مل"
Attribute Identifier : 0x101
  Text : "تم نقل مل"
Attribute Identifier : 0x102
  Text : "Motorola"


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bluez-devel] Translated strings in SDP records
  2005-04-20 10:21 [Bluez-devel] Translated strings in SDP records Fred Schaettgen
@ 2005-04-20 10:40 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2005-04-20 10:40 UTC (permalink / raw)
  To: bluez-devel

Hi Fred,

> A few days ago I have been asked to support translated strings in the SDP 
> related parts of kdebluetooth, so that service names are displayed in an 
> appropriate language in the user interface.
> All my devices use English only for the SDP records, so I asked Alex Dubov, 
> who sent the feature request, to show me his sdp records. 
> The output of sdptool browse --tree is attached. His device claims to support 
> various languages in the LanguageBaseAttributeIDList, but the services names 
> themselves are only returned in one language. Shouldn't the names be returned 
> in all suported languages at once? Or do I have to request the desired 
> languages explicitly somehow? 

I must admit that I never used this stupid multi language thing, but the
general idea is that you can specify offsets for the strings. The base
offset is 0x100 and thus the attributes 0x100, 0x101 and 0x102 gives you
the correct strings.

So looking at the DUN record the extra strings must be at 0xd800 + 0,
0xd800 + 1, 0xd800 + 2, 0xd803 + 0, 0xd803 + 1 etc. But I don't see any
attributes there and this means that this SDP record is incomplete. I
looked at the sdptool code to verify that we request all attributes and
indeed I saw the range 0x0000 - 0xffff which should include the 0xd8xx
attributes.

What kind of broken device is this? Maybe you wanna give sdptest from
libs2 a try.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-20 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-20 10:21 [Bluez-devel] Translated strings in SDP records Fred Schaettgen
2005-04-20 10:40 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox