jump to navigation

Android Lessions Part 1: Bluetooth Crash January 4, 2012

Posted by Florian in Android, Source.
trackback

Finally – some free days for family and friends and to write a few lines which might be useful for someone else. Since Android started to become more and more interesting for industrial and business applications I got involved in some projects porting Android to several devices. It turned out that the documentation of the lower layers (hardware and driver adaptation) is very thin in contrast to the SDK and NDK documentation. But I took some notes working on these projects… this one might be useful for other people porting Android 2.3.x and experiencing issues with Bluetooth.

I ran into the issue that activating Bluetooth in the settings application resulted in a crash of the whole GUI. It seems that only ARMv5 core based devices are affected so that only a few people ran into this so far. (Not that it would be correct on more common cores used for Android devices such as ARMv7A, but it does not seem to cause the same effect.) The solution I found in the Android 4 commit log is quite simple for a problem causing that much of hassle:

--- a/core/jni/android_server_BluetoothEventLoop.cpp
+++ b/core/jni/android_server_BluetoothEventLoop.cpp
@@ -311,7 +311,7 @@ static int register_agent(native_data_t *nat,
{
DBusMessage *msg, *reply;
DBusError err;
- bool oob = TRUE;
+ dbus_bool_t oob = TRUE;

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: