From: Brad Midgley <bmidgley@xmission.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] emporia/mega-Headset and btsco problems
Date: Sun, 03 Jul 2005 02:35:16 -0600 [thread overview]
Message-ID: <42C7A344.4060700@xmission.com> (raw)
In-Reply-To: <20050703004746.45b60662.andy.boehler@gmx.at>
maybe something like this... i wish the whole thing wasn't such a big
ugly function...
diff -u -b -B -w -p -r1.28 btsco.c
--- btsco.c 17 Jun 2005 15:57:42 -0000 1.28
+++ btsco.c 3 Jul 2005 08:27:12 -0000
@@ -80,7 +80,7 @@ struct action {
char *cmd;
};
-static volatile int terminate = 0, ring = 0, hupped = 0, reconnect = 0;
+static volatile int terminate = 0, ring = 0, hupped = 0, reconnect = 0,
rfreconnect = 0;
static int verbose = 0;
static void sig_term(int sig)
@@ -589,6 +589,8 @@ int main(int argc, char *argv[])
sigaction(SIGCHLD, &sa, NULL);
sigaction(SIGPIPE, &sa, NULL);
+ do {
+
/* connect rfcomm control channel */
if ((rd = rfcomm_connect(&local, &bdaddr, channel)) < 0) {
perror("Can't connect RFCOMM channel");
@@ -682,6 +684,7 @@ int main(int argc, char *argv[])
fflush(stdout);
}
terminate = 1;
+ rfreconnect = 1;
}
// control transmission events for volume and
channel control
@@ -890,6 +893,11 @@ int main(int argc, char *argv[])
hupped = 0;
}
}
+ if(rfreconnect) {
+ rfreconnect = 0;
+ terminate = 0;
+ }
+ } while(!terminate);
if (sco_mode == CONNECTED) {
close(sd);
Andreas Böhler wrote:
> Hi, thanks for the quick reply;
>
>
>>One thing we have needed to do for a long time that would help this is
>>to rebuild the rfcomm connection when it goes bad (or even make it
>>happen on demand). With other headsets, the rfcomm connection only goes
>>bad if the headset goes out of range. Holding the rfcomm connection open
>>isn't great anyway because I think it prevents a laptop from suspending.
>
>
> yeah, the best way to handle my particular headset would be if btsco reconnects the rfcomm-channel after it is lost!
> May I ask someone if it is possible to supply such a patch? I would really do it myself, if I had the necessary C-skills....
>
> thanks,
>
> andy
>
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2005-07-03 8:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-02 15:26 [Bluez-devel] emporia/mega-Headset and btsco problems Andreas Böhler
2005-07-02 21:26 ` Brad Midgley
2005-07-02 22:47 ` Andreas Böhler
2005-07-03 8:35 ` Brad Midgley [this message]
2005-07-03 16:02 ` Andreas Böhler
2005-07-04 3:29 ` Brad Midgley
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=42C7A344.4060700@xmission.com \
--to=bmidgley@xmission.com \
--cc=bluez-devel@lists.sourceforge.net \
/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.