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

Join diydrones

Comments

  • Hi Joirdi, I'm having some problems updating the GPS Firmware (my Lon values are completely out of range, Lat is O.K.). Now I don't have an FTDI cable, so i'm stuck with the pass through method using the script in the manual (attached). I am using the APM.

    Which baudrates should I set in the script, and what baud rate should the flash tool be communicating with?
    I Tried 38400 for the APM (IMU?) and 9600 or 115200 for the GPS. Set the flash tool at 38400.

    Result: [Flash Download],Fail!!(Download) DL_HANDLE error code,[Finish]

    void setup()
    {
    Serial.begin(38400); // FTDI; this is the speed at which the IMU board is communicating with your PC
    Serial1.begin(9600); // GPS; 9600 is the usual default for NMEA GPS modules
    delay(10000);
    }
    void loop()
    {
    if (Serial.available())
    Serial1.write(Serial.read());
    if (Serial1.available())
    Serial.write(Serial1.read());
    }
  • Developer
    I have successfully used VirtualBox to update and configure the MTK GPS units.
  • Alex, do you mean uploading the firmware? I tried it both with the old and the new firmware via wine but failed both times (but it may be that I downloaded the wrong version of DLL's to make it work or broke it otherwise). What does work via wine is the little application showing you the satellites, etc. I ended up using an old XP laptop for uploading the new firmware. Maybe you are more lucky..
  • Any way to make this work under linux?
  • Thanks Chris.
  • 3D Robotics
    Geoff,

    That line switches it into binary. You won't be able to see the data once it's binary (although we should revise the test so that it goes through the binary parser and emerges as data that you can see.) You're just catching the code in the midst of revisions....normal alpha issue.
  • Total noob - this thread may be relevant to my probs.
    When I run MTK Test,( blue LED on MTK module indicating lock) what I see on serial monitor is
    "GPS MTK Library Test
    $ PGCMD,16,0,0,0,0,0*6A"
    and then nothing. Have reloaded MTK firmware - apparently successfully. Suggestions please?
  • I edited the function GPS_MTK_Class::Init(void) so that the last few lines are

    // Initialize serial port
    #if defined(__AVR_ATmega1280__)
    Serial1.begin(38400); // Serial port 1 on ATMega1280
    delay(500);
    Serial1.print("$PGCMD,16,0,0,0,0,0*6A\r\n");
    delay(500);
    Serial1.print("$PGCMD,16,0,0,0,0,0*6A\r\n");
    #else
    Serial.begin(38400);
    #endif

    I'm no expert on serial ports but this seemed to fix the problem, not sure why..
  • 3D Robotics
    Andre: Yes, the power available via USB is limited, especially when you've got servos connected. That will all be fine when you're powering via the RC system, as you will be in the plane.

    Could you post the code where you added the delay? I'll test and incorporate if it improves performance.

    Also note that the switch to binary currently puts it at 1Hz update rate. We'll change that to the normal 10Hz in the next day or two, with the next rev of the library.
  • Hi,

    Great, thanks a lot. With the new firmware I also get the right coordinates. I noticed that although the switch command to binary mode is in the GPS_MTK.cpp it (sometimes?) would not switch and stay in NMEA. So I repeated the switch and added some delay which seems to fix the problem. Wondering if I'm the only one. Also, it seems that when I power the APM from USB the mediatek has more problems finding a fix indoors than when powered from battery (something related to current drain over the USB port and antenna sensitivity maybe??) Anyway.. thanks for the bugfix!
This reply was deleted.