Adding Bluetooth module

Hardware Support for the 9XR Pro
User avatar
mnementh
Posts: 156
Joined: Tue Mar 05, 2013 4:22 pm
Country: -

Re: Adding Bluetooth module

Post by mnementh »

michel49 wrote:Well, mistake, this is pin34; in fact I don't know the default parameters of the module I purchased...
OK... Let's start with the basics.

For sure is it an HC05 or HC06?


mnem
*Blue-toothsome*

michel49
Posts: 192
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: Adding Bluetooth module

Post by michel49 »

When it appears on the BT menu of my phone it is named "05", is that true ?
michel49
Posts: 192
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: Adding Bluetooth module

Post by michel49 »

OK, that works, but I don't understand why 115200....

Thanks for advice

MP
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

As I understand it, you can run whatever baudrate you like to these BT modules. It doesn't even need to be the same at both ends, just seems to work as long as you don't send data faster than the slower baudrate.
For both the 05 and the 06, when you switch on, the firmware finds what baudrate the module is using, then changes it the the baudrate you have selected in the menu.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Right, I'm just about to install another HC-05 bluetooth module on my other radio with a skyboard and erky9x. That means I will have two radios with bluetooth. One killer feature that would really be a good reason to install a BT module in the radio would be the possibility of having a teacher/student trainer system over BT. Would this be possible with 2 HC-05 or a 05 and a 06?? What are the possibilities? I guess one would have to be configured as Master and the other as Slave.. Can the HC-05 be programmed as master or slave using the "Erase" connection?
Can't wait to start testing this. It will really be an excellent addition to the features.. Not many radios on the market, if any, have BT trainer capability?? :) ;)

Thanks

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

The theory is that the "erase" connection does allow setting the BT module to master or slave.
It even looks like I have the code in to configure the module, but nothing to actually call it, another "work in progress"!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Can't wait ;) :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Mike what pin should go to the erase pin o the radio? RN? Or state?
Thanks..

João
Image

Image
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

STATE looks to be an output, so RN would be my best guess. The HC-05 I have, has a pin labelled KEY.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

yes, I bought 2 types. 2 equal and this one that is different.. I got it to pair with the computer, but when I try to select com 16 from eepskye, it says the com port is not available.. I'm connecting to the RN pin.. Did try to change the baudrate to 57600. I don't know if it did or not..
Don't know why the com is not available? maybe it is not connecting to eepskye?

Thanks

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

Try LONG UP from the main screen, then RIGHT to STAT2. You should have a line on there that says:
BT Reply(debug) then a number. What is that number?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Sorry, just came from the field.. The BT Reply(debug) shows always zero no matter what I do..
Thanks for your help
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Update.. I'm able to connect to the BT if I remove the RN wire..
If I connect the RN wire, the led just goes dead and I'm not even able to connect it to my phone..
If the RN wire is connected to the radio, when I power t5he tx on, the LED flashes for a little while an then goes off.. BT won't work then.. Disconnecting the wire brings it back to life..
Maybe I should try the HC-06 now..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

Seems like it isn't an HC-05 as such!
Have you any data on it?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Adding Bluetooth module

Post by Kilrah »

It's totally possible the Chinese put the HC-05 module on the same carrier board than the HC-06, and the required pin isn't actually available on the connector.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

iT pairs as a 05.. If I press the little push button at power up, the led blinks differently as it was waiting for info I would say.

On the erase plug, which one is the erase wire? top or bottom?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

I think I got it to work Mike.. I might have connected the RN wire to the wrong side of the connector.. connected to the other pin and I have trainer from eepskye.. Sorry for being dumb.. :( Now to sort the other problem ;)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

General info. you want BT Reply(debug) to show a 1 if it is working.

I've just been looking at my HC-05 setup on the 'scope. It looks like there is a problem. At startup, I try the selected baudrate, and expect to get an "OK" back. If I don't, I cycle through the baudrates looking for an "OK" response. It seems that trying a lower baudrate test causes an error response when the actual baudrate is tried instead of "OK", so I never see the "OK".

I'll need to improve the response checking!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

MikeB wrote:General info. you want BT Reply(debug) to show a 1 if it is working.



Mike.
I didn't check for that now Mike, but it is working,. I managed to connect eepskye to the radio and receive a trainer signal.. Good to klnow though. Thanks for your help.. ;)
Now we need a nice menu where we can insert a pairing code to connect to another BT module :mrgreen: :mrgreen:

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Philipp
Posts: 122
Joined: Sat Jan 11, 2014 9:01 pm
Country: -

Re: Adding Bluetooth module

Post by Philipp »

I like the way this is going, especially since these innovative features usually trickle down to openTX after some time :D
A bluetooth configuration menu sound very nice, I'll wait patiently :D :D
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

One of the advantages of using er9x/ersky9x is that you always get them first :) :mrgreen:
As far as I'm concerned, I love testing these things :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
SkyNorth
Posts: 958
Joined: Tue Dec 27, 2011 11:40 am
Country: -
Location: Mansfield , Ontario

Re: Adding Bluetooth module

Post by SkyNorth »

I found these WiFi modules
http://www.seeedstudio.com/depot/WiFi-S ... -1994.html
These would be really cool to integrate...and the price is great
They have "Ping" range tests out past 450m

-Brent
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Well, it seems faster than Bluetooth? Could we do a trainer system between radios using it?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Philipp
Posts: 122
Joined: Sat Jan 11, 2014 9:01 pm
Country: -

Re: Adding Bluetooth module

Post by Philipp »

Well, now you got me thinking if I could use my trusty Nvidia Shield Portable as an uber FPV monitor and gimbal controller for my quad. Would be awesome to have a friend operating the gimbal with it while he can watch the video feed on its screen. This could even double as an DVR on the ground. Offtopic, I know. But hey, bluetooth trainer does not necessarily have to be limited to radio-radio only, radio-android / radio-computer could be done later aswell :D I need to get hold of some composite video usb grabbers and try out if i can get the video feed on android :geek:
[thumbnail]http://androidos.in/ces-2013/wp-content ... shield.png[/thumbnail]
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Well, with eepe/eepskye and er9x/ersky9x we already have the computer - radio trainer connection.. I guess it would be possible to do it the other way too :) But radio-radio is very important and maybe a bit more difficult to achieve? For your tablet you would need an application to output the channels in the same way as eepskye does it.. and I guess you could connect it to the radio already if that app existed..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
krisp
Posts: 10
Joined: Sun Jun 15, 2014 12:14 pm
Country: -

Re: Adding Bluetooth module

Post by krisp »

Mike, did you ever get to bidirectional bluetooth telemetry? Bits in COM1/2 out COM3, bits in COM3 out COM1/2?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

I would like the Trainer over Bluetooth.. That would also be a killer feature :mrgreen:

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
tilmanb
Posts: 347
Joined: Thu Oct 11, 2012 9:36 pm
Country: Germany
Location: Karlsruhe, Germany

Re: Adding Bluetooth module

Post by tilmanb »

I have been thinking among those lines too.
Strangely its becoming difficult to find BT modules that support HCI.
There are tons of serial over BT modules (rubbish for the use case) and also lots of proprietary embedded stack modules with vendor lock in.

What are your thoughts?
I would like to have OBEX/FTP class support for sharing model configurations. And a L2CAP based serial streaming protocol for wireless trainer and telemetry relay.

There is also a ton of BTLE modules. But I don't know if the stack is suitable for streaming applications. GATT seems to be aimed towards low bandwidth high latency applications. But I could be totally wrong.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

krisp wrote:Mike, did you ever get to bidirectional bluetooth telemetry? Bits in COM1/2 out COM3, bits in COM3 out COM1/2?
No I haven't done that yet. I'll look into it as it could be useful for sorting out certain bluetooth operations for me.
COM1 is a bit difficult. It is hardwired to the SPort interface that is a single wire, bidirectional connection to the XJT module.
COM2 should be straightforward, so I'll get that working.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

I think I have COM2 <-> Bluetooth working. I hope to post a test version with this in soon.
On the TELEMETRY2 menu, there is an option for the COM2 function. This has values of: Telemetry, SbusTrain, Sbus57600, and now, BtDirect.
Underneath there is also an option for setting th baudrate for COM2, only relevant for the BtDirect option. This currently has options for 9600, 19200, 38400, 57600 and 115200.

So if you select BtDirect, then data received over Bluetooth is sent out over COM2 and data received at COM2 is sent out over Bluetooth.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “Turnigy 9XR PRO radio”