I am trying to get a Neo M9N working with a new Pi 3 B+ and am having a hard time. I am using a Qwiic HAT (https://www.sparkfun.com/products/14459) to connect the GPS board to the Pi via the 40 GPIO header. I attachted a pic of the setup to the post for reference. I also have an antenna, not pictured, when all connected the red PWR light glows and the Blue LED blinks once a second.
I am using the normal Pi OS with desktop and have pip installed Sparkfun-ublox-gps. I also have installed this github with the example python codes: https://github.com/sparkfun/Qwiic_Ublox_Gps_Py
Every time I run any example or most other python codes I received the following error (see pic): No module named ‘ublox_gps’
Can anyone recommend a fix or something I should check to fix the error? Thank you.
So I think what I have done wrong is the Neo M9N is not compatible with the Pi via the Qwiic HAT. If one of the SparkFun technical support staff could confirm and advise the best route to hook up the GPS card that would be really great. I thought the Hat would allow any Qwiic device to be connected to a Pi. Maybe that is the case, but I do not know.
Are you able to access and confirm the status of your NEO using ublox’s ucenter? I followed SF’s setup guide which was helpful navigating all the config options and just seeing that the NEO was working before trying to get it talking to a microcontroller.
https://learn.sparkfun.com/tutorials/sp … okup-guide
https://learn.sparkfun.com/tutorials/g … u-blox/all
The NEO-M9N should be fully compatible with the Qwiic HAT. Can you confirm that you’ve installed both the SparkFun-ublox-gps and the qwiic-py packages?
Hello. Thank you for the reply.
I have installed SparkFun-ublox-gps using this command: sudo pip3 install sparkfun-ublox-gps
I tried to install the qwiic-py package with this command, but receive an error: sudo pip3 install Qwiic-py
This is the error I receive:
pi@raspberrypi:~ $ sudo pip3 install Qwiic-py
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting Qwiic-py
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/qwiic-py/
I did try to install the qwiic-py using the following command, which worked: sudo pip3 install sparkfun-qwiic
I attempted to run the example codes from the github (https://github.com/sparkfun/Qwiic_Ublox_Gps_Py) using this code: sudo python3 geo_coords_ex1.py
But I receive the following text output with the cursor blinking below and nothing happens: Listening for UBX Messages
The power and blue gps light is blinking.
JohnPilgrim:
Are you able to access and confirm the status of your NEO using ublox’s ucenter? I followed SF’s setup guide which was helpful navigating all the config options and just seeing that the NEO was working before trying to get it talking to a microcontroller.
https://learn.sparkfun.com/tutorials/sp … okup-guide
https://learn.sparkfun.com/tutorials/g … u-blox/all
Thank you for your reply. I did follow the setup guide but I have not tried the Windows Ucenter software. I thought it was only helpful if you plan on using the NEO M9N with windows permanently. I will have to take a look at it, but I believe the board is functioning.
It appears that the qwiic-py was updated to: https://pypi.org/project/sparkfun-qwiic/ so it needs to be called as ```
pip install sparkfun-qwiic
Thank you, but I think the prior command I ran took care of the qwiic requirments. I ran the command you provided and received this response.
pi@raspberrypi:~ $ pip install sparkfun-qwiic
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: sparkfun-qwiic in /usr/local/lib/python2.7/dist-packages (1.0.16)
Requirement already satisfied: sparkfun-qwiic-micro-oled in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.0)
Requirement already satisfied: sparkfun-qwiic-tca9548a in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.0)
Requirement already satisfied: sparkfun-qwiic-pca9685 in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.1)
Requirement already satisfied: sparkfun-qwiic-relay in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.0.2)
Requirement already satisfied: sparkfun-qwiic-gpio in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.0.2)
Requirement already satisfied: sparkfun-qwiic-proximity in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.0)
Requirement already satisfied: sparkfun-qwiic-vl53l1x in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (1.0.1)
Requirement already satisfied: sparkfun-qwiic-joystick in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.0)
Requirement already satisfied: sparkfun-qwiic-bme280 in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.0)
Requirement already satisfied: sparkfun-qwiic-scmd in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.1)
Requirement already satisfied: sparkfun-top-phat-button in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.0.2)
Requirement already satisfied: sparkfun-qwiic-max3010x in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.0.2)
Requirement already satisfied: sparkfun-pi-servo-hat in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.0)
Requirement already satisfied: sparkfun-qwiic-i2c in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.11)
Requirement already satisfied: sparkfun-qwiic-twist in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.0)
Requirement already satisfied: sparkfun-ublox-gps in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (1.1.3)
Requirement already satisfied: sparkfun-qwiic-adxl313 in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.0.7)
Requirement already satisfied: sparkfun-qwiic-keypad in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.0)
Requirement already satisfied: sparkfun-qwiic-ccs811 in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.9.4)
Requirement already satisfied: sparkfun-qwiic-dual-encoder-reader in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.0.2)
Requirement already satisfied: sparkfun-qwiic-serlcd in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.0.1)
Requirement already satisfied: sparkfun-qwiic-icm20948 in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.0.1)
Requirement already satisfied: sparkfun-qwiic-titan-gps in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic) (0.1.1)
Requirement already satisfied: smbus2 in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic-i2c->sparkfun-qwiic) (0.3.0)
Requirement already satisfied: pynmea2 in /usr/local/lib/python2.7/dist-packages (from sparkfun-qwiic-titan-gps->sparkfun-qwiic) (1.15.0)
I then tried to run a couple example scripts, like the simple coordinates like this: sudo python3 geo_coords_ex1.py
pi@raspberrypi:~/Qwiic_Ublox_Gps_Py/examples $ sudo python3 geo_coords_ex1.py
Listening for UBX Messages
The cursor just continues to blink but no other lines are printed. I received the same response on the other example python codes I tried. The red power light is on full and the blue gps light is blinking.
The tutorial I linked previously was invaluable to me in learning how to use uCenter to config my F9P to output the data I needed over I2C qwiic for my arduino to process.
JohnPilgrim:
The tutorial I linked previously was invaluable to me in learning how to use uCenter to config my F9P to output the data I needed over I2C qwiic for my arduino to process.
I will give uCenter a go right now, but it does not change something about the GPS or my Raspberry Pi configurations that will change my current predicament? I thought the uCenter is just if you want to use the device with Windows, which I am not able to permanently.
U-Center is a tool that you can use to configure your Ublox device for many various reasons. Those changes are “permanent”, just until they are switched back by U-Center, and will stay working if you move the device back to the Pi. Word of caution to follow the guides. We’ve had users that have started flipping features willy-nilly, not that I think that you will since you’ve been great at being technically inclinde , but it can brick if you’re not careful. Please follow our guides as best as possible.
That aside, the device has acknowledged or at least communication is confirmed to between the device and the Pi. So is it possible to double check all the I2C connections one last time and possibly use a RedBoard Qwiic (or comparable microcontroller) to do a quick check on the messages being sent. The Arduino just has less layers of complexity and can be useful for quick and dirty troubleshooting.
Ok. I do not think this board is for me. All of the hardware is from SparkFun, it appeared to arrive in new condition. I don’t see why it wouldn’t work.
I receive the same response of “Listening for UBX Messages” if I run the example command without the M9N board even connected… Very frustrating.
Hi @FranklinFun,
I’m sorry you’ve been beating your head against the wall, I was there about year ago doing the same thing when I was writing the first iteration of the ublox python library. In short, the Raspberry Pi 3 doesn’t support I2C clock stretching and last I checked the Raspberry Pi 4 wasn’t doing a good job of it either.
If you’re not familiar with “clock stretching” its basically a way for the ublox module to tell your raspberry pi to wait while it gathers information. In this case the information is data coming from space and so there’s a lot of clock stretching, like tens of milliseconds worth of it (that’s a lot of time in computer time). To make matters worse this isn’t a software problem but an actual hardware problem with the chip they used on the Raspberry pi.
If you search for this issue, you’ll see one or two common “work arounds” (slowing down the I2C transmission speed) that do not work with the ublox module because of the ublox’s extensive use of clock stretching. Our latest GPS phat doesn’t even have the I2C lines routed between the ublox module and the Raspberry pi:
https://learn.sparkfun.com/tutorials/sp … rview-phat
Again, I’m sorry I only just became aware of your problem. This is entirely a Raspberry Pi issue and it’s completely out of our hands. On the plus side UART and SPI do work.
If you have any other questions please feel free to ask, good luck.
Unbelievable. I can’t tell you the number of times I have refreshed this forum post. That is very very frustrating to hear. What an incredible waste of time and money.
I certainly understand. I’m not sure the best way to document this in our product pages but I’ll make sure to ask our documentation team this morning. I suspect this post will help others at the very least.
qwiic is great. it’s a neat and tidy I2C cabling interconnect system.
but it doesn’t obviate the need for engineering R&D to integrate different sub-systems.
If quiic i2c isn’t going to work because of a shortcoming in the rpi, then i’d just switch myself over to SPI and get on with my making
https://www.raspberrypi.org/documentati … /README.md
https://portal.u-blox.com/s/question/0D … -of-zedf9p
wonder_boom:
I certainly understand. I’m not sure the best way to document this in our product pages but I’ll make sure to ask our documentation team this morning. I suspect this post will help others at the very least.
I haven’t gotten bitten by this as I’m using ublox with arduino over i2c, but FWIW I’d say it needs to be noted in the qwiic I2C sections of the hookup guides of all of SF’s ublox breakout boards. It should be noted on on the quiic phat page as well, that the rpi has this i2c shortcoming and can’t use qwiic to talk to certain devices, give the ublox as an example.
Hello. I finally have time to revisit this project. I understand that the M9N will work with the Raspberry Pi if the board is soldered to the Pi’s serial lines. Is there a guide or info on what pins from the M9N are soldered to what pins on the Pi’s serial line? I really do not want to mess up and never be able to use the M9N that I got so long ago. Thank you.
You’ll need RX, TX and GND.
- TX connects to RX.
- RX connects to TX.
- GND connects to GND.