Author Topic: Unable to connect with Android App  (Read 2906 times)

Birdman

  • Newbie
  • *
  • Posts: 5
    • View Profile
Unable to connect with Android App
« on: April 12, 2014, 07:19:49 AM »
Hi all  :D

I am after a bit of help re my Balanduino App on my Huawei phone. I have managed to prove my Balanduino works (Wahooooo) and balances and can be controlled  with my Wii controller, but only after replacing the Bluetooth dongle with an ver 4 Bluetooth it now syncs no problem. I have loaded the latest Balanduino firmware without any hitches.
But my phone app refuses to work, I can find the Balanduino under Bluetooth search and find I can enter the 0000 code and it inform me I am paired, but when I run app and try to connect it searches for a minute then comes back and says unable to connect. Any clues to where I can look next.

Birdman   :)

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: Unable to connect with Android App
« Reply #1 on: April 13, 2014, 06:44:18 PM »
Hi Birdman,

Good to hear you got it working! We are aware of the problems with the Bluetooth dongles and will fix it ASAP.

Please enable debugging in the USB Host library: https://github.com/felis/USB_Host_Shield_2.0#enable-debugging and then try to connect again. This will allow me to see what is going on.

Regards
Lauszus

Birdman

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Unable to connect with Android App
« Reply #2 on: April 14, 2014, 02:32:36 AM »
Hi Lauszus

After enabling debug I get the following message while trying to connect phone app.

Bluetooth Dongle Initialized
HCI Reset complete
Write class of device
Local Bluetooth Address: 00:15:83:3D:0A:57
The name is set to: Balanduino
Wait For Incoming Connection Request
Incoming Connection Request
Remote Name: Y320-U151
Connected to Device: D0:2D:B3:DD:6A:BD
SDP Incoming Connection Request
SDP Successfully Configured
Wait For Incoming Connection Request
HCI Disconnected from Device
Wait For Incoming Connection Request

It looks as if the Host controller interface is disconnecting for some reason.

Hope that gives you an insight to the problem.

Regards Birdman

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: Unable to connect with Android App
« Reply #3 on: April 14, 2014, 06:54:27 PM »
Sorry I forgot to tell you that you should enable EXTRADEBUG, by uncommenting this line: https://github.com/felis/USB_Host_Shield_2.0/blob/master/SPP.cpp#L20.
Please do that and then post the output again.

Regards
Lauszus

Birdman

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Unable to connect with Android App
« Reply #4 on: April 15, 2014, 02:49:45 AM »
Hi Lauszus

I could only get it to send info if I  uncommented both these lines

//#define EXTRADEBUG // Uncomment to get even more debugging data
//#define PRINTREPORT // Uncomment to print the report sent to the Arduino
 
and the following is what is printed out


Bluetooth Dongle Initialized
HCI Reset complete
Write class of device
Local Bluetooth Address: 00:1A:7D:DA:71:08
The name is set to: Balanduino
Wait For Incoming Connection Request
Incoming Connection Request
Remote Name: Y320-U151
Connected to Device: D0:2D:B3:DD:6A:BD
L2CAP Connection Request - PSM: 00 01 SCID: 00 40 Identifier: 05
SDP Incoming Connection Request
SDP Successfully Configured
Unknown PDU: 02
Wait For Incoming Connection Request
HCI Disconnected from Device
Wait For Incoming Connection Request
Incoming Connection Request
Remote Name: Y320-U151
Connected to Device: D0:2D:B3:DD:6A:BD
L2CAP Connection Request - PSM: 00 01 SCID: 00 40 Identifier: 07
SDP Incoming Connection Request
SDP Successfully Configured
Unknown PDU: 02
Wait For Incoming Connection Request
HCI Disconnected from Device
Wait For Incoming Connection Request

Regards  Birdman


Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: Unable to connect with Android App
« Reply #5 on: April 17, 2014, 03:58:22 PM »
For some reason your phone is using a different PDU and not the default for SDP. It's hard for me to figure out how to fix it when I don't have the device. I'm planning to do some modifications to the SPP library and then I will look into this as well.

Regards
Lauszus

Birdman

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Unable to connect with Android App
« Reply #6 on: April 21, 2014, 03:52:24 AM »
Hi Lauszus

Just a happy follow up to my story is I borrowed my daughters Android Samsung phone loaded Balanduino app and it was able to control and communicate with it. One happy chappy here. I now have in the pipeline an Ainol NOVO 1.2GHz 16GB Bluetooth WiFi Android Tablet coming and we shall see how that goes.

Regards Birdman  :)

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: Unable to connect with Android App
« Reply #7 on: April 21, 2014, 11:36:13 PM »
Hi Birdman,

Awesome to hear you got it working! :)
I'm looking into the issue with the SPP library right now, so hopefully I will figure out how to connect with your old phone as well in the next couple of weeks.

Regards
Lauszus