Ublox M8N with Pixhawk

Hi,

There is an issue about using the ublox M8N with Pixhawk. Pixhawk doesn’t recognize the ublox M8N module. Is it about a baudrate problem? I tried nearly all baudrates but still the gps driver doesn’t recognize the M8N module.

Any suggestions?

BR,

Did it ever work for you? Are you sure the wiring is correct? I regularly use an m8n with PX4.

I am sure about wiring, and when i debug the gps driver i see the polling of different devices. I observe the tx output of m8n in oscilloscope but it doesn’t handshake with pixhawk in px4 codebase.

Which version are you using? I even tried the master branch but no success.

BR,

I have it working on stable right now. I can test master later today if necessary. I have m8n modules from drotek and hobbyking.

Have you ever had this particular gps module working connected to a pixhawk? Have you tried stable?

Have you set the m8n to only communicate via the ublox format? I had a similar problem with the m8n, ultimately resolved by setting the firmware to turn off all NMEA messages.

@aivian should i connect the gps module via an ftdi and configure it?

Yes, uBlox provide software to interface to the module.

ok thanks @aivian, i got the u-center, will make uarts only ubx instead of nmea+ubx

Hi @aivian. I had a similar issue with the M8N on the PixRacer. I proved the M8N was working using an FTDI and u-centre. The M8N LEDs can give you a clue to when comms are working and when they’re not.

After getting detailed wiring diagrams for the flight controller and tracing the cables, I realised that the RX and TX were swapped by the cable.
With respect to nmea+ubx you’ll see that PX4 will configure many of these settings on startup, but only once I2C is working!

See PX4/Hardware/issues/66 (sorry I’m new and can’t post links)

Hi Oli,

U mean the configuration is via i2c? i2c does have only sda and scl pins and no tx rx as it is half duplex. also as far as i know the i2c is for compass only. Do you mean the rx tx of uart?

My understanding is that it is supposed to automatically configure at startup, but I still was unable to connect until modifying the ublox firmware to disable NMEA.

I needed to tweak the firmware to set it to to high dynamic range mode anyway so this wasn’t a big deal.

Yes my mistake, RX and TX of the UART.

Interesting @aivian. I did find the NMEA data was taking a lot of bandwidth. Which may be causing me drop outs.

Do you intend to target master with this change?

The change was in the ublox firmware configuration, not px4.

GPS modules intended for use with the px4/drones in general come with the firmware set up properly already. In this case I was using a more obscure ublox breakout board that did not come with the right settings.

The maximum positioning rate of most GPS modules is relatively slow, as long as you were operating at a high baud rate, there should plenty of bandwidth on the serial line. Even at a 20Hz positioning rate the NMEA RMC message only requires about 10 kbps.

1 Like

@olibye, isn’t the I2C interface for compass only? I think ublox gps modules don’t require I2C for configuration. Configuration is also made via UART interface.

The solution to the incompatibility between Ublox M8N and PX4 is solved by burning the receiver’s flash with this configuration file via ucenter. I have just resolved by this technique and now all the M8N receivers are working:

MON-VER - 0A 04 46 00 36 2E 30 30 20 28 33 33 32 34 37 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 30 30 34 30 30 30 35 00 00 35 2E 30 30 20 28 32 38 34 38 33 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
CFG-ANT - 06 13 04 00 1B 00 8B A9
CFG-DAT - 06 06 02 00 00 00
CFG-FXN - 06 0E 24 00 0C 00 00 00 00 00 00 00 00 00 00 00 10 27 00 00 10 27 00 00 D0 07 00 00 18 FC FF FF 00 00 00 00 00 00 00 00
CFG-INF - 06 02 0A 00 00 00 00 00 00 00 00 00 00 00
CFG-INF - 06 02 0A 00 01 00 00 00 87 87 87 87 87 87
CFG-INF - 06 02 0A 00 03 00 00 00 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 01 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 02 00 01 00 00 00 00
CFG-MSG - 06 01 08 00 01 03 00 01 00 00 00 00
CFG-MSG - 06 01 08 00 01 04 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 06 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 11 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 12 00 01 00 00 00 00
CFG-MSG - 06 01 08 00 01 20 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 21 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 22 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 30 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 32 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 02 20 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 02 23 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 02 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 05 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 06 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 07 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 08 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 09 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 0A 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 20 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0A 21 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0B 00 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0B 30 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0B 31 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0B 32 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0D 01 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 0D 03 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 F0 00 01 00 01 01 01 01
CFG-MSG - 06 01 08 00 F0 01 01 00 01 01 01 01
CFG-MSG - 06 01 08 00 F0 02 01 00 01 01 01 01
CFG-MSG - 06 01 08 00 F0 03 01 00 01 01 01 01
CFG-MSG - 06 01 08 00 F0 04 01 00 01 01 01 01
CFG-MSG - 06 01 08 00 F0 05 01 00 01 01 01 01
CFG-MSG - 06 01 08 00 F0 06 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 F0 07 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 F0 08 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 F0 09 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 F0 0A 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 F1 00 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 F1 03 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 F1 04 00 00 00 00 00 00
CFG-NAV5 - 06 24 24 00 FF FF 08 02 00 00 00 00 10 27 00 00 05 00 FA 00 FA 00 64 00 2C 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
CFG-NAVX5 - 06 23 28 00 00 00 FF 1F FF FF FF FF 03 02 03 10 0A 00 00 01 00 00 B4 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
CFG-NMEA - 06 17 04 00 00 23 00 02
CFG-PM - 06 32 18 00 00 06 00 00 04 90 00 00 E8 03 00 00 10 27 00 00 00 00 00 00 02 00 00 00
CFG-PRT - 06 00 14 00 00 D4 41 00 84 00 00 00 00 00 00 00 03 00 03 00 00 00 00 00
CFG-PRT - 06 00 14 00 01 D1 41 00 C0 08 00 00 00 96 00 00 03 00 03 00 00 00 00 00
CFG-PRT - 06 00 14 00 02 D1 41 00 C0 08 00 00 80 25 00 00 00 00 00 00 00 00 00 00
CFG-PRT - 06 00 14 00 03 D1 41 00 00 00 00 00 00 00 00 00 03 00 03 00 00 00 00 00
CFG-RATE - 06 08 06 00 FA 00 01 00 01 00
CFG-RXM - 06 11 02 00 00 00
CFG-SBAS - 06 16 08 00 00 03 03 00 D5 CA 06 00
CFG-TP - 06 07 14 00 40 42 0F 00 A0 86 01 00 01 01 00 00 32 00 00 00 00 00 00 00
CFG-USB - 06 1B 6C 00 46 15 A5 01 00 00 00 00 78 00 00 00 75 2D 62 6C 6F 78 20 41 47 20 2D 20 77 77 77 2E 75 2D 62 6C 6F 78 2E 63 6F 6D 00 00 00 00 00 00 75 2D 62 6C 6F 78 20 35 20 20 2D 20 20 47 50 53 20 52 65 63 65 69 76 65 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00