public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Problem automatic flush timeout
@ 2008-08-22  2:41 Jui-Hao Chiang
  2008-08-22 14:03 ` Jui-Hao Chiang
  2008-08-23 19:33 ` [Bluez-devel] [Patch] Flush Occurred Event Jui-Hao Chiang
  0 siblings, 2 replies; 5+ messages in thread
From: Jui-Hao Chiang @ 2008-08-22  2:41 UTC (permalink / raw)
  To: bluez-devel

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

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

end of thread, other threads:[~2008-08-23 21:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-22  2:41 [Bluez-devel] Problem automatic flush timeout Jui-Hao Chiang
2008-08-22 14:03 ` 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

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