Where can I find some documentation for BlueZ? - android

I am developing an android application for an embedded device that uses android 2.1. The bluetooth protocol stack is bluez. I cannot find any documentation related to bluez, and the source code is quite hard to read as it is not commented at all! There seems to have been a bluez wiki, but that site has been down for some time now...
Any help regarding where I might be able to find any help/documentation regarding how the bluez stack functions will be appreciated.
Thanks!

Actually not all Android devices use BlueZ stack as the underline bluetooth stack. It would be a good idea to stick with Android SDK bluetooth API if you want portability.
This being said, http://people.csail.mit.edu/albert/bluez-intro/ is a nice bluez tutorial.

Aniruddha, you may want to try using DBus Interface to invoke BlueZ APIs.

For the official BlueZ documentation you can obtain it from their git site:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc
For additional information you can visit BlueZ site: http://www.bluez.org/
Depending on the platform you're using you may need to use D-Bus. There are a lot of different D-Bus libraries depending on which language you're using. I will warn that using BlueZ directly has a high learning curve and requires some knowledge of the Bluetooth specification.
For Android I would recommend using the Bluetooth classes that are packaged with the Android Platform API if possible.

For Android application you should refer to the Android APIs.
http://developer.android.com/reference/android/bluetooth/package-summary.html
Application need not know the underlying BlueZ libraries and its functionalities

Related

SipApi not supported by some device

I am using native sip apis to implement sip calling in android app and it is working fine but in some devices like CANVAS 3 it was not working .After debugging I found this line of code was returning NULL
**manager = SipManager.newInstance(ctx);**
That measns that device does not support Sip Apis.But on the same device other application for sipcalling like SipDroid etc are working properly.How it is possible ?Are they do not use native sip Apis???
you can go with custom SipLibraries.
Third party open source sip stacks library for Android
Jain sip: http://jsip.java.net/
Pjsip: http://www.pjsip.org/
Mjsip: http://mjsip.org/mjua.html
Doubango: http://www.doubango.org/
There are different open source projects which have used these libraries in their projects.
Jain sip: Not used in a "famous" app.
Sipdroid uses MjSip
Csipsimple uses PjSip
Imsdroid uses doubango.
Open source SIP stacks: Android SDK's default implementation (API > 9)
Advantages : Documentation available. Easy to understand.
Disadvantages : Not all devices are supported due carriers restriction. Works on WiFi only. Can't change codecs.
Third party: JainSIP
Advantages : Oracle (Sun) project ==> Active development. Looks easier than MjSIP (more documentation).
Disadvantages : None
Android 2.3 using external JAIN-SIP(J-SIP) Stack | Classpath
Third party: MjSIP
Advantages : SipDroid is built on it. (source code available) (red5phone is another project)
Disadvantages : Not fully compliant with RFC?. Lack of tutorials (Javadocs available though).Development almost dead
Third party: Doubango framework
Advantages : IMSDroid is built on it. (source code available)
Disadvantages : Generated apk file size tend to be "heavy" (>15MB as mentioned here)
Followed from
Just to complement SilentKiller response I would forward my answer to this question but, please, keep in mind that choosing a stack is a quite complex task and depends of your goals and preferences.
Android SIP Stack relays on an old JAIN SIP version plus some extensions (IMS, supporting RTP, etc.). Main problem with this stack is that, in most devices, it only works via WiFi, no 3G or LTE (note that android.net.sip.SipManager contains method isSipWifiOnly to know if this limitation is enabled).
On the other hand, pjsip is quite complete, like they say, it's not a SIP stack but a full multimedia communications library. It's really versatile: you can use a huge number of configuration or just run it as a simple user agent. It works with any kind of data connection (not limited to WiFi).
Now the comparison: In my opinion, pjsip is more complete and versatile but more difficult to integrate with you project (with Android SIP Stack everything remains in the SDK environment while, with pjsip, you would need to use the NDK and a JNI library).
My opinion: If you plan to create a very simple SIP app and you don't mind the WiFi limitation, I think, the best would be using native SIP API but, if you plan to improve it and do something more "interesting", I would strongly recommend pjsip. I've used both JAIN SIP and pjsip and, again, my vote goes for psip. But this is just my opinion.
There's also another third party stack that worths checking: Linphone. It is also integrated into your project with a JNI (like pjsip) and is also quite complete but, maybe, a bit more complex and heavy.
Hope this helps.

how can we implement CAN Application Layer(CAL) protocol in iphone/android

I need to interface a device which is supporting CANBus ,So for communication with that I need to follow CAL,So can any one help that ho can I implement
CAN Application Layer(CAL) protocol in iphone/android .
Please help i am not getting any way to solve it
"I need to interface a device which is supporting CANBus ,So for
communication with that I need to follow CAL"
The second part of that statement doesn't follow necessarily from the first. There are plenty of devices and systems that communicate via a CAN bus that don't use a formal higher level application framework.
First, you need to be able to communicate with the can bus from your application. Your mentioning iphones suggests you'll be targeting consumer handsets, none of which will have a CAN interface. So you need to incorporate some adapter hardware (there are usb adapters, and android at least has usb hardware access baked into the SDK).
If you do then also need to communicate with components that implement a higher level application framework like CANopen on top of the CAN layer, your options are:
Get your hands on the specification from whatever group maintains
it, and implement it in your language and framework of choice. This is likely a substantial effort.
Purchase or find an open source implementation. If you purchase the source code for a C implementation, you can compile it into a shared library for your target architecture, and, using android as an example, write a native wrapper for that shared library using the Android NDK to expose it to your java code. If you could purchase the source code for a java implementation, you might be able to port it so that it works natively on android.
Then you need to glue the data layer together with the application layer, and this will likely be custom development no matter what.
You need the hardware to support it. I've found Gwentech's GT1026 to work well for can bus to android, but it only works on Android using USB.

SipManager.isApiSupported() and SipManager.isVoipSupported() returning false

Is there any configuration to enable VOIP on device? Or these methods really show that my device does not support VOIP?
I think this is a little late to answer, but after a lot of searching, I reached the fact that you are supposed to use any SipStack, because as explained here:
Fusion SIP source code is specifically designed for use in embedded
devices, has a small footprint and is completely ROMable and
re-entrant. The Fusion SIP stack provides a simplified API for easy
integration with the application and transport stack (TCP/IP/UDP).
and when talking about android specifically, as explained in the answer of this question:
All Android devices, which can connect to the Internet, support SIP.
After all SIP is just a protocol which requires connection to the
Internet, and it's very similar to HTTP.
In order to work with SIP, you need SIPStack implementation - doesn't
matter if it's 3rd party or it comes from Android API.
and about examples of SipStacks that can be used, you will find a punch of them like PJSIP and Doubango, and all exists in this question.

Implemenation of SIP on android platform 2.1

I want to work on SIP and Android. I am supposed to make it possible for two users to call eachother using iptel.org. One way to do this, I can use the demo provided with 2.3 but it needs a real device. As I don't have a real device, I wan't to work at 2.1 platform. I am a beginner, so I need a good step to start so that it would be easy for me to complete it.
PJSIP ( http://www.pjsip.org/) is a good and portable SIP framework. It doesn't still have support for android (even if it is just a matter of time) but you could check out this : http://code.google.com/p/csipsimple/ that is android SIP support built on PJSIP.
Android 2.1 doesn't have built-in support for SIP so you have to find a third party library.
JAIN-SIP http://jsip.java.net/ is also a very good SIP-Stack including a reference implementation of the SIP API.
It works on great on Android <= 2.2.
Here's (http://groups.google.com/group/mobicents-public/browse_thread/thread/e38fbdd874083d49/4fdb4123419e7a74) a nice discussion with further information.

android bluetooth

Can someone explain to me the concept behind using bluetooth?
My project in my studies is to make an android app using bluetooth, SQLLIGHT and google app
the app itself is a very easy one but I just dont get the tools I need to use :
How does the bluetooth works? Is there a simple example?
the concept behind android GUI (I already made one but I think I am not fully understood his power)?
note : I am using v 2.1
For learning bluetooth on android I guess you should dig into: http://developer.android.com/guide/topics/wireless/bluetooth.html
Should be simple.
Before you learn to program Bluetooth with API on a given platform, you need to read up a few basics first to understand the technology first. There are plenty of resource materials on internet for learning. If you prefer a book, you can try http://www.amazon.com/Bluetooth-Operation-Use-Robert-Morrow/dp/007138779X

Categories

Resources