Skip to contentSkip to conversation

How to know the packet loss ratio of SCO socket

Bluez-devel Jui-Hao Chiang 2 participants 5 messages Aug 15, 2008 – Aug 18, 2008 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#1 lore raw
Quoted 2 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#2 lore raw
In reply to Jui-Hao Chiang

Hi Jui-Hao,

Quoted 21 lines

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)

Quoted 3 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw

Hi, Marcel

Quoted 7 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#4 lore raw

Hi,

Quoted 11 lines
Quoted 2 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel