Hello all, First off I am extremely new to the drone world, but I have built my own 450 heli that I taught myself how to fly.  I am not an extremely good pilot, and don't do any of the 3D stuff, but I have managed not to crash it in the last 2 years.  I have also successfully built a custom program for my TARANIS to fly the heli with four separate flight modes (was a pain since my heli still uses a fly bar).

So onto the drone, I am in the process of building an FR450 quadcopter and the first bit I have been tackling is understanding Mission planner and the use of the 3dr radios.  Currently I am attempting to get Mission Planner to connect to the radio's via a Bluetooth link on the ground radio.  The issue is Mission Planner will not open the Bluetooth serial port.  Every other piece of software on my computer opens the port just fine and creates a connection via the Bluetooth module, to include the standalone 3dr radio utility.  When I attempt to open the port in Mission Planner I get "Invalid ComPort or in use"

In short Mission Planner is the only software that I can't get to open the Bluetooth serial port.  Not sure if there is a fix for this? Or, if it is a know bug yet to be worked out.

Windows 10 Pro 64bit, Mission planner version 1.3.33.1, "APM Reset" unchecked, Bluetooth set baud to 57600

Thanks,

Jeff

Here is the info displayed in the script window when trying to get info from 3dr radios:

INFO MissionPlanner.Comms.SerialPort - start GetNiceName COM4
INFO MissionPlanner.Comms.SerialPort - done GetNiceName cache COM4
Doing SerialPortFixer
INFO MissionPlanner.Comms.SerialPortFixer - before dcb flags: 8213
INFO MissionPlanner.Comms.SerialPortFixer - after dcb flags: 8213
Done SerialPortFixer
CustomMessageBox thread calling Base Thread
CustomMessageBox thread running Base Thread

Here is the info displayed in the script window when trying to use Mavlink:

INFO MissionPlanner.MAVLinkInterface - Open port with COM4 57600
Doing SerialPortFixer
INFO MissionPlanner.Comms.SerialPortFixer - before dcb flags: 8213
INFO MissionPlanner.Comms.SerialPortFixer - after dcb flags: 8213
Done SerialPortFixer
ERROR MissionPlanner.MAVLinkInterface - System.IO.IOException: Element not found.

   at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
   at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
   at System.IO.Ports.SerialPort.Open()
   at MissionPlanner.Comms.SerialPort.Open() in c:\Users\michael\Source\Repos\MissionPlanner\ExtLibs\Comms\CommsSerialPort.cs:line 84
   at MissionPlanner.MAVLinkInterface.OpenBg(Object PRsender, Boolean getparams, ProgressWorkerEventArgs progressWorkerEventArgs) in c:\Users\michael\Source\Repos\MissionPlanner\Mavlink\MAVLinkInterface.cs:line 326

Views: 1177

Reply to This

Replies to This Discussion

Hi Jeff,

It took me a while to make it work and, to be honest, I'm not sure what, in the end, was the change that resolved the issue - I'm using the HC-06 module. Here is my list of things to check:

1) Confirm that the bluetooth module is configured for 57600 bauds. This was the most important change that allowed me to connect to my Android mobile with Tower app. To do this you will need to connect the BT module to the PC via FTDI/USB adapter or an Arduino board. With this config I was able to connect to Android but still not to the MP.

2) In the Mission Planner there is a screen for configuring the information on the BT connection: Initial Setup > Optional Hardware > Bluetooth Setup - enter your BT data (name, baud rate and PIN). This seems to be important, although to me it does not make much sense as the pairing is managed by Windows, with the connection being presented to the MP as a COM port.

3) When connecting the battery to the quad, allow a few seconds after the APM boot before starting the connection attempt. Also not sure why but helped.

I noticed that few times I needed to disconnect the battery on the quad and restart everything to get the connection. I'm using Windows version 10, 64bits, with MP 1.3.34.

Good luck!

Arnaldo

Arnaldo, thanks for the reply.  Not sure why I can not get Mission Planner to talk directly to my Bluetooth module.  I have double checked all the settings and I just continue to get errors whenever trying to open my Bluetooth port.  The module shows a brief connection then MP errors out.  It also seemed to be locking up my BT module.  I believe what it comes down to, is I have always found BT to be kinda of buggy and the combination of my setup may be the issue.

However I found a work around that seems to eliminate all the headaches and should work for just about anyone having issues.  I used GpsGate to create a virtual COM port, that directs traffic to the BT COM port.  took me about 5 minutes and all my issues were gone. The program was designed to share GPS data across multiple programs, but can be programmed using its basic setting to direct any sort of serial data over a COM port.  Once GpsGate is setup, point MP at the virtual COM port GpsGate created and you are off to the races. On a 32bit machine Xport is another option, that does the same thing.  All of this still requires a properly setup BT module at 57600.

For the those interested here is the website, http://gpsgate.com/download/gpsgate_client.  What you want is the GpsGate serial splitter.  Make sure you enable DTR and RTS under serial port settings for bidirectional data.

Jeff

Jeff,

Another important point: I can't get the connection established when the MP COM port is set to auto. I was getting exactly the same error from your post. With BT you need to specify what COM port to use - the one associated with the BT connection in your computer - otherwise MP will not be able to find it by itself.

Maybe with this setting you won't need GpsGate to connect.

~Arnaldo

Ya, so I have tried all of the settings, and to be honest I never even attempted to use "Auto."  One thing I did notice was when I attempt save the Bluetooth settings in Mission Planner, it appears that MP is trying to send some sort of command to the BT module, and fails.  My guess is that MP is sending some sort of command and expects a response back from the BT module.  With that I believe MP expects to see a HC-06, and I am using a HC-05 which has slightly different AT commands due to different firmware.

I have concluded this becuase I am getting the same errors regardless of computer or BT apdater that I am using.  To date I have tested on an windows 10 64 bit system with an Intel and generic CSR BT adapters, and then also on my windows 7 32 bit laptop with a generic CSR BT adapter.

I have ordered an HC-06 module today to test my theory.  Which really should not make a difference, since like you said Arnaldo, Windows should be handling the details of making the BT link.  But we will see as I am out of guesses.

I will say that Gpsgate does seem to eliminate any bugs and make the whole BT connection very stable.  I can even power cycle my APM and MP does not seem to care and picks up right were it left off once the APM reboots.

Thanks for the help, Jeff

Finally got my hands on a HC-06 module and MP still refused to open the Bluetooth COM port, without using the GPSgate walk-around.

However, just installed the latest update for MP that came out recently (ver. 1.3.35) and now MP opens the Bluetooth port without issue. 

So the original issue has been resolved.

Thanks Jeff

I use the HC05 without issue. There is a bit of setup in WIndows to get the bluetooth working in the Bluetooth management app. I am using Windows 7 on one and WXP on another tho.

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service