Adding Bluetooth module

Hardware Support for the 9XR Pro
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

So, hummmm, bypassing the arduino and send serial directly to the BT on the trainer port? That sounds very good to me :) We will need a divider on the BT's rx input to change levels. We must not forget that or the BT might get damaged ;)
Something else.. we might not be able to power the BT module directly from the 9x's 5V regulator as it is already on it's limits?
If we have the megasound board, we might use it's 5V supply. If we don't, then probably a couple voltage regulators directly from the switched battery power.. Just some early thinking here :mrgreen:

This is getting better and better :D

João

EDIT: Is there a pin on the 9x we could use to program the HC-05 like on the pro? like that you could connect two 9x's too.

Wow, just thinking Further, you could probably send some telemetry data on the trainer port too :)
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: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

The trainer port is "bit banged". Sending too much data on it will very likely compromise the ability of the processor to run the mixer code and send the (also "bit-banged") PPM (or worse PXX) for normal control.
Also note that the MEGA64 version (for FrSky) is now very tight on flash space for much in the way of additions.

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 »

So, does that mean trainer yes, telemetry no? :)

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

Re: Adding Bluetooth module

Post by MikeB »

I don't think telemetry can be included/used. Trainer might be possible, but I need to sort some other things before I get to it.

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 have it all, even if it would be nice to :)
But Mike, just thinking here, when trainer is used, we won't be using the module, right? then there wouldn't be a problem with PPM generation. You could even stop it? the problem is that the atmega would have to detect the tx in trainer mode and only activate the serial if the tx is really in trainer mode. Don't think that is possible?

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 »

Can't have it all, even if it would be nice to :)
But Mike, just thinking here, when trainer is used, we won't be using the module, right? then there wouldn't be a problem with PPM generation. You could even stop it? the problem is that the atmega would have to detect the tx in trainer mode and only activate the serial if the tx is really in trainer mode. Don't think that is possible?

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 »

Can't have it all, even if it would be nice to :)
But Mike, just thinking here, when trainer is used, we won't be using the module, right? then there wouldn't be a problem with PPM generation. You could even stop it? the problem is that the atmega would have to detect the tx in trainer mode and only activate the serial if the tx is really in trainer mode. Don't think that is possible?

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 »

Can't have it all, even if it would be nice to :)
But Mike, just thinking here, when trainer is used, we won't be using the module, right? then there wouldn't be a problem with PPM generation. You could even stop it? the problem is that the atmega would have to detect the tx in trainer mode and only activate the serial if the tx is really in trainer mode. Don't think that is possible?

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 »

Mike -

That should be easy enough to implement as a JR module; just a 5VREG and a few filter caps on an HC-06 with breakout board. Other than that should literally be something we can plug in using breadboard jumpers.


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

Re: Adding Bluetooth module

Post by jhsa »

That's the idea ;) :)
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 »

MikeB wrote:I don't think telemetry can be included/used. Trainer might be possible, but I need to sort some other things before I get to it.

Mike.
Mike -

Wait... what? you mean no BT Telemetry at all, or just not possible concurrent with [TRAINER] mode?


mnem
:?
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 »

( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
mnementh
Posts: 156
Joined: Tue Mar 05, 2013 4:22 pm
Country: -

Re: Adding Bluetooth module

Post by mnementh »

Yeah, I prefer to keep my SERIAL OUT available so I can do this:

Image

My BT is also built-into my FRSky Module:

Image

I've had mine for a couple years now; but was looking to avoid having three 2.4GHZ devices in my TX at the same time. That's why I'm asking about what Mike & Brent are planning to actually implement in the Pro, so I can work around it.

I'm not a big fan of the big breakout boards; I work with the much smaller bare modules whenever possible. Her solution REQUIRES an RS-232 ported breakout board to work; I tap into the datapath ahead of the SIPEX SP3232 and use the 3.3V data before it's converted. The Pro mainboard will connect directly to a HC-05/HC-06 BT module; it doesn't need all that bunk.


mnem
*Drop back & punt*
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Bluetooth module

Post by MikeB »

mnementh wrote:Wait... what? you mean no BT Telemetry at all, or just not possible concurrent with [TRAINER] mode?
This is referring to using Bluetooth on the 9X. There is no hardware serial port to drive it so it would use up too much processor time to send telemetry data over the trainer connection.

ersky9x already supports telemetry over Bluetooth.

Observations:
The HC-06 module (slave only) will respond to AT commands until it is 'paired'. This is why the firmware currently only deals with the baudrate at power on.
The HC-05 may be placed into AT command mode using the 'key' connection, so for that we may be able to change settings 'on the fly'.

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 -

Telemetry on the 9X: Duh, of course. That makes sense.

[EDIT]

Could set up a switch to move the connections between the PPM data and internal telemetry data if you connect at the SIPEX 3232 like I do though. Could do it internal if you have the DHT mod, or could build both into a DJT/XJT module, then rob 3.3V for the BT module from the DJT/DHT, like I do. Actually, since you only need RX data pin on the BT for either, could use a tiny SPDT.

[/EDIT]

Yeah, I'm aware of the way the HC-06 enters TERMINAL mode vs the way the HC-05 does; I think we discussed that some time ago. I didn't realize you were thinking of setting up the 9XR version firmware to program the BT module once installed as a JR module; I figured I'd at least have to do that with an FTDI.

You're just making this too easy. :mrgreen:


mnem
moo. Or don't. It's entirely up to you.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Mike, to get the ERASE connection, can I solder to the little PCB where the usb plug is, or do I have to remove the main board? Is that J9 on the little PCB?

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
SkyNorth
Posts: 958
Joined: Tue Dec 27, 2011 11:40 am
Country: -
Location: Mansfield , Ontario

Re: Adding Bluetooth module

Post by SkyNorth »

solder to the connector pin on the little pcb
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Thanks Brent. So I did..
But there is a problem.
I paired the BT to the computer, no problem.
On the radio I've selected the HC-05 (by the way, this setting should be in the general settings and not per model? we normally only have 1 module in the radio)
selected the baudrate in the radio, 57600. Then activated the BT as trainer. started eepskye and send serial on com 13. the BT does 2 fast flashes every 2 seconds or so.. But when I start the trainer by flicking the RUD switch, Channel 1 goes to -100 and nothing moves.. Any idea? wrong baudrate? 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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

hmm, it looks like the module is paired, it connects, but no data flowing. I just connected it to my phone, but can't receive any data.. Yes, I did enable telemetry over BT in 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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

Ok, changed the baudrate to 115200 and it is working.. but if I set it at 57600 it doesn't work? What am I doing wrong?

João

EDIT: Forgot to say, that I changed it to 115200 while connected to my phone and immediately I had telemetry data on the screen.. with the trainer, I can't make it work.. sometimes the channels just show random values when I change baudrate.
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 »

Ok, managed to make it work with eepskye but don't know really what I did.. I just know that I connected it to my phone, it was working, then just disconnected from the phone and connected to eepskye. then it started working.. I received telemetry.. then disconnected and reconnected as trainer.. and it worked.. What happened here..
Big question.. How the heck do we change baudrate? how is it done? I haven't a clue of what I just done.. Now I can close the radio as the problem is not with the hardware.. :) I'm really at loss with this. :)

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

Re: Adding Bluetooth module

Post by MikeB »

The HC-05/HC-06 selection appears in the model Bluetooth menu, but is, in fact, stored in the general settings!

I think there is a bit of a problem with changing the baudrate. When you change the module type, or the baudrate, they will only be properly actioned at the next power on. I'm not even sure it might take two power cycles for it to all work. I noticed some problems myself, but then it started working OK.

I will get back to this, just sorting the SPort device update first!

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 »

Mine now is working ok I think, at 115200. At least I was able top make it work with eepskye once.. no time for more at the moment.. But I did have to open the radio again to make sure my connections were ok.. And they were.. :(

I just finished installing the HC-05, the rotary encoder and a taranis slider on my pro.. Photos will be posted on another thread later..

Thanks Mike.. I will experiment more with this later..

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
maskuli
Posts: 1
Joined: Thu Aug 14, 2014 5:13 am
Country: -
Location: Bratislava, Slovakia
Contact:

Re: Adding Bluetooth module

Post by maskuli »

Hi guys. Can you please tell me what is type name of a BT connector (com3) used in Pro? I do not know what to ask for in my shop.


Sent from my iPad using Tapatalk
michel49
Posts: 192
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: Adding Bluetooth module

Post by michel49 »

I would like to add HC05 module in order to drive my BT phone with FrSky Logger in the same way as the TH9X; I plugged it in COM3 and I was able to bind it but no datas...it seems the right bps is 9600 ? where is the issue ?

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

Re: Adding Bluetooth module

Post by MikeB »

Did you turn BT Telemetry ON in the TELEMETRY 2 menu?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
michel49
Posts: 192
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: Adding Bluetooth module

Post by michel49 »

Of course ! I saw there is a bps speed to set in the "general" menu, is that 9600 ?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding Bluetooth module

Post by jhsa »

You say it is a HC-05. Did you solder and connect the extra wire to the radio's reset pin? Please refer to the wiring diagram you can find on this forum..

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
michel49
Posts: 192
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: Adding Bluetooth module

Post by michel49 »

According to the HC05 diagram, is that pin #11 ?
michel49
Posts: 192
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: Adding Bluetooth module

Post by michel49 »

Well, mistake, this is pin34; in fact I don't know the default parameters of the module I purchased...

Post Reply

Return to “Turnigy 9XR PRO radio”