using LEDs is a good idea too, I will try to test my serial port in the coming days and will let you know if i am able to find any issues with them. I have used my cell phone to determine that from where I have positioned the gps module it should have anywhere between 15-20 satellites in view, atleast that is number of satellites in view for GPS on my phone, when i place it directly besides the grove gps module.
I also wanted to ask if there is any example in the GrovePI NodeJS library that deals with the serial port ?
I looked through the NodeJs library and example sensors, I did not find any sensor in their that was dealing or using serial port.
hi @rameez.saleem,
unfortunately I don’t have a GPS sensor with me, that’s why you don’t find it in the Node.js library. I also confirm you that there is no base class nor other examples for a serial sensor.
I spent the entire weekend debugging serial port and Grove GPS, Here are my findings
If i connect the GPS module directly to the RX TX of the Raspberry PI module and open the serial port through putty it works.
However If connect the grovePI Board then the serial port does not work. I tried debugging the serial port with both GrovePI+ attached and also with GrovePI+ board removed.
I tested the serial port using the following methods, I attached two wires to raspberry PI RX TX and shorted them, then I opened the serial port through putty and sent key strokes, The data is shown if GrovePI+ is not attached. I also tested the gps module if i connect it directly with my raspberry PI and open the serial port i get GPS data. Please have a look at the attached pic and screen shot.
if i repeat the same procedure by attaching wires to RX TX on the pins of GrovePI+, or directly to the RPIserial port on the board then nothing appears on the console.
What could be preventing serial port from working when I attach the grovePI to my raspberry PI?
I have tested the serial port by running the python GPS script i.e. “Grove_gps_hardware_test.py” provided with GrovePI python library.
I also have tested it opening the serial port directly through Putty when GPS module is attached.
In both cases serial port works and I get GPS data but only if GrovePI board is not attached with raspberry pi.
If I attach the grovePI board neither of the methods work i.e. neither through putty or by running the python script from grovePI library.
Me and @cleoqc have tried the GPS with the GrovePi and we are getting an output from it.
We installed the GrovePi library, changed /boot/config.txt to use /dev/ttyAMA0 (aka the HW serial), rebooted and then ran dextergps.py script. Here’s how the /boot/config.txt looks like again:
After this, you will get output from the GPS but there’s still one more thing to do. Once in a while, the script will fail due to an exception called SerialException. To avoid that, you also need to remove both console= assignments in /boot/cmdline.txt. Once you change that, reboot and launch dextergps.py script.
Once you’ve done the changes to /boot/config.txt and /boot/cmdline.txt
you can also try to see if you’re getting anything from running this command: sudo python -m serial.tools.miniterm /dev/ttyAMA0
Word of warning, when I ran it, it had so much data I wasn’t able to stop it! Prepare a second terminal so you can kill it.