Adding Bluetooth module

Hardware Support for the 9XR Pro
Post Reply
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Adding Bluetooth module

Post by MikeB »

Connections on the 9XR-PRO for adding a bluetooth module are shown on the right:
9XR_PRO_SERIAL_PORTS.JPG
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 »

Mike this image has very little resolution. Nearly impossible to see the connections. Possible to post one with more resolution?

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 am working on a full drawing ...It will be ready real soon
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

Updated!

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 »

Excellent. 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

krisp
Posts: 10
Joined: Sun Jun 15, 2014 12:14 pm
Country: -

Re: Adding Bluetooth module

Post by krisp »

Would be cool to have the option to "pass through" com2 to com3 bidirectionally for unsupported telemetry (aka mavlink with openlrs). This would allow users to configure APM models and receive telemetry to a computer or cell phone (would work great with droidplanner).

I tried to hack this into opentx but had no luck, and since it is missing a lot of features vs eesky9x I have decided to stick with this instead. Nice work.

Mike i noticed in another thread that you mentioned that you'd like to add mavlink but have no hardware. While not exactly what you need, APM does have "SITL" mode where you can compile the entire board and run it in software on the PC, including serial ports (abstracted over tcp/ip but with time and creativity can be routed to an FTDI for "emulated" serial telemetry). The mavlink source also includes a dummy UDP mav (uav) that sends enough fake data to be tracked by QGroundControl or MissionPlanner.

Maybe someone could donate a megapirate board or even "record" some live telemetry for you to play back to your transmitter for development purposes...
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

In the TELEMETRY2 menu is an option "BT Telemetry". If you set this to ON, then ALL bytes received on the selected telemetry port (COM1 or COM2) are sent out on COM3 (BlueTooth).

I'll look into mavlink when I get some spare time.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
krisp
Posts: 10
Joined: Sun Jun 15, 2014 12:14 pm
Country: -

Re: Adding Bluetooth module

Post by krisp »

Thanks for the quick reply Mike. I'm aware of the forwarding of bytes from COM2 to COM3, however is there anything in place to forward bytes from COM3 to COM2 when BT telemetry is enabled?
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

Not at the moment. Since I'm looking at the whole BlueTooth functionality, I've made a note in my "ToDo" list about adding that.

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

Re: Adding Bluetooth module

Post by MikeB »

I've managed to get a HC-05 module installed in a 'PRO, and I have modified the code to make it start to work.
The connections are from the COM3 (Bluetooth) connector, 0V to 0V, 3.3V to 5.0V (erring on the side of caution), Tx to Rx and Rx to Tx. In addition, I have wired the ERASE signal to the KEY input. The HC-06 is physically located in the battery bay. I'm using a 6-cell NiMh pack, and this leaves an area on the right, not covered by the bay cover, for the module to be in.

With this setup, and the HC-05 still set as a slave device, the code successfully changed the baudrate to 115200, and then I enabled the "BT as trainer" option and successfully got data from eepskye on the Trainer menu.
I have also successfully routed telemetry data to the PC over the BT connection.

So I reckon support for both the HC-06 and the HC-05 is working in slave mode. This makes it worth installing a HC-05, ready for further enhancements.

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 »

Great Mike.. Can't wait to install mine.. Where can I read how to get the ERASE signal?? that is the one that will allow the HC-05 into programming mode, right?
I can feel that we are getting closer to having a wireless trainer over BT :mrgreen:
Maybe even with the 9x radio with the help of an arduino ;) :D

regarding the 9x with a Megasound board:
We could use the BT to connect to the TX and RX on the megasound board? and update the voice files over BT instead of the RS232 cable? We also have a couple of free pins on the Megasound's m328? could they be used to allow the wireless trainer or even sending/?receiving? telemetry over BT?

Just brainstorming..

Thank Mike, I can see some great and cool features ahead :)

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: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

Brent updated the diagrams here: viewtopic.php?f=122&t=5659#p80407 to show where the ERASE signal may be found (bottom left of the board).

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 »

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
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Adding Bluetooth module

Post by LTMNO »

Thus is very cool. I just got three HC-06's
Custom 9x with M64/Telemetry Mod
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

The HC-06 is already supported and working, it only works in slave mode. For the HC-06(edit), you don't need the extra connection from the ERASE signal.
The HC-05 should also work in MASTER mode, but needs more firmware support to do so.

Mike.

Edited!
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:The HC-06 is already supported and working, it only works in slave mode. For the HC-05, you don't need the extra connection from the ERASE signal.
The HC-05 should also work in MASTER mode, but needs more firmware support to do so.

Mike.
I think you mean "for the HC-06 you don't need the extra connection....." not the HC-05, because for the HC-05 you DO need the extra connection :) :) :D
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
mnementh
Posts: 156
Joined: Tue Mar 05, 2013 4:22 pm
Country: -

Re: Adding Bluetooth module

Post by mnementh »

I really like this; it feels like the stuff I was experimenting on with my 9X years ago, back when it was just me and a couple crazy people who wanted their telemetry on their android phone. ;)

I need to get this up & running on mine; would be a fine feature to be able to compare to the Taranis X9D+ when it gets here. I'm already scouring eBay for an encoder I like the looks of...

We can still work with the HC-05 in slave mode as long as we configure it before we pop it in there, right?

There isn't anything in the firmware that requires TERMINAL mode for it to work, is there?

The Vcc , GND, TX/RX are all in the same place, so hopefully...


mnem
Hmmm...
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

I think Mike is trying to make it all configurable in the radio.. please refer to his post above. He did install the HC-05 and configured it from the radio In slave mode. You will need to connect the erase line to the module, so it can be programmed by the radio..

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
mnementh
Posts: 156
Joined: Tue Mar 05, 2013 4:22 pm
Country: -

Re: Adding Bluetooth module

Post by mnementh »

Wow... as you know, I'm still doing it the stone-age way... with an external programmer, etc. I dunno what I'll do with all this fancy... ummm... integration and all. My eyeballs might fall out from all this unadulterated goodness. :mrgreen:


Thanks Mike!


mnem
Groovy.
User avatar
mnementh
Posts: 156
Joined: Tue Mar 05, 2013 4:22 pm
Country: -

Re: Adding Bluetooth module

Post by mnementh »

Okay so... I'm getting ready to do this mod myself and a few questions.

First - for now at least, to use an HC-05 I have to program it to slave mode before I install it in the radio, correct?

Next - Is support for BT built into the regular pre-compiled release? If not, is there a pre-compiled BIN somewhere?

Mike, I think you were suggesting to place the BT module on the right. My preferred location, since I'm using the bare module, is to attach it to the bottom of the case right by the SPKR connector with servo tape; antenna end pointing up as shown in my photo. This would keep its antenna oriented 90° out of phase with the main antenna. Thoughts? Comments?

Last - What is the current functionality of the BT Mod? Do we have any documentation on this anywhere yet? I believe we were tossing around ideas like BT Trainer mode and Model transfer, as well as Telemetry out for FRSLogger and FRSKy Dashboard... what else?


mnem
*Blue*
Attachments
HC-05 Location
HC-05 Location
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

The HC-06 (yes 6) is supported in the official release for routing telemetry out via BT.
I'm running a test version of the code that supports the HC-05 as well, and supports use of BT as trainer input. I'm just finishing sorting a voice problem, then I'll post this test version.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
mnementh
Posts: 156
Joined: Tue Mar 05, 2013 4:22 pm
Country: -

Re: Adding Bluetooth module

Post by mnementh »

Mike -

A-whee-some! Can't wait! Will an HC-05 preconfigured as Slave, 9600,N,8,1 work with the existing firmware or do I need to wait until you release the new version? Does the current firmware NEED to program anything in terminal mode to work?


mnem
*Connected*
fburden
Posts: 51
Joined: Thu Mar 29, 2012 5:24 pm
Country: -

Bluetooth is cool!

Post by fburden »

Ah yes, Bluetooth....
Just bought a $25 Bluetooth Obd2 reader and hooked it up to my two post 1996 suv's with my tiny weeny Android phone. Just Freekin Love it!! Running "Torque Android app". Gives me realtime data with fancy dials, graphs, logging, realtime checking of all vehicle sensors.

Amazing opportunitys here with Bluetooth and 9XR-PRO... the sky is the limit!!!!!!!!!!!!!!!
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

I've just posted test versions that provide initial support for the HC-05.
They also fix voice messages being chopped.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
mnementh
Posts: 156
Joined: Tue Mar 05, 2013 4:22 pm
Country: -

Re: Adding Bluetooth module

Post by mnementh »

Tight!

I'll get back on the BT this week. Had some IRL (as in AC went bunk and we live in Central Hottern'ell, TX) issues drag me away. Hopefully, we'll get to celebrate my birthday soon, only a day or three late...

I just realized... unless we're gonna start using BT to connect the Pro to our PCs... right now I don't have anything I can use it for. I only have the one Pro, so I can't use it for wireless trainer mode. And I let my old FRSky module go with my 9X, and I haven't built a new one yet.

Just out of curiosity... the wireless trainer mode they use on the Taranis, with the trainer TX bound to an RX, then CPPM out from that piped into the trainee TX... do we have anything like that on the Pro? Are there plans to? It would be awesome if I could repurpose my 9XR to that task...


mnem
*sizzzzle*
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: Adding Bluetooth module

Post by KAL »

I tried those things...

I put a FrSky RX to my 9X to use it as master for a FrSky TX module equiped PRO.
Also I made an adapter cable to connect a CPPM capable OrangeRX to my PRO via Futaba connector
in order to link it with a spektrum TX. Advantage of the Futaba connector is that it provides (battery-) power.
When using a TX battery lower than 9,6V you can omit the VR for the OrangeRX.

Only issue: sometimes the OrangeRX goes into bind mode while powering up because CPPM and binding plug are
using the same connector. Maybe a resistor in series will cure this...

Certainly you can connect e.g. a FrSky D4R-II to the PRO via this method ...

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

I have a couple of 9x radios and I would like to connect them as trainer to the pro via bluetooth. The 9x doesn't have the capability but with the help of an arduino connected to it's trainer port to receive the ppm and then send it to the pro via BT serial, I think it is possible. So, an HC-06 on the 9x with the arduino, and an HC-05 as master on the pro.
Need to find some code for the arduino on the net which I think it will be difficult but you never know. Maybe one of the clever guys here could write it. Looking at the code of the arduino that does the reverse (receiving serial and sending PPM out), it doesn't seem too hard to do, but I wouldn't know that :) Not so many lines of code anyway..
Then we could use wireless BT trainer between the PRO and any other tx that sends PPM out ;)

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
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: Adding Bluetooth module

Post by KAL »

Just thinking a bit deeper ...

I don't know if it's possible and wether there's not too less memory ... maybe er9x can provide a serial stream for bluetooth at the ppm out pin ...
Perhaps we should ask Mike ...

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

Ideas noted, I'll give them some thought. On the 9X, in DSM native mode (for a DX4 type hack module) we do send a serial data stream to both the module pin and the trainer output (at 100K baud).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: Adding Bluetooth module

Post by KAL »

Hey Mike,

would be great if this could be made ...

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )

Post Reply

Return to “Turnigy 9XR PRO radio”