Page 1 of 1

Trouble with Multiwii sofwear

Posted: Wed Nov 18, 2015 9:57 am
by JFRouh
I try to upload the softwear in a MultiWee Pro board with MTK 3329 GPS .
I use Multiwii 2.4. and WinGui 2.3.
To do this, I have normaly to upload a first sketch with selected "INIT MTK GPS" in" GPS protocol" of "Control h panel".Then I must selected "NMEA" and uploaded the new sketch .
But when I compile the first sketch , there is an error and the compilation returns theses sentencises,in red.

C:\Users\JEAN-F~1\AppData\Local\Temp\buildeba40c17aefdb7bd54c55b3a974a48be.tmp\sketch\MultiWii.cpp.o: In function `setup':

C:\Users\JEAN-F~1\AppData\Local\Temp\buildeba40c17aefdb7bd54c55b3a974a48be.tmp\sketch/MultiWii.cpp:712: undefined reference to `GPS_SerialInit()'

C:\Users\JEAN-F~1\AppData\Local\Temp\buildeba40c17aefdb7bd54c55b3a974a48be.tmp\sketch\Protocol.cpp.o: In function `serialCom()':

C:\Users\JEAN-F~1\AppData\Local\Temp\buildeba40c17aefdb7bd54c55b3a974a48be.tmp\sketch/Protocol.cpp:241: undefined reference to `GPS_newFrame(unsigned char)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Erreur lors de la compilation

If I select directly "NMEA", there is no problem and I can uploaded it. But the GPS d'nt work.

I d'nt know what to do !
May be, someone knows this problem ans how to solve it?

JFRouh

Re: Trouble with Multiwii sofwear

Posted: Wed Nov 18, 2015 4:38 pm
by Kbev5709
I'm going to try and help you one more time. I went and compiled different sketches that made errors. It was kind of hard to get any at all until I came up with this combination, which gives me your exact error. In the GPS section you have both your GPS serial port enabled (#define GPS_SERIAL 2 ) at the same time you have your i2c enabled (#define I2C_GPS.)
YOU CAN NOT DO THAT!!!!
This is the only way I could get the error you describe. To further elaborate: Your sketch looks like this (in the first part of the GPS section)

Code: Select all

/**************************************************************************************/
  /***********************                  GPS                **************************/
  /**************************************************************************************/

    /* ENable this for using GPS simulator (NMEA only)*/
    //#define GPS_SIMULATOR

    /* GPS using a SERIAL port
       if enabled, define here the Arduino Serial port number and the UART speed
       note: only the RX PIN is used in case of NMEA mode, the GPS is not configured by multiwii
       in NMEA mode the GPS must be configured to output GGA and RMC NMEA sentences (which is generally the default conf for most GPS devices)
       at least 5Hz update rate. uncomment the first line to select the GPS serial port of the arduino */
       
    #define GPS_SERIAL 2         // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
                                   // must be 0 for PRO_MINI (ex GPS_PRO_MINI)
                                   // note: Now a GPS can share MSP on the same port. The only constrain is to not use it simultaneously, and use the same port speed.

    // avoid using 115200 baud because with 16MHz arduino the 115200 baudrate have more than 2% speed error (57600 have 0.8% error)
    #define GPS_BAUD   57600       // GPS_BAUD will override SERIALx_COM_SPEED for the selected port

   /* GPS protocol
       NMEA  - Standard NMEA protocol GGA, GSA and RMC  sentences are needed
       UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree
       MTK_BINARY16 and MTK_BINARY19 - MTK3329 chipset based GPS with DIYDrones binary firmware (v1.6 or v1.9)
       With UBLOX and MTK_BINARY you don't have to use GPS_FILTERING in multiwii code !!! */

   
    //#define NMEA
    //#define UBLOX
    //#define MTK_BINARY16
    //#define MTK_BINARY19
    #define INIT_MTK_GPS        // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings


    /* I2C GPS device made with an independant arduino + GPS device
       including some navigation functions
       contribution from EOSBandi   http://code.google.com/p/i2c-gps-nav/
       You have to use at least I2CGpsNav code r33 */
    /* all functionnalities allowed by SERIAL_GPS are now available for I2C_GPS: all relevant navigation computations are gathered in the main FC */

    #define I2C_GPS                     <<<<<<<<<<<<<<<<THIS IS WRONG!!!!!!! It needs to have two forward slashes//

When I try to compile this mess I get the exact same error that you get. After further messing around my sketch started spitting out that error as well even when the i2c was disabled. So, see my solution after Leo's statement below.

Re: Trouble with Multiwii sofwear

Posted: Wed Nov 18, 2015 5:57 pm
by Leo
Guys, when posting the code please use the "Code" tags. Makes it easier on the eyes.

@JFRouh: Please post your complete config.h and post exactly what hardware components you are using.

Re: Trouble with Multiwii sofwear

Posted: Wed Nov 18, 2015 6:01 pm
by Kbev5709
Leo, I went and updated that post to include code tags. I have already been through his hardware setup in another thread. In that thread I pretty much gave up. Then I saw his post here about the same thing. I decided to try and help him again. I went and compiled until I got his exact error. The explanation of his error is what you see above. He is trying to get his MTK GPS to work with his Multiwii pro from HK. He is getting an error when trying to initialize the NMEA. The reason for his error is that he has both serial 2 enabled as well as i2c.
He is a beginner and speaks French and there is some difficulty in his translation.
This thread should not even be in the 32 bit section as the pro is 8 bit.
JFRouh
After even further research I have the same error when compiling even when the i2c is commented.
Try this: Enable both the initialize and the NMEA at the same time. Upload that. Now go back and disable just the initialize statement. Upload that. (Make sure that your i2c is DISABLED and your serial 2 is ENABLED) Results????

In MW 2.3 you had to initialize then switch to NMEA. Looks like for some reason in 2.4 it's done differently. Looks like you initialize while NMEA is enabled then disable only the initialize.

Re: Trouble with Multiwii sofwear

Posted: Wed Nov 18, 2015 7:36 pm
by JFRouh
I just done what you told me!
Upload is OK!
But I d'nt know if the GPS is working , because ,there is no indication on MultiwiiConf.
Thank yo very very much for your fidelity.

JFRouh

Re: Trouble with Multiwii sofwear

Posted: Wed Nov 18, 2015 7:42 pm
by Kbev5709
JFRouh wrote:I just done what you told me!
Upload is OK!
But I d'nt know if the GPS is working , because ,there is no indication on MultiwiiConf.
Thank yo very very much for your fidelity.

JFRouh

You are quite welcome. So sorry to hear about the attack over there.

Your TX goes to RX and RX to TX???? +5 to VIN and Ground to -.

I'm so close to getting it going for you I hate to quit.

Re: Trouble with Multiwii sofwear

Posted: Thu Nov 19, 2015 10:08 am
by JFRouh
The connections are correct.I I checked them.

You are so kind to think about us!

Best regards

JFRouh

Re: Trouble with Multiwii sofwear

Posted: Sat Nov 21, 2015 11:49 am
by JFRouh
The GPS is OK!

It is only necessary to uncommant INIT_NTC_GPS and NMEA both.

Thanks a lot

JFRouh

Re: Trouble with Multiwii sofwear

Posted: Sat Nov 21, 2015 3:01 pm
by Kbev5709
These directions are posted in th GPS section of the config.h. I never really noticed them until just now.

GPS using a SERIAL port
if enabled, define here the Arduino Serial port number and the UART speed
note: only the RX PIN is used in case of NMEA mode, the GPS is not configured by multiwii
in NMEA mode the GPS must be configured to output GGA and RMC NMEA sentences (which is generally the default conf for most GPS devices)

It says that only the RX wire is used with NMEA. It also says that the GPS must be pre configured to output those two kinds of GPS messages. It also says most are set that way by default. The interesting part for me is the RX wire only.... Never even tried that before :o :shock: :roll: :D