2 Replies Latest reply on Sep 20, 2016 8:29 AM by kasjuszek

    Problem with adding bluetooth connection to PhoneGap


      I have issue similar to topic found on this forum, I'm trying to use the same don/BluetoothSerial library to connect my phone (Redmi Note 3) with PhoneGap app to atmega-based mobile robot. I've already programmed robot to move in response to received commands and tested on terminal application. Now I need to achieve this with mentioned plugin.


      I created default project, installed plugin with CLI and modified files: 

      Index.html: http://pastebin.com/8FA4DTtW

      Index.js: http://pastebin.com/ivbmMZPa

      config.xml: http://pastebin.com/mFdmr0Tv

      Then I performed cordova platform add android (I'm not sure if this was necessary in this case) :

      AndroidManifest.xml : http://pastebin.com/iNTXF1hh


      As I run the application from browser to check console logs, everything seems to be fine althought browser does not support bth:

      Received Event: deviceready

      (index):68 bluetoothSerial.connect: 98:D3:31:40:06:5C


      When I try to run this on PhoneGap Developer App, scripts are crashing and I do not receive neither success nor failure event. I would be very grateful if someone teached me how to call this function properly.


      Cordova version:

        android 5.2.2

        browser 4.1.0