Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Bluetooth serial port openSUSE 13.1

  1. #1

    Default Bluetooth serial port openSUSE 13.1

    Hello,

    In the latest version of openSUSE I can not use RFCOMM, everything else works.

    In previous openSUSE with other computers, simply use:
    Code:
    > sdptool add SP
    Serial Port service registered
    > rfcomm listen /dev/rfcomm0
    But now the "sdptool add SP" ends in silence.

    I do not see the DUN service:
    Code:
    > sdptool browse
    Inquiring ...
    Browsing D0:57:85:21:51:94 ...
    Service RecHandle: 0x10000
    Service Class ID List:
      "PnP Information" (0x1200)
    Profile Descriptor List:
      "PnP Information" (0x1200)
        Version: 0x0102
    
    Browsing D0:57:85:21:51:94 ...
    Service Search failed: Invalid argument
    Service Name: Audio SourceService RecHandle: 0x10001
    Service Class ID List:
      "Audio Source" (0x110a)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
        PSM: 25
      "AVDTP" (0x0019)
        uint16: 0x102
    Profile Descriptor List:
      "Advanced Audio" (0x110d)
        Version: 0x0102
    
    Service Name: AVRCP TGService RecHandle: 0x10002
    Service Class ID List:
      "AV Remote Target" (0x110c)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
        PSM: 23
      "AVCTP" (0x0017)
        uint16: 0x103
    Profile Descriptor List:
      "AV Remote" (0x110e)
        Version: 0x0103
    
    Service Name: Voice GatewayService RecHandle: 0x10003
    Service Class ID List:
      "Headset Audio Gateway" (0x1112)
      "Generic Audio" (0x1203)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
      "RFCOMM" (0x0003)
        Channel: 11
    Profile Descriptor List:
      "Headset" (0x1108)
        Version: 0x0102
    
    Service Name: OBEX Object PushService RecHandle: 0x10004
    Service Class ID List:
      "OBEX Object Push" (0x1105)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
      "RFCOMM" (0x0003)
        Channel: 12
      "OBEX" (0x0008)
    Profile Descriptor List:
      "OBEX Object Push" (0x1105)
        Version: 0x0102
    
    Browsing D0:57:85:21:51:94 ...
    Service Search failed: Invalid argument
    Service Name: Voice GatewayService RecHandle: 0x10005
    Service Class ID List:
      "Handsfree Audio Gateway" (0x111f)
      "Generic Audio" (0x1203)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
      "RFCOMM" (0x0003)
        Channel: 10
    Profile Descriptor List:
      "Handsfree" (0x111e)
        Version: 0x0106
    
    Service Name: OBEX Phonebook Access ServerService RecHandle: 0x10006
    Service Class ID List:
      "Phonebook Access - PSE" (0x112f)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
      "RFCOMM" (0x0003)
        Channel: 19
      "OBEX" (0x0008)
    Profile Descriptor List:
      "Phonebook Access" (0x1130)
        Version: 0x0100
    
    Service Name: Network serviceService Description: Network serviceService RecHandle: 0x10007
    Service Class ID List:
      "Network Access Point" (0x1116)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
        PSM: 15
      "BNEP" (0x000f)
        Version: 0x0100
        SEQ16: 800 806
    Language Base Attr List:
      code_ISO639: 0x656e
      encoding:    0x6a
      base_offset: 0x100
    Profile Descriptor List:
      "Network Access Point" (0x1116)
        Version: 0x0100
    
    Service Name: OBEX File TransferService RecHandle: 0x10008
    Service Class ID List:
      "OBEX File Transfer" (0x1106)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
      "RFCOMM" (0x0003)
        Channel: 20
      "OBEX" (0x0008)
    Profile Descriptor List:
      "OBEX File Transfer" (0x1106)
        Version: 0x0102
    
    Browsing D0:57:85:21:51:94 ...
    Service Search failed: Invalid argument
    Nor do I see the directory or file: "/etc/bluetooth/rfcomm.conf" Although I did not really use

    Any help is greatly appreciated, thanks.

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    21,254
    Blog Entries
    1

    Default Re: Bluetooth serial port openSUSE 13.1

    I don't use bluetooth much so can only really offer general advice here. To get the serial bluetooth device node /dev/rfcomm* created, rfcomm first needs to be called to set up the serial subsystem. (Maybe udev was configured to automate this in the past.)

    Here is a tutorial which may be of help to you:

    http://www.mycrofters.com/content/bl...d-serial-ports

    You can ignore the wine advice towards the end, but it illustrates how to use a udev rule and simple script to get /dev/rfcomm0 created. You'll also need to create /etc/bluetooth/rfcomm.conf with the relevant configuration entries.

    You should also read 'man rfcomm' for more info.

    BTW, a quick search online also turned up this

    http://unix.stackexchange.com/questi...-port-on-linux

  3. #3

    Default Re: Bluetooth serial port openSUSE 13.1

    Thanks for your indications.

    I had already checked that everything was loaded.
    When I connect my USB Bluetooth adapter the last lines on RFCOMM are present:
    Code:
    > dmesg | grep Bluetooth
    [   20.517729] Bluetooth: Core ver 2.16
    [   20.517756] Bluetooth: HCI device and connection manager initialized
    [   20.517767] Bluetooth: HCI socket layer initialized
    [   20.517771] Bluetooth: L2CAP socket layer initialized
    [   20.517778] Bluetooth: SCO socket layer initialized
    [   20.762418] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [   20.762422] Bluetooth: BNEP filters: protocol multicast
    [   20.762433] Bluetooth: BNEP socket layer initialized
    [11670.377176] Bluetooth: RFCOMM TTY layer initialized
    [11670.377193] Bluetooth: RFCOMM socket layer initialized
    [11670.377195] Bluetooth: RFCOMM ver 1.11
    I'm using the same adapter for three different computers and the only one that does not work is the one installed openSUSE 13.1

    The problem seems to be with the services, I have noticed some differences:
    On openSUSE 13.1 there are some lines that say: "Service Search failed: Invalid argument" (You can see in my previous post).


    The "sdptool browse local" command returns: "Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory"

    Well, I found it is a bug that has not yet been solved for almost a year! I'll see if there is any alternative.

  4. #4

    Default Re: Bluetooth serial port openSUSE 13.1

    The problem supposedly solved with the argument "-- compat" in "Bluetoothd", but it did not work.
    Code:
    Process: 1263 ExecStart=/usr/lib/bluetooth/bluetoothd --compact (code=exited, status=1/FAILURE)
    Do not know if I modified the wrong file: "/usr/lib/systemd/system/bluetooth.service"

    sdpd is no longer used (is now integrated in blutoothd) and the sdp server is running, so that's not the problem.

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    21,254
    Blog Entries
    1

    Default Re: Bluetooth serial port openSUSE 13.1

    It's not clear to me what the problem is , and the bug report you linked to refers to bluez. (I don't have that installed anyway. Maybe you don't either.)

    If I do
    Code:
    hcitool dev
    I get the my bluetooth device reported
    Code:
    Devices:
            hci0    00:1E:37:B5:D4:B7
    With that hardware address, I can create /dev/rfcomm0 with
    Code:
    sudo rfcomm bind 00:1E:37:B5:D4:B7 /dev/rfcomm0
    Confirmed that the RFCOMM device node exists with
    Code:
    ls -l /dev/rfcomm0
    crw-rw---- 1 root dialout 216, 0 Apr 19 16:40 /dev/rfcomm0
    Where's the problem?

  6. #6

    Default Re: Bluetooth serial port openSUSE 13.1

    That's another way, first creating the rfcomm0 file, but when I try to connect does not work.
    After that command I try to connect using the computer too with my phone, result:

    Code:
    rfcomm connect 0 D0:57:85:21:51:94 #(0=hci0, D0:57:85:21:51:94=Phone)
    Can't connect RFCOMM socket: Connection refused
    The "sdptool add SP" command is now working, the correct parameter to pass bluetoothd is "--compat" or "-C"

    I must add that everything is working, even KDE Networkmanager has added the phone as an "PANU" red.
    I want to transmit data, such as a serial port.

    When I try to make the connection with the previous command or from my phone, the icon indicates a links and blutooth led flashes fast then disconnects.

    The connection I want to make is known as Bluetooth DUN - Bluetooth Dial-Up

    You can install on your phone a Terminal program to see if it is actually working as a serial port.

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    21,254
    Blog Entries
    1

    Default Re: Bluetooth serial port openSUSE 13.1

    Quote Originally Posted by luisdigital View Post
    That's another way, first creating the rfcomm0 file, but when I try to connect does not work.
    After that command I try to connect using the computer too with my phone, result:

    Code:
    rfcomm connect 0 D0:57:85:21:51:94 #(0=hci0, D0:57:85:21:51:94=Phone)
    Can't connect RFCOMM socket: Connection refused
    Yes, but without being familiar with your hardware, that could be due to a number of factors. For example, it might be that you need to send a PIN code first.


    The connection I want to make is known as Bluetooth DUN - Bluetooth Dial-Up

    You can install on your phone a Terminal program to see if it is actually working as a serial port.[/QUOTE]

    I'm interested in your progress, though I've never had need to do this and so not at all familiar with the process.

    You might try using 'bluetoothctl' to establish a connection:

    http://delx.net.au/blog/2014/03/blue...symbian-phone/
    Last edited by deano_ferrari; 19-Apr-2014 at 00:12.

  8. #8
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    21,254
    Blog Entries
    1

    Default Re: Bluetooth serial port openSUSE 13.1

    The "sdptool add SP" command is now working, the correct parameter to pass bluetoothd is "--compat" or "-C"

    I must add that everything is working, even KDE Networkmanager has added the phone as an "PANU" red.
    I want to transmit data, such as a serial port.

    When I try to make the connection with the previous command or from my phone, the icon indicates a links and blutooth led flashes fast then disconnects.

    The connection I want to make is known as Bluetooth DUN - Bluetooth Dial-Up

    You can install on your phone a Terminal program to see if it is actually working as a serial port.
    I'm sure you'll get this working, and when you do, I think it will be worthwhile writing up a 'how to'.

  9. #9

    Default Re: Bluetooth serial port openSUSE 13.1

    The device is already paired, so do not have to enter any PIN.

    What I try to do is something simple, I have years doing it, but now does not work in openSUSE 13.1
    Code:
    > sdptool add SP
    Serial Port service registered
    > rfcomm listen /dev/rfcomm0
    Oh, and yes, I have bluez installed (There are the files needed to use Bluetooth).

    The bluez-test package I have also installed.
    Code:
     rctest is used to test RFCOMM communications on the Bluetooth stack.
    rctest fails (waits a connection that never happens).

  10. #10

    Thumbs up Re: Bluetooth serial port openSUSE 13.1

    Finally I found the solution on Freenode talking with a developer.

    All commands must be executed as root.

    Code:
    sudo sdptool add SP
    sudo rfcomm listen /dev/rfcomm0
    Do not forget add "-C" or "--compat" in "/usr/lib/systemd/system/bluetooth.service" for backward compatibility.

    As annotations I'll leave the following information:

    Code:
    [15:30] <jhe> I think the permissions thing is just a difference between BlueZ 4.x and 5.x
    [15:31] <jhe> 5.x defaults to root-only
    [15:32] <luisdigital> Someday KDE will integrate the service into your GUI.
    [15:32] <jhe> it should then use the Profile D-Bus interface
    [15:32] <luisdigital>  For years the request was made.
    [15:32] <jhe> that's basically what is considered to supersede sdptool add
    [15:33] <luisdigital> Where I can find information to connect the serial port over Bluetooth using the modern way?
    [15:35] <jhe>  luisdigital: the D-Bus interface is documented in doc/profile-api.txt,  and test/test-profile shows how to implement it in python
    [15:35] <jhe>  luisdigital: however this all depends on how you intend to use it. if  you really need a TTY and a direct fd/socket is not acceptable then  you'd still need to stick to the rfcomm tool.
    [15:36] <jhe>  luisdigital: reason being that you get the RFCOMM socket through a  NewConnection() D-Bus call with the Profile interface. i.e. there is not  associated TTY device node.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •