Iain Hibbert
Tue, 15 Dec 2009 11:36:51 -0800
Hi, While obexapp is the subject, I wonder what kind of transfer speeds people get? Normally I use obexapp to copy files to and from my phone but they are not much big files and I've never bothered with speed tests.. I have been working some long hours at a tedious job lately and thought I would listen to some music off my phone.
However, transferring tracks is tedious. I have calculated (see attached program) that I'm getting about 12-15 kbytes/second by using windows mobile bluetooth explorer in suck mode (navigate to my laptop, then copy and paste the directory to the sd card) using obexapp to push files seemed to go faster, about 15-20 kbytes/second initially but obexapp doesn't handle sending complete directories so I had to write a wrapper script and then when I left this going overnight it only transferred about 15 tracks (I think a resource leak in the phone, which needed a reboot afterwards) So, my question is what kind of speeds should we normally expect with OBEX? I thought bluetooth should be faster than that but I don't really know what version my phone has (laptop has Broadcom BCM2045B 2.0+EDR and specs I found on the web says HTC Elf has 2.0 but I don't know about EDR) and I only have a single computer so while a speed test would be possible with two dongles, there could be interference in the stack. Has anybody done anything like that in the past? I read some comments previously on the list and have raised the MTU to 8192 bytes as suggested for an older obexapp but that hasn't improved the speed much. Any other ideas? regards, iain
#include <bluetooth.h>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
const char *dev = "ubt0";
int
main(int ac, char *av[])
{
struct bt_devinfo di;
uint32_t c, r, s, dr, ds;
if (ac > 1) {
dev = av[1];
ac--;
av++;
}
if (ac > 1) {
fprintf(stderr, "usage: %s [device]", getprogname());
exit(EXIT_FAILURE);
}
c = 0;
r = 0;
s = 0;
for (;;) {
if (bt_devinfo(dev, &di) == -1)
err(EXIT_FAILURE, "%s", dev);
if (c++ == 0) {
r = di.bytes_recv;
s = di.bytes_sent;
}
dr = di.bytes_recv - r;
r = di.bytes_recv;
ds = di.bytes_sent - s;
s = di.bytes_sent;
fprintf(stdout, "\r%u recv, %u sent ", dr, ds);
fflush(stdout);
sleep(1);
}
exit(EXIT_SUCCESS);
}
_______________________________________________ freebsd-bluetooth@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth To unsubscribe, send any mail to "freebsd-bluetooth-unsubscr...@freebsd.org"