Grove-GPS can't work


My raspberry pi is Raspberry Pi Rev 2 Model B 512MB made in UK.
Use GrovrPi not grovepi+.
I try to use them with Grove – GPS. And I run the program which copy form
But it can’t work. The Error message follow the picture.
Please tell how can I do.



Hi Yiwen, Karan just updated the GrovePi directory with this example yesterday. Can you take another look and update the software?


this picture is my result.
it finally can work ,but the value is strange.
Some value is empty.
Can you teach me how can I do .




It’s working: you’re getting a date and time. You just haven’t connected to any satellites yet. You should take it outside to connect to satellites.


I had tried to move the GPS sensor outside.
But it still is’t any change .
The result like the picture which I gave you last time.


Hi yiwen, how long did you lave the GPS sensor outside? How much of the sky could it see? It sounds like you’re not giving it enough time to acquire satellites. It can take seconds or minutes, with an open sky, to get satellite signals for a GPS.


I follow your directive to do.
But the result like the picture which I gave you last time.


Sorry to hear that Yiwen. This is definitely a problem with the sensor, I would contact the company you bought it from and ask for a replacement.


I discover that i run the program
the result is false
is the program right?


import subprocess
debug =0
def send_command(bashCommand):
process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) #, stderr=subprocess.PIPE)
output = process.communicate()[0]
return output

def check_ir():
if ‘lirc_dev’ in open(’/etc/modules’).read():
if debug:
print “lirc_dev in /etc/modules”

if 'lirc_rpi gpio_in_pin=15' in open('/etc/modules').read():
	if debug:
		print "lirc_rpi gpio_in_pin=15 in /etc/modules"
if 'lirc_rpi gpio_in_pin=14' in open('/etc/modules').read():
	if debug:
		print "lirc_rpi gpio_in_pin=14 in /etc/modules"
if 'dtoverlay=lirc-rpi,gpio_in_pin=14' in open('/boot/config.txt').read():
	if debug:
		print "dtoverlay=lirc-rpi,gpio_in_pin=14 in /boot/config.txt"
if 'dtoverlay=lirc-rpi,gpio_in_pin=15' in open('/boot/config.txt').read():
	if debug:
		print "dtoverlay=lirc-rpi,gpio_in_pin=15 in /boot/config.txt"
if flag:
	return True
return False

def replace_in_file(filename,replace_from,replace_to):
f = open(filename,‘r’)
filedata =

newdata = filedata.replace(replace_from,replace_to)

f = open(filename,'w')

def disable_ir():
if check_ir()==True:
if debug:
print “Disabling IR"
replace_in_file(’/etc/modules’,“lirc_rpi gpio_in_pin=15”,"")
replace_in_file(’/etc/modules’,“lirc_rpi gpio_in_pin=14”,"")
if debug:
print “IR already disabled”

def enable_ir():
if ‘lirc_dev’ in open(’/etc/modules’).read():
if debug:
print "lirc_dev already in /etc/modules"
if debug:
print “lirc_dev added”

	with open('/etc/modules', 'a') as file:
if 'lirc_rpi gpio_in_pin=15' in open('/etc/modules').read():
	if debug:
		print "lirc_rpi gpio_in_pin=15 already in /etc/modules"
	if debug:
		print "lirc_rpi gpio_in_pin=15 added"
	with open('/etc/modules', 'a') as file:
		file.write('lirc_rpi gpio_in_pin=15\n')

if 'dtoverlay=lirc-rpi,gpio_in_pin=15' in open('/boot/config.txt').read():
	if debug:
		print "dtoverlay=lirc-rpi,gpio_in_pin=15 already in /boot/config.txt"
	if debug:
		print "dtoverlay=lirc-rpi,gpio_in_pin=15 added"
	with open('/boot/config.txt', 'a') as file:

if name == “main”:
print check_ir()

This is .


Hi yiwen,
The program would return false if the IR receiver is not enabled and that should be the default behavior. Are you having any problems with that.



Hello ,

Do I need when I run those program “” ?
There isn’t in the source .
When I run it,it will be error “can’t find”.
Than I download one which I gave last time,but I forget which web I download it.
But now error is “Disable IR receiver before continuing”.
I still don’t know the real problem.
I have some questions.
Whether I need to run GroveGPS?
If I need it how can I open IR receiver ?
Please help me solve the question.


Hey yiwen,
You can comment Line 54-56 here and it should work for you



Should I also comment Line 49 ?
So run the GPS need IR receiver ?


Yeah, comment line 49 too. Those lines are there to detect a conflict between the IR receiver and the GPS on our image.