Bluetooth module with APM 2.5

Hi,

I just got one of those JY-MCU (HC-06) (v1.06) bluetooth module with default baud rate of 9600. Is there any way to change the baud rate without having FTDI or Xbee adapter?

If there is any chance to change the baud rate from 9600 to 57600, would you please let me know? I do not have an FTDI cable and am trying to avoid buying it because it will be used only once and never again and it is more than what I paid for the BT module.

I searched the web for hours and days but couldn't come up with any solution.

Thanks

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Another update (it feels I am talking to myself but anyways...)

    I installed DroidPlanner2 and it connects to BT no problem. I can see the flight parameters and location. And I didn't change anything on the DroidPlanner2 app. It connected immediately with all default settings. So this tells me that the BT module is working fine. The problem is the original DroidPlanner app. It must be some settings issue. I honestly like the DroidPlanner better than DroidPlanner2. So I hope I can make this work with the DroidPlanner

    If I find the problem, I will for sure update this thread...

     

  • I did try the window XP's builtin hyper terminal but it didn't work. After setting everything per the instructions, I was unable to communicate with the BT module. Then I downloaded and installed Arduino software and that worked perfectly. I was able to change the baud rate (it is now 57600), device name and the PIN within seconds:)

    Then I tried the Droid Planner app on my android phone. After setting the connection type to Bluetooth and connection speed to 57600, I powered up my APM 2.5; hit the connect button on Droid Planner app, the voice said "Connected" (which never happened before), the text changed from "Connect" to "Disconnect" indicating the connection is made but the blinking red LED never turned solid and within 3 seconds it got disconnected:(

    I tried several times and it always does the same thing. I connects and then disconnects on its own.

    I am so close to end this adventure but still not done. 

    What could be the problem now?

  • Hi,

    I got my FTDI cable in the mail. I opened the package and got another surprise.I have a cable with non-standard wire colors!!!! I have absolutely NO idea why...

    The cable I got has the following colors:                    The Standard FTDI cable has the following colors:

    Black                                                                           Black (GND)

    Orange                                                                         Brown (CTS)    

    Blue                                                                             Red (VCC)

    White                                                                           Orange (TX)

    Green                                                                           Yellow (RX)

    Yellow                                                                          Green (RTS)

    Since 4 of the above colors (Green, Yellow, Black and Orange) are also in the standard FTDI cable, I assumed the remaining Blue and white corresponds to black and red which are the GND and VCC. But I was wrong!..

    I measured the voltages and got another surprise there: For the cable I have, the VCC is the orange wire and the GND is the black one.

    I searched the net for several hours to find the pinout for the cable I bought; I found nothing.

    I measure the following voltages in the hope that someone can tell me which ones are the Rx and Tx wires so I can use this cable to end this baud rate nightmare...

    Here is what the pins measure:

    Orange & Black = 5.13v

    Orange & Blue=1.67v                        Blue & Black=3.29v

    Orange & white=1.67v                       White & Black=3.29v

    Orange & Green=1.73v                      Green & Black=3.39v

    Orange & Yellow=1.73v                     Yellow & Black=3.39v

    • Spent several hours and found nothing. About 15 minutes after posting the above question, I found the following info:

      Orange = VCC

      Black = GND

      White = RXD

      Green = TXD

      Yellow = RTS

      Blue = CTS

      Basically what I wanted to know was White = RXD and Green = TXD. I got this info from two separate sources. They should be correct.

      I will try it soon and hopefully they will work... 

  • Just an update. After fiddling with this issue for days, I found out that the only way to get the baud rate changed on the BT module is to physically connect it to a device where the AT commands can be used. It is not possible to change the baud rate wirelessly as Bill mentioned above.
    Nick suggested a way to do it using the APM 2.x board but that requires to install some pass-through software onto APM 2.x and I didn't want to mess with that because everything is working okay on my board currently. Also I didn't find any more info on that route. However, I thank Nick again for his help and suggesting that method.
    So this left me only two options:
    1. Order an Arduino board and use the AT commands to change the baud rate
    2. Order and FTDI cable and use the AT commands to change the baud rate

    I picked the option #2 and ordered an FTDI cable. It seems a bit easier and more straight forward this way...

    Thanks to all for your help...

  • You might be able to use the APM GPS passthrough to connect the bluetooth to the computer. Load the passthrough firmware into the APM and connect hc-06 to the GPS port on the APM.

    Open the APM com port in Mission Planner terminal and start typing commands. hc-06 use the protocol in this document to alter settings.

    I think this should work..

    • Thanks Nick. Yes, I am partially familiar with those AT commands. If I can find a way to connect the HC-06, it should be a only a few minutes to change the baud rate. 

      I will think about the method you suggest. I will check it a little more. Maybe I can find someone who used the same method.

      I looked at my APM 2.5 and there are 2 GPS connection ports. One of them is 5-pin DF13 and the other is 6-pin DF13. My ublox Leah GPS is connected to 6-pin DF13 port(side-facing). So the top-facing 5-pin DF13 connection port is currently open. And this is (physically) the same as telemetry port where the BT module connects to.

      If I install that passthrough firmware you linked above, do you think it would change any setting on the APM (especially the way GPS working)?

      I really want to get this thing resolved a lot but don't want to make things worse.

      I know you can't guarantee anything and I really appreciate you took your time to suggest this.

      I wish I had a spare APM board to test this...

       

       

  • The IO is at 3.3v nominal but is 5v tolerant. Plug it into 5v Arduino directly no problem.

    • Guys I already powered up the bluetooth board with 5.2volts several times and it worked no problem. I am hoping nothing will happen from this point on because I do not have much intention to build a step-down circuitry at the moment. 

      Could you guys be a bit more specific on what steps I need to take. I have APM 2.5. I tried to connect this board to its telemetry port per 3DR instructions but it won't communicate due to mismatched baud rate.

      I thing I could try to change the baud rate down to 9600 on the Mission Planner software so both would be at the same baud but not sure if that will be of any help.

      At this point all I want to do is to get the baud rate changed from 9600 to 57600 on the JY-MCU module. 

      If any of you guys can tell/show me the steps, that would be much appreciated.

      Once again, I do not have an FTDI cable and not looking forward to ordering one if possible...

      • Developer

        Do you have an Arduino? I have one on those JY-MCU bluetooth modules. I

        The electronics can be powered between 3.6V-6V, but I'm pretty sure voltage above 5.5V will be problematic on the signal lines. This means wither 5V or 3.3V signals levels will work fine.

        (The reason for 3.6V being the minimum is that the Low Voltage Drop regulator drops 0.3v ;) )

        You can only program these device while connected physically to them (i.e you cannot do it if you have connected via bluetooth)

        I did some searching and these instructions seem pretty clear for exactly what you are trying to do https://github.com/rwaldron/johnny-five/wiki/JY-MCU-Bluetooth-Seria...

        rwaldron/johnny-five
        JavaScript Robotics and IoT programming framework, developed at Bocoup. - rwaldron/johnny-five
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…