mardi 7 juillet 2015

Bluetooth Interference

I'm currently developping an Android application which use Bluetooth, not Bluetooth LE.

I'm trying to connect with Samsung galaxy S4 to a custom Android device, with insecure connection.

Android has set a kind of the security on the method "createInsecureRfcommSocketToServiceRecord(UUID uuid) " so i've to use reflection on the method "createInsecureRfcommSocket(int port)" (http://ift.tt/1glqU1M).

I try to connect to my device but i've this log message :

read failed, socket might closed, read ret: -1

I noticed connection failed when many bluetooth device are around, so here are my questions :

Is the choice of port important when i create socket ? What is it used for? I noticed only port number 3 and 4 works when there is no interference.

Are there solutions to prevent interference ?

Thx.





Aucun commentaire:

Enregistrer un commentaire