Hi Pavan,
On Wed, Feb 18, 2009 at 9:31 PM, pavan savoy <[email protected]> wrote:
> Hi,
>
> I was surprised to see, bluetooth.c in bluedroid/ directory to find,
> access("/dev/ttyHS0... sort of code ?
> What does this mean ?
Do you mean this code?
/* TODO: Remove this once legacy hciattach is removed */
static const char * get_hciattach_script() {
if (access("/dev/ttyHS0", F_OK)) {
LOGD("Using legacy uart driver (115200 bps)");
return "hciattach_legacy";
} else {
LOGD("Using high speed uart driver (4 Mbps)");
return "hciattach";
}
}
This can actually be removed now. Thanks for reminding me.
>
> That every platform should name its high-speed UART port as /dev/ttyHS*, or
> else have a service named hciattach_legacy?
> It simply doesn't make sense.
No, it doesn't mean that at all. If you read the comment right above
that piece of code, it is clear that hardcoding ttyHS0 was a temporary
measure.
Having a service called hciattach is not too bad an abstraction - you
would actually run the bluez daemon hciattach for most Bluetooth
hardware.
>
> Also, assuming wifi.c & bluetooth.c are kind of performing the same set of
> functions ? why are their location so very different ?
>
> bluetooth is found under system/ project and wifi under hardware/libhardware
> project, wouldn't it be proper to move bluetooth to hardware/libhardware
> project so that, vendors can implement what they want & way they want to in
> bluetooth too, similar to wifi ?
No. WIFI and Bluetooth are quite different. In Bluetooth the host
software stack is almost identical for any hardware, because Bluetooth
uses a standard HCI protocol with the chipset. That is not the case
for Wifi, which always needs much more hardware dependent glue on the
host stack. If you can demonstrate a good reason to have a hardware
dependent libbluedroid then we would take a patch to add it, but you
haven't given any good reasons yet.
Nick
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---