Zucky

  • *
  • 2
How to Set Bluetooth Device via ComBridge CC3D
« on: January 02, 2016, 08:09:42 pm »
The following is the process I performed with a Bluetooth module I purchased and configured for use with my CC3D.  Hopefully it helps others use the ComBridge feature in the CC3D as a USB to Serial converter for making  the changes to the settings on a Bluetooth module.  The may definitely be a simpler method, this one worked for me.  Be careful, as there are voltages at play and touching the wrong thing to the VCC could damage any of the components involved.

My setup:
  • Windows 7 64bit
  • CC3D with Mini Me (14.10)
  • Mini Me GCS (14.10)
  • USB 2.0 on my laptop
  • Bluetooth Module (eBay - Wireless Serial 4 Pin Bluetooth RF Transceiver Module HC-06 RS232 With backplane - alice1101983)
  • Serial cable provided with CC3D kit from HobbyKing
  • Turnigy 3A UBEC
That should cover the details, here are the steps;

1. Connect to your CC3D via USB and open the GCS

2. Configure the Hardware as below, take note of the ComBridge setting on the MainPort and USB VCP Port, as well as the 9600  baud rate on the Telemetry speed and ComUsbBridge speed.

3. Save this and then power off the CC3D and power it back up, forcing a restart.



4. Now connect your Bluetooth module using the serial cable to the MainPort, reversing the Tx and Rx connections.



Green = Rx
Orange = Tx
Red = VCC
Black = GRND



You can see how I have the Tx from the MainPort connected to the Rx on the Bluetooth module, then of course the Rx connected to Tx.

5. Connect USB to the CC3D, GCS should automatically connect to it, and install a new COM port, mine ended up being COM5.

6. Power up the vehicle with external power for the Bluetooth module.

7. Open a terminal program, I'm on Windows so I used Putty.

8. Set the serial connection to 9600, 8,n,1 and in my case COM5.  (Check your Device Manager for the COM port assigned to the bridge)

Once Putty opens, type the following;

AT

Note:
This should be in caps and no enter or return is pressed afterwards, you won't see this entry as there is no echo enabled on the device.

You should get an OK response, if so you are connected to the device, continue with the following commands in succession.  You can simple copy and paste these one by one into the terminal window one at a time.

AT+VERSION

AT+NAMELibrePilot

AT+BAUD7

The first commnad responds with the Bluetooth module code version is purely to prove you are properly connected.
The second command changes the name of the Bluetooth device to 'LibrePilot'.
The third one changes the baud rate to 57600, you can go higher, I start with this to make sure things are working.  Some users seem to have mixed results going higher to 115200.

9. Change the hardware settings in the CC3D as noted below.  Note the Telemetry speed and the ComUsbBridge speed are now 57600 to match the new speed the Bluetooth module was set to.

10. Save the configuration to the board.

11. Power down the board by pulling the USB and any external power.



12. Re-connect the USB and any external power for the Bluetooth and reconnect to the GCS via USB.

13. Using Putty again, reconnect to your virtual COM port using 57600,8,n,1.

When Putty opens type;

AT

You should get a response of OK just as before.

This confirms your connectivity of 57600 to the Bluetooth module.

14. In the GCS make the changes to set the CC3D board to the settings for the Bluetooth module as noted below.  Disabling the USB VCP Port and setting the MainPort to Telemetry.  Save the config to the CC3D and then remove all USB and external power source again.



15. Power up your vehicle, without a USB connection ensuring your Bluetooth module has power.

Note: Ensure you take all necessary safety precaustions relating to your vehicle when bench testing, REMOVE ALL PROPS.

16. Depending on your system connectivity, locate the Bluetooth connectivity software and pair the Bluetooth module.  My device had a default pairing ID of '1234'.

Once paired, you should have additional ports now added to your computer that were installed when the Bluetooth module was paired successfully.  Mine is COM6 as seen below in the Device Manager.

Windows Device Manager



17. Now open the GCS, with no USB connected and the Bluetooth module powered on in your vehicle, and choose the new COM port to connect with, Bluetooth should connect and telemetry is now active.  Remember that you changed the name of the device to LibrePilot, you should see this in your Bluetooth list when pairing and in your list of available Bluetooth devices.

These are the steps I used after reviewing a few posts and older videos for using the flashed firmware which is now part of the latest firmware of the GCS.  I may have missed some steps or made some errors, please feel free to make suggestions I will update this post to reflect them.

I had originally posted this information in the OpenPilot Wiki which is now no longer available.  It is the same information originally posted, I'm missing some updates I made which were recommendations from forum members and as I tweaked the steps.  It eventually made its way into the OpenPilot Wiki with some embeliishments from the OP Team.

Please forward any suggestions for changes or additional information, I wanted to keep the configuration clean and only using the CC3D board for the configuration so as to not include additional devices, such as an FTDI device.

I'm working on a similar tutorial for WiFi, just awaiting some parts.

Happy Flying!

« Last Edit: January 02, 2016, 08:49:47 pm by Zucky »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #1 on: January 02, 2016, 08:39:04 pm »
Nice, good entry :)

Did you look at the wiki page ?
https://librepilot.atlassian.net/wiki/display/LPDOC/Setup+a+bluetooth+for+telemetry

Feel free to amend wiki page.

Zucky

  • *
  • 2
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #2 on: January 02, 2016, 08:55:43 pm »
Thank you,
I did see the Wiki post, didn't even dawn on me to make any changes there for review.

My steps are more of a direct step by step to get people through the config, hopefully making them familar with the process.

WiFi is next.

mottex

  • *
  • 8
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #3 on: October 08, 2016, 11:42:34 am »
Hi there

I hardly try to setup the Bluetooth module HC-05, according to your description. Unfortunately the Hardware Configuration page does not show the ComUsbBridge Speed, attached a screenshot.

Actually i am using GCS 16.09 RC 1, is this eventually an issue of the new GCS?

Thanks for help

f5soh

  • *****
  • 4572
    • LibrePilot
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #4 on: October 08, 2016, 12:24:21 pm »
Seems you are using the 16.09RC

Baudrate should be automatically set to the baudrate set in Putty.

Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #5 on: October 08, 2016, 01:10:10 pm »
Hi...have you solve this issue....?

Sent from my SM-N9005 using Tapatalk


mottex

  • *
  • 8
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #6 on: October 08, 2016, 04:44:23 pm »
Ok. Then i have an other Problem... I have downloaded putty frommen the mentioned link, but it des not look like the pictures that i have seen in the forum...

Can someone make a short description and original pics?

Thanx

P.S. I tried also https://forums.openpilot.org/topic/7337-bluetooth-module-configuration-software/ - it says: Module not found

 
« Last Edit: October 08, 2016, 05:24:35 pm by mottex »

hwh

  • *
  • 1018
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #7 on: October 08, 2016, 07:28:58 pm »
Hi...have you solve this issue....?...
What issue?  The setting was removed from GCS and it was coded to use whatever speed the program you're connecting with is using.  Much easier than needing to set the speed in two places.

Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #8 on: October 08, 2016, 07:32:26 pm »
Bluetooth on cc3d librepilot...I'm going in to it for this project with android app librepilot soon...

Sent from my SM-N9005 using Tapatalk


hwh

  • *
  • 1018
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #9 on: October 08, 2016, 07:36:30 pm »
@mottex I've used putty off and on for years, it's always looked the same as you posted. What forum did you find where it looks different?  This is not the place for a basic tutorial on using putty, there are probably ones on other sites.

The openpilot forums and wiki have been gone for almost a year, that was why the info was posted here.

For the module not found it could be connected wrong or you could have one of the modules that are programmed to not startup in command mode.  http://www.instructables.com/id/AT-command-mode-of-HC-05-Bluetooth-module/ talks about getting them into command (AT) mode.

hwh

  • *
  • 1018
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #10 on: October 08, 2016, 07:38:40 pm »
Bluetooth on cc3d librepilot...I'm going in to it for this project with android app librepilot soon... ...
There's no issue, it works fine.  This thread is a tutorial on how to configure it

Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #11 on: October 08, 2016, 07:52:18 pm »
Owhh ok...thanks..

Sent from my SM-N9005 using Tapatalk


Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #12 on: October 09, 2016, 05:41:13 am »
I've a Revolution Mini. The device works well on MainPort but now I have MainPort and FlexiPort in use (SBUS and GPS).

As I understand I can use the Receiver Port to connect the Bluetooth device, with Pins 1=GND 2=VCC 7=TX and 8=RX, putting this port in Telemetry mode, but it didn't work Any idea? Can I use the SonarPort instead?

hwh

  • *
  • 1018
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #13 on: October 09, 2016, 09:13:41 am »
Pins 7/8 can't be used for telemetry on what the Chinese call a mini revo.  You need to look at the chart of pin usages on whatever site you purchased the mini revo from.  The one I've attached is the common one.  If you compare it with the real revo pinout in the wiki https://librepilot.atlassian.net/wiki/display/LPDOC/Revolution+Configuration#RevolutionConfiguration-ReceiverPort you'll notice that the real revo has a 10 pin receiver port and the mini revo has an 8 pin one.  The Chinese skipped pins 3 and 4 on the real revo so all the pin numbers but the first two are off by two.  Pins 7/8 are really 9/10.  Telemetry would be on 5/6.

Another effect of them skipping pins 3/4 is that you can't hook up a ws2811 led strip to that port since the pins it uses are missing.

Mateusz

  • *
  • 808
Re: How to Set Bluetooth Device via ComBridge CC3D
« Reply #14 on: October 09, 2016, 09:37:43 am »
Bluetooth on cc3d librepilot...I'm going in to it for this project with android app librepilot soon... ...
There's no issue, it works fine.  This thread is a tutorial on how to configure it

I read this now and I don't get what the problem was, but when I was configuring my HC-05 with FTDI USB-Serial adapter I remember it had some problems. Configuring it didn't work at first few times, and I thought my HC-05 is broken, then out of sudden it started working properly and responding. I am still using it without problems now with LP2Go Android app, and all is fine now.

If you had such a problem I suggest first checking HC-05 module itself if it's working. Best is to download Android serial bluetooth application (maybe blueterm or other, there are plenty fo them).
Connect your HC-05 with FTDI USB-Serial adapter to your laptop. Pair your phone with HC-05. Start Putty and try sending something from laptop to android terminal and other way around.
If that is working, then LP2Go should also work, and telemetry with LibrePilot should work.