GPS, Tunerstudio, Raspberry Pi

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

nzgrub
Helpful MS/Extra'er
Posts: 47
Joined: Sat Nov 09, 2013 11:40 am
Location: Kaeo, New Zealand
Contact:

GPS, Tunerstudio, Raspberry Pi

Post by nzgrub »

I have a raspberry pie 3 with tunerstudio (latest version, just did update) and a v.kel VK2828U7G5LF GPS unit.
In mini terminal it shows I am getting a signal.
When I go to gauge view I get no satellite, speed or latitude etc.

I have attached a short video of this.

Any help appreciated.

Couldn't upload video here so it is at https://drive.google.com/file/d/1rJ1HI2 ... sp=sharing
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by LT401Vette »

TunerStudio looks for $GPRMC and $GPGGA messages before publishing.
I see $GPRMC, but no $GPGGA in your video.

Can you configure the device to generate $GPGGA?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
nzgrub
Helpful MS/Extra'er
Posts: 47
Joined: Sat Nov 09, 2013 11:40 am
Location: Kaeo, New Zealand
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by nzgrub »

May have been off screen in mini-term have stretched mini-term and done a new video here ... https://drive.google.com/file/d/1qFcPmr ... sp=sharing

looks to my untrained eye to be getting data. Perhaps a setting in the gps unit is wrong?

gps unit info here.... https://drive.google.com/file/d/1johbi5 ... sp=sharing

Another question, can I use mini-term to send a command line to the gps, if so how?
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by LT401Vette »

In this video it looks like you have both. It should be good to go.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
nzgrub
Helpful MS/Extra'er
Posts: 47
Joined: Sat Nov 09, 2013 11:40 am
Location: Kaeo, New Zealand
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by nzgrub »

Should be good to go.
But I get nothing when in gauge view.
Something must be not quite right.
nzgrub
Helpful MS/Extra'er
Posts: 47
Joined: Sat Nov 09, 2013 11:40 am
Location: Kaeo, New Zealand
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by nzgrub »

Another question, can I use mini-term to send a command line to the gps, if so how?
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by LT401Vette »

nzgrub wrote:Another question, can I use mini-term to send a command line to the gps, if so how?
Anything you type in the top box will be sent.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
VLC-05L
Experienced MS/Extra'er
Posts: 208
Joined: Wed Jan 21, 2015 3:11 am
Location: Australia

Re: GPS, Tunerstudio, Raspberry Pi

Post by VLC-05L »

This is likely the same problem that I have been dealing with. I have actually picked this up again in the last couple of days to try and sort out.

I ended up installing a GPS Daemon and ran something in the linux terminal and it shows that the GPS is connected to about 9 satellites, shows correct data being received in terms of speed, latitude and longitude, as well as elevation. That said, this program (or whatever the correct name is for it) that shows the GPS information doesn't work when Tuner Studio is open, to me indicating that TS is trying to talk to the GPS.

Mine shows the data being received in the mini terminal but when using Tuner Studio it says that there is no fix, when I know that it has a fix. It seems to randomly indicate that it has a fix for about 10 seconds (however speed doesn't work during this time) but then the indicator goes out again for a while.

I thought that it might be a problem with the baud rate and frequency and was going to try and change that in the GPS but am still trying to work out how to do that. Now I've been reminded I can use the top box to send things to the unit I can have a go at it.
CB70 12V 3cyl 993cc Daihatsu | MS2X Sequential Fuel and Spark | Flex Fuel Launch Control | Raspberry Pi Dash
nzgrub
Helpful MS/Extra'er
Posts: 47
Joined: Sat Nov 09, 2013 11:40 am
Location: Kaeo, New Zealand
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by nzgrub »

Great, well for me anyway, I am not the only one with this problem.
I have not had time to work on it lately.
I tried typing into the top box of mini terminal to change frequency and baud rate with code that come with gps manual but it does not seem to make any difference.
So you just type it and it sends as you type?
Maybe as I am a slow typist its not getting the info quick enough?
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by LT401Vette »

If you can capture a raw log of the output, I should be able to see what data may be missing.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
VLC-05L
Experienced MS/Extra'er
Posts: 208
Joined: Wed Jan 21, 2015 3:11 am
Location: Australia

Re: GPS, Tunerstudio, Raspberry Pi

Post by VLC-05L »

First I looked at the mini terminal in tuner studio and I was able to get messages out. They didn't seem to be coming out all that fast though.

I tried to get the messages to come out of the terminal and wasn't about to get anything until I ran the following command: stty -F /dev/ttyUSB0 raw 9600

After running that and then running: cat /dev/ttyUSB0 i was able to get the messages to come out. I cant see the baud rate in the pi being a problem as I set the baud rate in TS to 9600 when setting up the GPS.
CB70 12V 3cyl 993cc Daihatsu | MS2X Sequential Fuel and Spark | Flex Fuel Launch Control | Raspberry Pi Dash
VLC-05L
Experienced MS/Extra'er
Posts: 208
Joined: Wed Jan 21, 2015 3:11 am
Location: Australia

Re: GPS, Tunerstudio, Raspberry Pi

Post by VLC-05L »

Hi Phil,

I sent you the raw GPS logs via PM. Let me know if there is anything else that you need to know.


Glen
CB70 12V 3cyl 993cc Daihatsu | MS2X Sequential Fuel and Spark | Flex Fuel Launch Control | Raspberry Pi Dash
VLC-05L
Experienced MS/Extra'er
Posts: 208
Joined: Wed Jan 21, 2015 3:11 am
Location: Australia

Re: GPS, Tunerstudio, Raspberry Pi

Post by VLC-05L »

NZGrub,

You have any more luck with this?
CB70 12V 3cyl 993cc Daihatsu | MS2X Sequential Fuel and Spark | Flex Fuel Launch Control | Raspberry Pi Dash
VLC-05L
Experienced MS/Extra'er
Posts: 208
Joined: Wed Jan 21, 2015 3:11 am
Location: Australia

Re: GPS, Tunerstudio, Raspberry Pi

Post by VLC-05L »

So I looked at this again today. I played with the mini terminal again and found that the 14400 baud rate also works for receiving the GPS messages. Is that normal? Could this indicate that there is an issue with the settings of the GPS module? I changed the configuration in TS to 14400 baud for the GPS and it indicates that the GPS is active for about 5 seconds (while showing 96kph as the speed while I'm stationary) then the indicator turns off and randomly turns on again for short periods of time.

Surely other people have got GPS to work with a linux release, so I'm guessing that is not the problem. I'm not sure if it is a module problem or TS problem. Given that the GPS messages all appear to be correctly received I can only assume that it is a problem with TS? I don't want to go out and buy another GPS module just to have the same problem again. Very frustrating.
CB70 12V 3cyl 993cc Daihatsu | MS2X Sequential Fuel and Spark | Flex Fuel Launch Control | Raspberry Pi Dash
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by LT401Vette »

It certainly works with TS on linux. Unfortunately we can't try every GPS module.

Where did you send the captured log?
I don't see it in the support inbox.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
VLC-05L
Experienced MS/Extra'er
Posts: 208
Joined: Wed Jan 21, 2015 3:11 am
Location: Australia

Re: GPS, Tunerstudio, Raspberry Pi

Post by VLC-05L »

LT401Vette wrote:It certainly works with TS on linux. Unfortunately we can't try every GPS module.

Where did you send the captured log?
I don't see it in the support inbox.
I sent it by PM over here. I will send it via email.
CB70 12V 3cyl 993cc Daihatsu | MS2X Sequential Fuel and Spark | Flex Fuel Launch Control | Raspberry Pi Dash
VLC-05L
Experienced MS/Extra'er
Posts: 208
Joined: Wed Jan 21, 2015 3:11 am
Location: Australia

Re: GPS, Tunerstudio, Raspberry Pi

Post by VLC-05L »

So I found the TS log or debug file and looked at it today. There are records in there regarding GPS.

This block is shown over and over again:

java.io.IOException: Underlying input stream returned zero bytes
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.readLine(Buf18/12/17 13:46:20 :Debug: JSSC ControllerInterface Close Connection currentPort == null:false


Followed by this which is shown over and over again:

18/12/17 13:46:20 :Info: Closing Port
18/12/17 13:46:20 :Info: Successfully Closed Port
18/12/17 13:46:22 :Info: Opening port: /dev/ttyUSB0
18/12/17 13:46:25 :Error: Resetting GPS Connection
18/12/17 13:46:25 :Debug: JSSC ControllerInterface Close Connection currentPort == null:false
18/12/17 13:46:25 :Info: Closing Port
18/12/17 13:46:25 :Info: Successfully Closed Port


Anyone have some advice as to what needs to be adjusted?
CB70 12V 3cyl 993cc Daihatsu | MS2X Sequential Fuel and Spark | Flex Fuel Launch Control | Raspberry Pi Dash
VLC-05L
Experienced MS/Extra'er
Posts: 208
Joined: Wed Jan 21, 2015 3:11 am
Location: Australia

Re: GPS, Tunerstudio, Raspberry Pi

Post by VLC-05L »

Still stuck on this. Anyone else have GPS working on Raspbian with Tuner Studio?
CB70 12V 3cyl 993cc Daihatsu | MS2X Sequential Fuel and Spark | Flex Fuel Launch Control | Raspberry Pi Dash
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: GPS, Tunerstudio, Raspberry Pi

Post by LT401Vette »

In this thread, he was having trouble, then got it working:
http://www.msextra.com/forums/viewtopic ... 22&t=67961

If you open the port in Mini term, do you get data?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
SwedCharger-67
Experienced MS/Extra'er
Posts: 264
Joined: Sun Dec 23, 2012 2:20 pm
Location: Nordmaling, Sweden

Re: GPS, Tunerstudio, Raspberry Pi

Post by SwedCharger-67 »

LT401Vette wrote:In this thread, he was having trouble, then got it working:
http://www.msextra.com/forums/viewtopic ... 22&t=67961
Well, I just briefly checked the USB connection and that worked ok for the moment I was checking.

However, I want to use the Bluetooth connection, and that is still very unreliable. It works from system power up, but stops working after a few minutes, reason unknown, I need to spend more time on it.
Martin, Sweden
Mopar 512 cui, 8.4 liters, high compression, fuel E85, full sequential control by MS3X, burning rubber just blipping the throttle... :D
Post Reply