From: Jui-Hao Chiang <windtracekimo@gmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] Problem automatic flush timeout
Date: Fri, 22 Aug 2008 02:41:55 +0000 (UTC) [thread overview]
Message-ID: <loom.20080822T022926-635@post.gmane.org> (raw)
Hi,
Is there a way to simulate unreliable L2CAP socket in a client-server scenario?
(two PCs, each with single adapter; client sends 48 bytes packet to server every
1 second)
After establishing a L2CAP between two adapters, I tried to set the "automatic
flush timeout" on the client adapter with timeout to be 2. The hci_send_req is
successful, but after 7 to 8 seconds, the server adapter stops to receive any
data while client socket is still sending data. If I set it timeout to 4, then
everything is fine.
What I am imagining is "some data on client adapter may be flushed, but the
later packet should continue to be sent to server adapter".
Am I doing something wrong?
// build a command packet to send to the bluetooth microcontroller
cmd_param.handle = connection_handle;
cmd_param.flush_timeout = htobs(timeout);
rq.ogf = OGF_HOST_CTL;
rq.ocf = 0x28;
rq.cparam = &cmd_param;
rq.clen = sizeof(cmd_param);
rq.rparam = &cmd_response;
rq.rlen = sizeof(cmd_response);
rq.event = EVT_CMD_COMPLETE;
// send the command and wait for the response
err = hci_send_req( dd, &rq, 0 );
if( err ) goto cleanup;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next reply other threads:[~2008-08-22 2:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-22 2:41 Jui-Hao Chiang [this message]
2008-08-22 14:03 ` [Bluez-devel] Problem automatic flush timeout Jui-Hao Chiang
2008-08-23 19:33 ` [Bluez-devel] [Patch] Flush Occurred Event Jui-Hao Chiang
2008-08-23 20:22 ` Marcel Holtmann
2008-08-23 21:13 ` Jui-Hao Chiang
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=loom.20080822T022926-635@post.gmane.org \
--to=windtracekimo@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox