public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] How to know the packet loss ratio of SCO socket
@ 2008-08-15 13:42 Jui-Hao Chiang
  2008-08-15 13:50 ` Jui-Hao Chiang
  2008-08-15 17:26 ` Marcel Holtmann
  0 siblings, 2 replies; 5+ messages in thread
From: Jui-Hao Chiang @ 2008-08-15 13:42 UTC (permalink / raw)
  To: bluez-devel

Hi, all:
as the title said, I am writing a simple server-client socket program for SCO
connection. While client is sending the SCO packet to server, it attaches a
sequence number to it. Then I want server to estimate the packet loss.
[Client program is as the following]
for (i = 0; i < 48, i++) buf[i] = 0x7f;
while (1) {
  *(uint32_t *)buf = htobl(seq);
  *(uint32_t *)(buf+4) = htobs(48);
  if (send(sockfd, buf, 48, 0) < 0) break;
  seq++;
  usleep(1)
}

However, on the server side, the data is total different, and I am not able to
get the sequence number (the hcidump -x also shows different data content as I
expect. Also, it's weird that the content is repeated)

Is this data encoded? or is there anyway to know the packet loss ratio of the
SCO connection?

Bests,
Jui-Hao


-------------------------------------------------------------------------
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

* Re: [Bluez-devel] How to know the packet loss ratio of SCO socket
  2008-08-15 13:42 [Bluez-devel] How to know the packet loss ratio of SCO socket Jui-Hao Chiang
@ 2008-08-15 13:50 ` Jui-Hao Chiang
  2008-08-15 17:26 ` Marcel Holtmann
  1 sibling, 0 replies; 5+ messages in thread
From: Jui-Hao Chiang @ 2008-08-15 13:50 UTC (permalink / raw)
  To: bluez-devel


> for (i = 0; i < 48, i++) buf[i] = 0x7f;
Sorry, just a typo, it should be (for i = 6; i< 48; i++)



-------------------------------------------------------------------------
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

* Re: [Bluez-devel] How to know the packet loss ratio of SCO socket
  2008-08-15 13:42 [Bluez-devel] How to know the packet loss ratio of SCO socket Jui-Hao Chiang
  2008-08-15 13:50 ` Jui-Hao Chiang
@ 2008-08-15 17:26 ` Marcel Holtmann
  2008-08-15 18:50   ` Jui-Hao Chiang
  1 sibling, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2008-08-15 17:26 UTC (permalink / raw)
  To: BlueZ development

Hi Jui-Hao,

> as the title said, I am writing a simple server-client socket  
> program for SCO
> connection. While client is sending the SCO packet to server, it  
> attaches a
> sequence number to it. Then I want server to estimate the packet loss.
> [Client program is as the following]
> for (i = 0; i < 48, i++) buf[i] = 0x7f;
> while (1) {
>  *(uint32_t *)buf = htobl(seq);
>  *(uint32_t *)(buf+4) = htobs(48);
>  if (send(sockfd, buf, 48, 0) < 0) break;
>  seq++;
>  usleep(1)
> }
>
> However, on the server side, the data is total different, and I am  
> not able to
> get the sequence number (the hcidump -x also shows different data  
> content as I
> expect. Also, it's weird that the content is repeated)
>
> Is this data encoded? or is there anyway to know the packet loss  
> ratio of the
> SCO connection?

SCO are voice connections and they are CVSD encoded. It is not a  
reliable data transport. Use L2CAP or RFCOMM for that.

Regards

Marcel



-------------------------------------------------------------------------
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

* Re: [Bluez-devel] How to know the packet loss ratio of SCO socket
  2008-08-15 17:26 ` Marcel Holtmann
@ 2008-08-15 18:50   ` Jui-Hao Chiang
  2008-08-18  5:10     ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Jui-Hao Chiang @ 2008-08-15 18:50 UTC (permalink / raw)
  To: bluez-devel

Hi, Marcel
> 
> SCO are voice connections and they are CVSD encoded. It is not a  
> reliable data transport. Use L2CAP or RFCOMM for that.
> 
> Regards
> 
> Marcel

I think you are right.
My original purpose is to test the voice quality when 12 SCO server-client pairs
are running in the same room (which means 12 small piconets contending the
channel, although each pair has its own frequency hopping pattern).

Is there any good way to gather the voice quality information? (actually I don't
know how to tell a voice qualify is "acceptable" to human ears. is there any
good references?)

Thanks,
Jui-Hao


-------------------------------------------------------------------------
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

* Re: [Bluez-devel] How to know the packet loss ratio of SCO socket
  2008-08-15 18:50   ` Jui-Hao Chiang
@ 2008-08-18  5:10     ` Marcel Holtmann
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2008-08-18  5:10 UTC (permalink / raw)
  To: BlueZ development

Hi,

> > SCO are voice connections and they are CVSD encoded. It is not a  
> > reliable data transport. Use L2CAP or RFCOMM for that.
>
> I think you are right.
> My original purpose is to test the voice quality when 12 SCO server-client pairs
> are running in the same room (which means 12 small piconets contending the
> channel, although each pair has its own frequency hopping pattern).
> 
> Is there any good way to gather the voice quality information? (actually I don't
> know how to tell a voice qualify is "acceptable" to human ears. is there any
> good references?)

I have no idea. However you will see interference if the devices are
close. SCO consumes a fixed amount bandwidth.

Regards

Marcel



-------------------------------------------------------------------------
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-18  5:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-15 13:42 [Bluez-devel] How to know the packet loss ratio of SCO socket Jui-Hao Chiang
2008-08-15 13:50 ` Jui-Hao Chiang
2008-08-15 17:26 ` Marcel Holtmann
2008-08-15 18:50   ` Jui-Hao Chiang
2008-08-18  5:10     ` Marcel Holtmann

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