I am writing an application on cordova. Need to exchange data between 2 devices via bluetooth. I found a lot of plugins, but I can not get them to work.

As I understand it, I’m not faithfully sending the UUID of the service with which I will work. But the actual question:

How to learn UUID? Or do you have to invent it yourself?

Calling code

var uuid = '00001101-0000-1000-8000-00805f9b34fb'; var address = '00:45:DA:B4:07:BF'; networking.bluetooth.connect(address, uuid, function (socketId) { alert('Success. ID - '+socketId); }, function (errorMessage) { alert('Connection failed: ' + errorMessage); }); 

The error that I get

 connection failed, socket might closed or timeout, read ret: -1 
  • What are your mistakes? Can I have a look at your code? - Tivyram
  • I get the error "connection failed, socket closed or timeout, read ret: -1" - Diefair
  • Add an error to the question. - Tivyram
  • added received error - Diefair
  • I ask for help with the question, I haven’t decided anything - Diefair

0