2007-11-14 03:37:32

by John Sample

[permalink] [raw]
Subject: [Bluez-users] SCO Problem

I'm trying to create a headset device using Bluez running on an ARM system.
For some reason I still can't get dbus to start, so I can't use the hci
daemon. So as an alternative until i get that figured out I've been trying
to pull something together using scotest and hstest from the test directory
of utils. I can receive sco audio data just fine, but for some reason I
can't get any data to transmit. Is there any thing special I need to do
with the audio data before I write to the sco socket? I noticed the
following sequence number and length fields added in in scotest.c:


syslog(LOG_INFO,"Sending ...");

for (i = 6; i < so.mtu; i++)

buf[i] = 0x7f;

seq = 0;

while (1) {

*(uint32_t *) buf = htobl(seq);

*(uint16_t *) (buf + 4) = htobs(data_size);

seq++;

if (send(sk, buf, so.mtu, 0) <= 0) {

syslog(LOG_ERR, "Send failed: %s (%d)",

strerror(errno), errno);

exit(1);

}

usleep(1);

}
I tried adding those in but it didn't seem to make a difference. Am I
missing something else? Thanks in advance if you can help, this really has
me stumped.

--
John Sample


Attachments:
(No filename) (1.05 kB)
(No filename) (1.61 kB)
(No filename) (314.00 B)
(No filename) (164.00 B)
Download all attachments