Android BLE characteristic read/Write failed in Lollipop but worked in Kitkat - android-5.0-lollipop

As per title i am able to do read/write data successfully in below lollipop but in lollipop many times i am getting read/write fails.
this is how i am doing read/write data:
boolean isRead= getmBluetoothGatt().readCharacteristic(characteristic);
in lollipop devices i am getting isRead as false many times but it works perfectly on non lollipop os.
Does any one has faced such problem ? Answer will be greatly appreciated. Thanks.

One of the reasons could be some of the API calls defined in Android Kitkat (APIlevel 19) have been deprecated in Lollipop versions(API level 22) with updated and additional features.You can go through the developer portal
https://developer.android.com/about/versions/android-5.0.html#Wireless to know more.

I have two bluetooth devices that have problems on android Lollipop but both works fine on Kitkat. The two devices on Lollipop has different issues. The first device does not respond to device discovery after the the bluetooth gatt is connected and so the read characteristic won't work. The second device automatically disconnects from gatt server after it is connected to gatt and so it won't respond to device discovery and read characteristic as well. I was able to solve the issue on the first device by repeating device discovery with 2 seconds delay interval. But I have no chance to fix the problem on the second bluetooth device.
I am using Nexus 9.

Related

How to run Landscape oriented Web-Apps on the Tizen 3.0 Feb milestone under Crosswalk?

After creating a number of landscape-oriented Tizen Web Applications, and building and installing on the box with the Feb 1 Tizen release image using Crosswalk and other boxes with previous images of Tizen, I've discovered that web-applications on the February image will not launch successfully unless the weston.ini files are set to a transform of 90, or 'portrait orientation'.
I've been unable to get web apps to launch in landscape and I'm looking for clues. I have compared packages from the october image and a great many of them have changed. I get a timeout when launching with "xwalk-launcher". I have also attempted to launch with app_launcher.
Service 'org.crosswalkproject.Runtime1' could not be reached: Timeout was reached
I am able to launch these apps successfully in portrait orientation but not in landscape. If you have any ideas about where this problem could be, please let me know. I am looking to find which packages are responsible for the problem.
If you've gotten web-apps running in landscape orientation on HDMI on a VTC1010, how did you do it? Which packages did you change, add, or uninstall? What did you add to, or remove from your configuration files? How did you change your web-apps to counter this specific problem?
It is not possible to run Landscape oriented Web-Apps on the Tizen 3.0 Feb milestone under Crosswalk at this time.
The Crosswalk team at Intel have verified this as being a Tizen bug. The appropriate JIRA issue numbers are TC-2501 and XWALK-4115.
For more details: "I've been using the VTC1010 for testing. My primary choice for display output is HDMI. I have noticed that crosswalk isn't developed for multi-screen yet and I wonder if this could be part of the problem. I have been able to get the Landscape to work on VGA and this can help us move forward but our target is HDMI.
I have also been able to get Landscape to work on HDMI but only under the right conditions. When the VGA is connected the apps will launch on the VGA screen from the start. Once the VGA is disconnected apps will fail with the same error message. After reconnecting the VGA screen the apps will launch on the HDMI port.
It appears the VGA must remain connected. If you boot the box without VGA and just HDMI the apps won't start on boot. You cannot launch the apps by hand. You then connect the VGA display and the apps will launch on the HDMI display. I have found if you disconnect the VGA display the app will shutdown. This is some kind of hard dependancy on the VGA display for the VTC1010."
I believe the problem is in the fullscreen-shell.so.
I have a working fix going forward. Two changes are required for this to work.
remove the line in /etc/xdg/weston/weston-genivi.ini
shell=fullscreen-shell.so
Your apps will launch now but not in fullscreen. To correct this add --fullscreen to weston call.
Add a parameter --fullscreen to line in /etc/session.d/user-session.
weston -i0 --log=$XDG_RUNTIME_DIR/weston.log --backend=wayland-backend.so --fullscreen
I would like to know if there are any reasons for fullscreen-shell that I am not thinking of.

How to determine if Bluetooth is turned on on Windows Phone 8(.1)

My question is pretty much asked in the title. Is there a way how to find out programatically whether the bluetooth device on WP 8 is turned on? I know you can just start discovery service and if you do not get any peers, you assume BT is turned off. However, I am just dismayed that there is no straightforward property for this or maybe I missed it.
Did you try using the BluetoothConnectionStatus, to check the indication whether the Bluetooth is turned on?
Check these out:
Windows Phone 8 Bluetooth Error HRESULT: 0x8007271D
How to check status of bluetooth in Windows Runtime?

Can I share a file to other plateform (iOS or Android) via Bluetooth on WP8?

My WP8 app has some audio or videos, I'd like to share them with other plateform devices, such as iPhone or android devices. The first thing that comes to mind is Bluetooth. Can I realize this feature in my app? And how to do it? Thank you!
Sure you can do that, its the same like all file sharing apps do (whatsapp for Example) but your are about to do this using bluetooth connection, you just need to build a connection and transfer the file to the target device which should be able to open the file according to its format and the installed apps on the device.
I've worked with iOS Bluetooth extensively and the different ways you can share data over Bluetooth is by:
Using one of the Bluetooth profiles already supported by iOS: http://support.apple.com/kb/ht3647
Bluetooth LE (Core Bluetooth). I haven't used this, but the bandwidth and data structure of data being transmitted is limited, so it may not suit your purpose of sending audio and video.
Game Kit. This is for iPhone-to-iPhone data transmission though.
External Accessory Framework. This framework allows you to transmit raw data, but is only available to BT-enabled devices with special Apple authentication hardware (you have to join the MFi program and go all these hoops to get your device qualified). This doesn't work for you too, since you'd want to send data from WP8 or Android, which are definitely not MFi qualified.
So, bottom line, you CAN NOT send raw audio or video data from WP8 and Android to your iPhone unless you jailbreak the iPhone and put a new stack. iOS's BT stack is really limiting in that way, as I've learned the hard way.
On the bright side, you can definitely send raw data between Android and WP8 over Bluetooth. You have to create an RFCOMM socket on both ends (one sending; one listening). The Bluetooth profile used for this sort of data transfer is called a Serial Port Profile.

Serial Communication with iOS External Accessory (without authentication coprocessor)

It's my first question on stackoverflow. We're developing iOS external accessory under MFi program. (serial communication using lightning connector) However, we have some problems.
Background
We already completed device design and non-working mock ups
As a start-up, MFi certification was delayed (Finally we got it)
So, we've designed / developed PCB board without apple authentication coprocessor before MFi certification. (of course, we'll redesign with certified IC)
We have target demo day to potential clients. We don't have enough time to redesign with certified IC.
In this situation, we look forward to alternative ways
Without certified IC / authentication process, we completed iOS external accessory, anyway.
Jailbreak iphone 4/4S for serial communication with working mock-up (I found we can't jailbreak iphone5, so convert lightning connector to 30pin)
I need some advices that alternative way above is proper and possible way or not. I need your help :)
There is a quite a few differences between the 30-pin and lightning connector in how iOS communicates with external accessories. If you've already developed your firmware, switching to 30-pin may introduce problems. There is a jailbreak for iPhone 5 that was released a few weeks ago, but I'm not aware of any tools for it that allow you to fake to iOS's External Accessory framework that your accessory contains the authentication processor.
The ideal solution would be to redesign your PCB to include the authentication processor. You will have to do this anyway, and it may not take nearly as long as trying to hack iOS on a jailbroken phone.

Peer-To-Peer connection via WiFi

Is it possible ?
Peer-To-Peer connection via WiFi (same Access Point) , how would multiple devices talk on this layer.
Any API available or sources that can be looked into ?
Thanks
Yogurt
The Wi-Fi Alliance on Monday announced that its direct peer-to-peer networking version of WiFi, called WiFi Direct, is now available on several new WiFi devices. The Alliance is also announcing that it has begun the process of certifying devices for WiFi Direct compatibility.
Try researching the state of Bonjour / Avahi / Zeroconf on android. I'm seeing some pages that indicate people have made some progress for certain purposes but nothing like a generic howto or ready to use library.
Unless you know the IP address assigned to the other peer already, you'd have to somehow have devices inform other devices that they exist.
Are these devices definitely going to be on the same subnet? If so you can try messing around with having the devices send out 'broadcast' packets. I have no idea if the Android API lets actual applications receive these though.
The more reliable approach would probably be to run some centralised server somewhere that devices register with when they go online, and give their IP address when they register. Then they can query that server for which other devices are nearby and what their IP addresses are. If this is to be a central server out on the wider internet, then it means that unfortunately that the device discovery part isn't peer to peer - there is some privacy implication. Another thing if this is a central server is that you'll have to design the querying process to cope with NAT so that querying for other devices on your local network is restricted to the right network, but that you also get their IP address.