All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
Subject: [PATCH v10 09/10] Bluetooth: Handle specific error for SCO connection fallback
Date: Wed, 14 Aug 2013 19:03:33 +0200	[thread overview]
Message-ID: <1376499814-11386-10-git-send-email-frederic.dalleau@linux.intel.com> (raw)
In-Reply-To: <1376499814-11386-1-git-send-email-frederic.dalleau@linux.intel.com>

Synchronous Connection Complete event can return error "Connection
Rejected due to Limited resources (0x10)".
Handling this error is required for SCO connection fallback. This error
happens when the server tried to accept the connection but failed to
negotiate settings.
This error code has been verified experimentally by sending a T2 request
to a T1 only SCO listener.

Client dump follows :

< HCI Command (0x01|0x0028) plen 17 [hci0] 3.696064
        Handle: 12
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 13
        Setting: 0x0003
        Retransmission effort: Optimize for link quality (0x02)
        Packet type: 0x0380
> HCI Event (0x0f) plen 4 [hci0] 3.697034
      Setup Synchronous Connection (0x01|0x0028) ncmd 1
        Status: Success (0x00)
> HCI Event (0x2c) plen 17 [hci0] 3.736059
        Status: Connection Rejected due to Limited Resources (0x0d)
        Handle: 0
        Address: xx:xx:xx:xx:xx:AB (OUI 70-F3-95)
        Link type: eSCO (0x02)
        Transmission interval: 0x0c
        Retransmission window: 0x06
        RX packet length: 60
        TX packet length: 60
        Air mode: Transparent (0x03)

Server dump follows :

> HCI Event (0x04) plen 10 [hci0] 4.741513
        Address: xx:xx:xx:xx:xx:D9 (OUI 20-68-9D)
        Class: 0x620100
          Major class: Computer (desktop, notebook, PDA, organizers)
          Minor class: Uncategorized, code for device not assigned
          Networking (LAN, Ad hoc)
          Audio (Speaker, Microphone, Headset)
          Telephony (Cordless telephony, Modem, Headset)
        Link type: eSCO (0x02)
< HCI Command (0x01|0x0029) plen 21 [hci0] 4.743269
        Address: xx:xx:xx:xx:xx:D9 (OUI 20-68-9D)
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 13
        Setting: 0x0003
        Retransmission effort: Optimize for link quality (0x02)
        Packet type: 0x03c1
> HCI Event (0x0f) plen 4 [hci0] 4.745517
      Accept Synchronous Connection (0x01|0x0029) ncmd 1
        Status: Success (0x00)
> HCI Event (0x2c) plen 17 [hci0] 4.749508
        Status: Connection Rejected due to Limited Resources (0x0d)
        Handle: 0
        Address: xx:xx:xx:xx:xx:D9 (OUI 20-68-9D)
        Link type: eSCO (0x02)
        Transmission interval: 0x0c
        Retransmission window: 0x06
        RX packet length: 60
        TX packet length: 60
        Air mode: Transparent (0x03)

Signed-off-by: Frédéric Dalleau <frederic.dalleau@linux.intel.com>
---
 net/bluetooth/hci_event.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 50e39f4..a8bb7bb 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2904,6 +2904,7 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev,
 		hci_conn_add_sysfs(conn);
 		break;
 
+	case 0x0d:	/* Connection Rejected due to Limited Resources */
 	case 0x11:	/* Unsupported Feature or Parameter Value */
 	case 0x1c:	/* SCO interval rejected */
 	case 0x1a:	/* Unsupported Remote Feature */
-- 
1.7.9.5


  parent reply	other threads:[~2013-08-14 17:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 17:03 [PATCH v10 00/10] sco: SCO socket option for voice_setting Frédéric Dalleau
2013-08-14 17:03 ` [PATCH v10 01/10] Bluetooth: Use hci_connect_sco directly Frédéric Dalleau
2013-08-14 17:03 ` [PATCH v10 02/10] Bluetooth: Remove unused mask parameter in sco_conn_defer_accept Frédéric Dalleau
2013-08-14 17:03 ` [PATCH v10 03/10] Bluetooth: Add Bluetooth socket voice option Frédéric Dalleau
2013-08-14 17:03 ` [PATCH v10 04/10] Bluetooth: Add constants for SCO airmode Frédéric Dalleau
2013-08-14 17:03 ` [PATCH v10 05/10] Bluetooth: Use voice setting in deferred SCO connection request Frédéric Dalleau
2013-08-16 18:47   ` Marcel Holtmann
2013-08-14 17:03 ` [PATCH v10 06/10] Bluetooth: Parameters for outgoing SCO connections Frédéric Dalleau
2013-08-16 18:47   ` Marcel Holtmann
2013-08-14 17:03 ` [PATCH v10 07/10] Bluetooth: Add constants and macro declaration for transparent data Frédéric Dalleau
2013-08-14 17:03 ` [PATCH v10 08/10] Bluetooth: Prevent transparent SCO on older devices Frédéric Dalleau
2013-08-16 18:45   ` Marcel Holtmann
2013-08-14 17:03 ` Frédéric Dalleau [this message]
2013-08-16 18:48   ` [PATCH v10 09/10] Bluetooth: Handle specific error for SCO connection fallback Marcel Holtmann
2013-08-14 17:03 ` [PATCH v10 10/10] Bluetooth: Add " Frédéric Dalleau
2013-08-16 18:55   ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376499814-11386-10-git-send-email-frederic.dalleau@linux.intel.com \
    --to=frederic.dalleau@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.