Dragonboard 410c mistaken as audio device


#1

Hello.

I’m trying to connect my android phone via Bluetooth to Dragonboard, in order to use it as a serial device.
However, it is recognizing the DB410c as an audio device.
Is there any configuration I could change in order to make my phone recognize it as a serial device?
The DB is currently working on Debian 8.0 OS.

Thanks in advance.


#2

Hello,

I’ve read this as you want to use the Serial Port Profile on the Dragonboard.

I have been doing some experiments with this using the Debian 8 & 9 releases. I did this with Python3 and my rough notes on what I did are at:

And was based on the BlueZ documentation at:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/profile-api.txt

Was this what you were looking for?


Kernel not supporting Bluetooth SPP?
#3

Hi!

Thank you for your brief response. Unfortunately, I was able to test your code only when I came home, at night.
Nevertheless, I tried, and nothing appeared to change, besides the board’s MAC address, that became quite weird. I’m uploading a print screen of the problem, so you can see what happened. Therefore, what should I expect, once I run the code?

Thanks in advance.


#4

Hello,

Apologies the notes were too brief for your needs. Let me try to give some more detail.

There are three broad steps that need to happen:

  1. The Dragonboard needs to advertise that it has capability of SPP available.
    (This is what the spp-profile python script does)
  2. The phone and the Dragonboard need to be paired
    (This is what you are doing with bluetoothctl)
  3. You connect from your phone to the Dragonboard
    (I’ve made the assumption that you have a phone application that is being the client)

Looking at your screen shots…

  • Bottom right:
    It looks like you have copied the script from your PC to the Dragonboard. This looks OK.
  • Top right:
    You have started the Python script that I had shared. Again, looks good.
  • Left hand side
    After a few false starts, right at the end I can see a change to the controller that adds the UUID ‘00001101-0000-1000-8000-00805f9b34fb’. This is good as this is the UUID for SPP. That means step 1 above has been successful.
    Just above that it seems like a device (20:D3:90:32:69:D1) which I assume is your phone attempts to connect and pair. As far as I can tell that was successful. So that is step 2 above done.

That just leaves you with step 3. Your phone needs to connect and send information. Any data that is sent from the phone should be printed to the screen by the “io_cb” python function which monitors the connection and reads any data that is sent over the “serial port”.
There is no functionality in my example to send information from the Dragonboard back to the phone.

What is the application on the Android phone?

Does that help?


#5

Thank you @barryb, for taking your time to help me, I really appreciate it. After running the spp-proline script, the default bluetooth management menu on my phone still showed the dragonboard as a media device (with a headphone icon), then I paired them as you could see and finally I tried to connect both, First I tried to use BlueTerm on my Android phone and it was unable to connect. When I used the default bluetooth menu to connect, the connection was “successfull” (But no log was shown in the spp-profiler, as I supposed it showed because the NewConnection method, or not?). I reopened BlueTerm and tried to send something but it showed that the phone wasn’t connect, I was able to transmit/reproduce audio files from the phone in the DB though… That controller address: 00:00:00:00:5A:AD is ok? If I run hciconfig -a the service classes are: Rendering and Capturing.


#6

Thanks for letting me know which app you are using. I’ll need to take a look as it looks like it is connecting to the console terminal. Not sure if that is standard practice for SPP.
Just to confirm this is the app you are looking at:

The apps I have been using with my SPP python code are:

And creating my own Android client app with MIT’s App Inventor:
http://pevest.com/appinventor2/?p=520

Is it actually connecting to the console that you want to do over Bluetooth?

To answer your questions:

When I used the default bluetooth menu to connect, the connection was “successfull” (But no log was shown in the spp-profiler, as I supposed it showed because the NewConnection method, or not?).

I think this means you are connecting but not with SPP

That controller address: 00:00:00:00:5A:AD is ok?

Yes this is fine.

If I run hciconfig -a the service classes are: Rendering and Capturing.

hciconfig is deprecated. A better way to do this is with bluetoothctl and the show command.
Would be interested in the output from bluetoothctl.

As some point you might want to remove the pairing information from your phone and Dragonboard and start again.
On the dragonboard you can remove the device using 'remove ’ with in bluetoothctl. To get the list of devices simply type ‘devices’


#7

Quick update: I’ve spent some time looking at the BlueTerm app this evening and I’ve been unsuccessful getting it to work with the Dragonboard.
It looks like BlueTerm was designed to work with the HC-05 & HC-06 modules. I think these modules were expected to be in slave mode and the request for connection comes from the phone in master mode. This is the same as I’ve documented with my python script. My suspicion is that after the connection the phone would be the server and the HC modules would be the client. This is other way around to how my python script is expecting things to work. I say suspicion because this is now starting to be on the periphery of my knowledge.
To help to debug, when you are attempting the connection you can run “sudo btmon” in a different terminal and watch the host control interface commands happening on the Dragonboard. These don’t mean a lot to me but I can see it that there is a brief Bluetooth connection but it never gets as far as trying to discover a SPP service.
This is probably as far as I am prepared to go with getting the BlueTerm app working with the Dragonboard.
If you are able to share what you are trying to achieve, I might be able to help you identify a different solution.


#8

Hello,
You can try “terminalBT”, it is a SPP terminal and you can send ASCII data either way. It can act either Client or Server. It depends who is connecting who.
You find it on Google Play aa well as APKPure. It is free no advertising.
Jean-Marc


#9

Thanks for the tip! I can connect and send information from terminalBT to the Dragonboard.


#10

Hey, guys!
It worked, and me and my partner were able to show it on our project in time!

Thanks a lot for all the help! :smiley:


#11

hello @rafaelacovello

can you please tell me what you mean by this 'mistaken as audio device ’ ?
as i am not able to run its audio ? can you please help .

Thanks in advance!!!


#12

Sorry @ren_snappy but I’m really confused. In the last three hours you’ve posted that:

  • your board doesn’t boot
  • you cannot get the display working
  • when you boot debian you cannot find any bluetooth icon on the
    display
  • that you are running android and cannot get adb to work
  • that you are have trouble following the board recovery instructions
  • that you can’t get audio to work in yocto/openembedded
  • that you can’t get GPS to work in debian
  • that you have hooked up a DHT11 but don’t know how to talk to it

I’m afraid this is simply too much for me to comprehend and your observations are spread across lots of fairly old forum topics which makes it difficult to connect the dots.

Please do not post any further on this topic unless the people you tagged above choose to engage in the conversation with you. In fact I think it is best that, for the next few days, you simply avoid replying to any existing topics.

Instead please start a new topic carefully describing the symptoms your observe and we will try to help.