Android bluetooth: Device specific connection issues - android

The problem is the following: I'm working on an Android project at the moment that involves the connection of two Android devices. I've got the connection and data transfer working with the guidelines of http://developer.android.com/guide/topics/connectivity/bluetooth.html but my application only works with two specific devices, the Sony Xperia LT22i (Android 4.0.4) and the Samsung Galaxy S Plus (Android 2.3.6).
When I try it on other Smartphones, they can successfully connect and they receive the test-byte '1', with which I check if the connection is working. But when the actual data transmission starts, they don't receive anything and there is no Exception thrown.
I can add the code if needed, but it's the same as on the mentioned Android Developers page, with a few app-specific changes. Has anyone had this problem or knows how to fix it? Thanks in advance.

Related

LG Velvet Ble issues - Disconnects with Error 133/8 soon after connecting

We have a custom hardware product that uses bluetooth to communicate with an Android application.
Recently we have been getting reports of issues by users that use LG Velvet phones (LM-G900EM). We bought a Velvet and tested it ourselves. The phone will connect to the device, do a service discovery and then disconnect with an error. Usually codes 133(0x85) or 8(0x8).
To verify the issue we connected using the Nordic NRF Connect app instead of our own code. The behaviour is exactly the same.
Attempting the exact same actions on other phones all work perfectly, including other phones running the same version of Android (10) and the same Bluetooth version (5.1) as well as iPhones.
I'm not sure where to even begin addressing this issue. Does anyone have any insight?
This also seems to be an issue on some of the newer ThinQ series phones from LG though we do not have one to verify.
The issue turned out to be the Bluetooth firmware on our hardware. We use Microchip Technology microcontrollers and Bluetooth chips. Upgrading to version 1.4.1 of their firmware fixed the issue.
Apparently this issue also affected certain Xiaomi phones.

Android 6 / Samsung network issue

I've developed an Android app for remote controlling some special hardware devices. The communication is done via udp and wifi. The app already runs on ~60k devices without any problems but since the rollout of Android 6 I'm getting more and more reports from users who get some strange errors:
Usually the app searches for the hardware with a broadcast package. The app then requests all data from the hardware to stay in sync (~4000 packages in both directions). This sync process is heavily tested with all wifi conditions possible and does work as intended (also on Android 6).
User with a Samsung device and Android 6 are now having the issue, that the sync is unable to complete (no reply from the hardware within 20 seconds). The odd thing is that the broadcast search does work just fine, as well as the beginning of the sync. Usually the timeout happens when 5-15% of the sync was completed.
As I have no idea what could cause this issue I wanted to ask if there is any known problems with Samsung / Android 6 and udp communication via wifi?
Also were there any other changes on the network stack in Android 6 that could cause this issue? On my test devices (HTC mostly) everything runs fine so I'm currently out of ideas.
Edit:
I narrowed the issue down to the following devices:
Samsung Galaxy 6
Samsung Galaxy 6 Edge
Samsung Galaxy Note 5
Edit 2:
I got a Samsung Galaxy 6 device for testing purposes and of course it does work for me. I also tried all sorts of network setup, power saving, anti virus and general settings combination but it's just working all the time.
Edit 3:
After getting some Galaxy S5 and S6 test devices I was not able to reproduce the problem. Comparing the ROM version I found out that these devices all have a newer rom than the devices which got the issues.
Turns out that Samsung simply broke something in their wifi stack which causes the wifi to stop working properly after some udp packages. So only fix for this issue is to wait and hope they fix it in all countries soon.

android multicast on several devices

I am doing multicast in my android apps and I have some troubles like most of people ;-)
I have created an android application which listens for multicast.
It works fine on 2 phones and one tablet (Samsung S2 & S3 and Motorola). The problem is with an Asus tablet. When I launch the application only on this device, I can receive data via multicast but when I launch the app on another device I cannot receive anymore data on the Asus but it works on the other.
I read somewhere that some tablets don't support completly multicast but I don't really understand the meaning of "not completely".
Can anyone help me on this issue?
I will perform several test with another asus and an acer tablet next week to see if it works.
Thanks.
Anthony

Android 2.3 vs 2.2.1 Bluetooth

Can anyone tell me if there have been any changes to the bluetooth functionality in the Android update?
I have an app which uses transmission and reception concurrently with a total of 5 connected devices and this works perfectly on a Motorola Droid2 with 2.2.1 but not on the ATRIX running 2.3
There may of course be a hardware element involved but I wanted to establish this first.
thanks in advance.
John
I had the problem that the bluetooth connection worked only on the second try - the first one almost always fails internally (IOException). And you don't have much time in between trials. This was on my 2.3.3 Sony phone. Logcat showed some messages that might imply an internal problem in bluez or with the bluez/java integration.
This problem did not manifest on a 2.2.x Samsung phone. Note that my program only uses one connection at a time.
Android website says "updated BlueZ stack", but that's all.
Did you check the logs, what are the errors you're getting?
Also, I guess you can try running different emulators with different versions of Android and see how that behaves.

Multiple apps connect to bluetooth issue

I have 2 applications w/ the bluetooth code derived from the Bluetooth Chat sample. Individually they work fine. Each app connects via SPP to separate devices. The issue I'm having is on phones with Android 2.1, after the first app connects to its device, you can press Home and get to running the other app, but as soon as the connection is made to the other device with this other app, both apps get the "Sorry! The application xyz (process com.xyz) has stopped unexpectedly. FORCE CLOSE" dialogs. There are try/catch blocks throughout the bt code, for which the catches are not executed. Neither app will then connect (individually) until after bluetooth is turned off then on again. This does NOT happen when these same apps are running on a Samsung tab with Android 2.2 - both apps can run and connect to the devices simultaneously just fine and you can switch between the apps, no problems.
Is this specifically an Android 2.1 issue or something else? Whether it is or not, I need some way to prevent the app from connecting if another app is using bluetooth. I couldn't find anything in the Android APIs that would allow finding this out. Is there any way to coordinate/manage this? Does anyone have any specific insights into this whole issue?
I think it is a bug in the samsung bluetooth stack.
upgrading the my samsung to cyanogenmod fixes it.
see this link
http://www.samsunggalaxysforum.com/firmware-problems/connection-problems-sgs-bluetooth-spp-device/

Categories

Resources