ls20031 GPS chip cant receive NMEA messages continously

hello i have bought the GPS chip ls20031 locosys

i have read the datasheet but when i create a system on it, it just read only once ,
for example, i reaad it with baud rate 115200 with arduino IDE

it just wrote on serial monitor

$GPGGA,131216.400,0653.7000,S,10739.3499,E,2,8,1.11,745.5,M,3.4,M,0000,0000*71
$GPGLL,0653.7000,S,10739.3499,E,131216.400,A,D*4F
$GPGSV,4,2,15,28,37,154,27,26,32,192,24,02,17,333,24,06,14,008,17*75
$GPGSV,4,3,15,30,12,138,,04,10,025,20,12,10,320,,15,07,216,*75
$GPGSV,4,4,15,24,06,261,,08,04,132,,13,04,060,*44
$GPRMC,131216.400,A,0653.7000,S,10739.3499,E,0.08,323.83,280614,,,D*70
$GPVTG,323.83,T,,M,0.08,N,0.16,K,D*3E
$GPGSV,4,4,15,24,06,261,,08,04,132,,13,04,060,*44
$GPRMC,131217.900,A,0653.7001,S,10739.3499,E,0.11,323.83,280614,,,D*75
$GPVTG,323.83,T,,M,0.11,N,0.20,K,D*33

and it didnt read again,

any solution how to solve it?

You were a bit quick with the bump, don't you think ?
Can you please be as quick posting your code so that we can see what you are doing ?

I was going to ask you to post a link to the device, but seeing as you are too damned impatient, I won't.

PaulS:
I was going to ask you to post a link to the device, but seeing as you are too damned impatient, I won't.

ahhh sorry sorry please help me
this is the product

sorry once again

UKHeliBob:
You were a bit quick with the bump, don't you think ?
Can you please be as quick posting your code so that we can see what you are doing ?

.,. sorry i have been 2 week and i still cant solve this thing sorry once again

1st methhod that i have done

i am just communicating with serial terminal with FTDI cable and realterminal software. in arduino IDE i cant write CR LF so i am using this software. but in the last i am planning apply it to arduino.

according to this page

i just can adjust baud rate with this command
$PMTK251,115200*1F

and make it to auto mode with this command

$PMTK225,8*23

but still it just read only a bit sentences of NMEA not more and continously.

2nd method that i have done

actually for code i am writing it with java

actually for code i am writing java

this is the code btw

import gnu.io.CommPortIdentifier;
import gnu.io.SerialPort;
import gnu.io.SerialPortEvent;
import gnu.io.SerialPortEventListener;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.sf.marineapi.nmea.event.SentenceEvent;
import net.sf.marineapi.nmea.event.SentenceListener;
import net.sf.marineapi.nmea.io.SentenceReader;
import net.sf.marineapi.provider.PositionProvider;
import net.sf.marineapi.provider.event.PositionEvent;
import net.sf.marineapi.provider.event.PositionListener;
import org.json.simple.JSONObject;

/**
 *
 * @author hilmanshini
 */
public class D implements SerialPortEventListener, PositionListener {

    SerialPort serialPort;
    /**
     * The port we're normally going to use.
     */
    private static final String PORT_NAMES[] = {
        "/dev/tty.usbserial-A9007UX1", // Mac OS X
        "/dev/ttyACM0", // Raspberry Pi
        "/dev/ttyACM1", // Raspberry Pi
        "/dev/ttyACM2", // Raspberry Pi
        "/dev/ttyUSB0", // Linux
        "COM3", // Windows
    };
    /**
     * A BufferedReader which will be fed by a InputStreamReader converting the
     * bytes into characters making the displayed results codepage independent
     */
    private InputStream input;
    /**
     * The output stream to the port
     */
    private OutputStream output;
    /**
     * Milliseconds to block while waiting for port open
     */
    private static final int TIME_OUT = 2000;
    /**
     * Default bits per second for COM port.
     */
    private static final int DATA_RATE = 115200;
    String crlf = ((char) 13) + ((char) 10) + "";

    public void initialize() {
        // the next line is for Raspberry Pi and 
        // gets us into the while loop and was suggested here was suggested http://www.raspberrypi.org/phpBB3/viewtopic.php?f=81&t=32186

        System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/ttyACM0");
        System.setProperty("java.library.path", System.getProperty("java.library.path") + ":/usr/lib/jni");
        CommPortIdentifier portId = null;
        Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();

        //First, Find an instance of serial port as set in PORT_NAMES.
        System.out.println(portEnum.hasMoreElements());
        while (portEnum.hasMoreElements()) {
            CommPortIdentifier currPortId = (CommPortIdentifier) portEnum.nextElement();
            for (String portName : PORT_NAMES) {
                System.out.println(portName);
                if (currPortId.getName().equals(portName)) {
                    System.out.println(portId);
                    portId = currPortId;
                    break;
                }
            }
        }
        if (portId == null) {
            System.out.println("Could not find COM port.");
            return;
        }

        try {
            // open serial port, and use class name for the appName.
            serialPort = (SerialPort) portId.open(this.getClass().getName(),
                    TIME_OUT);

            // set port parameters
            serialPort.setSerialPortParams(DATA_RATE,
                    SerialPort.DATABITS_8,
                    SerialPort.STOPBITS_1,
                    SerialPort.PARITY_NONE);

            // open the streams
            input = serialPort.getInputStream();
            output = serialPort.getOutputStream();
            while (true) {                
                int i = input.read();
                System.out.println(i);
            }
//            output.write("$PMTK225,8*23".concat(crlf).getBytes());
//            output.flush();
//            reader = new SentenceReader(input);
//            reader.addSentenceListener(new SentenceListener() {
//
//                @Override
//                public void readingPaused() {
//                    
//                }
//
//                @Override
//                public void readingStarted() {
//                }
//
//                @Override
//                public void readingStopped() {
//                }
//
//                @Override
//                public void sentenceRead(SentenceEvent se) {
//                    
//                    System.out.println(se.getSentence().toSentence());
//                    
//                }
//            });
//            PositionProvider provider = new PositionProvider(reader);
//            provider.addListener(this);
//            reader.start();
//            // add event listeners
//            serialPort.addEventListener(this);
//            serialPort.notifyOnDataAvailable(true);
        } catch (Exception e) {
            System.err.println(e.toString());
        }
    }

    /**
     * This should be called when you stop using the port. This will prevent
     * port locking on platforms like Linux.
     */
    public synchronized void close() {
        if (serialPort != null) {
            serialPort.removeEventListener();
            serialPort.close();
        }
    }

    /**
     * Handle an event on the serial port. Read the data and print it.
     */
    SentenceReader reader;

    public synchronized void serialEvent(SerialPortEvent oEvent) {
        if (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {

        }
        // Ignore all the other eventTypes, but you should consider the other ones.
    }

    public static void main(String[] args) throws Exception {
        D main = new D();
        main.initialize();
        Thread t = new Thread() {
            public void run() {
                //the following line will keep this app alive for 1000 seconds,
                //waiting for events to occur and responding to them (printing incoming messages to console).
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException ie) {
                }
            }
        };
        t.start();
        System.out.println("Started");
    }
    String lastMessage;

    @Override
    public void providerUpdate(PositionEvent pe) {

        JSONObject d = new JSONObject();
        d.put("as", "DEVICE");
        d.put("uid", "1");
        d.put("lat", pe.getPosition().getLatitude());
        d.put("lng", pe.getPosition().getLongitude());
        d.put("id", "D1D2XX132");

        d.put("lstate", "HIGH");
        d.put("pstate", "CONNECTED");
        System.out.println(d.toJSONString());
//        String s = WebSocketSender.sendData(d.toJSONString());;
//        if (s != null) {
//            if (!s.equals(lastMessage)) {
//                Logger.getLogger("D").log(Level.INFO, s);
//                lastMessage = s;
//            }
//        }

    }
}

for arduino i put the RX pin with RX GPS and so do TX

i just put

void setup(){

}

void loop(){

}

in java IDE i found a bit messages. but it wont read continously and so do arduino IDE, in realterminal it do the same,

3rd method

i put arduino to laptop directly and open serial terminal and the messages is just the same,

The data sheet explains how to select which sentences you want output and what frequency you want them output at. Have you tried adjusting these settings? My reading of the data sheet suggests that you can alter the update frequency but not suspend the updates completely. However, if you've selected periodic mode then it would stop updating during the standby phase.

Also, I suggest you post the sketch that you're running on the Arduino.

How is the GPS connected to the Arduino? Why isn't the Arduino reading the GPS data and sending it to the serial port?

for arduino i put the RX pin with RX GPS and so do TX

Shouldn't the GPS Tx go to the Arduino Rx and vice versa ?
When the GPS transmits the Arduino receives.

UKHeliBob:

for arduino i put the RX pin with RX GPS and so do TX

Shouldn't the GPS Tx go to the Arduino Rx and vice versa ?
When the GPS transmits the Arduino receives.

i am following this tutorial

https://www.sparkfun.com/tutorials/176

and it said, RX to RX , tx to TX

PaulS:
How is the GPS connected to the Arduino? Why isn't the Arduino reading the GPS data and sending it es to the serial port?

actually i already do that,

first i am soldered GPS to fit with pin and i connected
GPS pin 2 to RX
GPS pin 3 to TX
1 for 3.3v
and ground for 4 or 5

and connected it to arduino and just like i said the NMEA sentences is just showing a bit. not continously,

PeterH:
The data sheet explains how to select which sentences you want output and what frequency you want them output at. Have you tried adjusting these settings? My reading of the data sheet suggests that you can alter the update frequency but not suspend the updates completely. However, if you've selected periodic mode then it would stop updating during the standby phase.

Also, I suggest you post the sketch that you're running on the Arduino.

i have adjusted the settings.
but i dont know if its works or not,
for example i send this command to GPS chip

{"$PMTK225,2,3000,12000,18000,72000*15\x0D\x0A"};
which means that i want to set it to periodic mode, and it must return

"$PMTK001,225,3*35\x0D\x0A"

but its not exists. its not showing that response message

actually i dont know which state the GPS state is , this is strange

in 3 method of GPS in datasheet

normally periodic mode, standby mode and auto mode the byte of data will appear when i send a command,
but this GPS module is showing strange behavior

it showing the byte of data first and then not doing anything .

++++++++

this is the screenshot

after that code appear it didnt read again,

i think i will upload a video for it

i am following this tutorial

https://www.sparkfun.com/tutorials/176

and it said, RX to RX , tx to TX

Where does it say that ? What I can see is

IF you have TX on the LS20031 going to TX on the Arduino then TinyGPS will give you a bunch of zeros and a headache.

GPS pin 2 to RX
GPS pin 3 to TX

How have you got the SoftSerial connection defined ? Its first parameter is the Tx pin and the second the Rx pin

UKHeliBob:

i am following this tutorial

https://www.sparkfun.com/tutorials/176

and it said, RX to RX , tx to TX

Where does it say that ? What I can see is

IF you have TX on the LS20031 going to TX on the Arduino then TinyGPS will give you a bunch of zeros and a headache.

GPS pin 2 to RX
GPS pin 3 to TX

How have you got the SoftSerial connection defined ? Its first parameter is the Tx pin and the second the Rx pin

wow great now it is working , that tutorial is wrong. the comment of tutorial lead to the right thing.

thank u btw, now the problem is on SoftwareSerial.h

:\

now the problem is on SoftwareSerial.h

No, it isn't. The problem is in how you are trying to use SoftwareSerial.

PaulS:

now the problem is on SoftwareSerial.h

No, it isn't. The problem is in how you are trying to use SoftwareSerial.

strange, i am using alternative software serial AltSoftSerial and it works like a charm but why its not working when i am using only SoftwareSerial ?

Can you post an example that does not work when using SoftSerial ?

this is the working code

#include <AltSoftSerial.h>
int ledIntensity;
int LED_PIN = 13;

AltSoftSerial ss;
void setup(){
  pinMode(LED_PIN,OUTPUT);
  Serial.begin(115200);
  ss.begin(38400);
  Serial.println("Application Started");
  //ss.println("$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29");
}
String serialCommand;
void loop(){
  delay(500);


  ledIntensity = analogRead(0);  
  if(ledIntensity < 30){
    digitalWrite(LED_PIN,HIGH); 
  } 
  else {
    digitalWrite(LED_PIN,LOW);     
  }
  serialCommand = getStringFromSerial();
  if(serialCommand.equals("request")){
    Serial.print("{ \"light\": \"");
    Serial.print(ledIntensity);
    Serial.print("\", ");
    Serial.print(" \"nmea\": \"");    
    int charRead = 0;
      char c;
      while (charRead != 10) {
        if(ss.available()){
          charRead = ss.read();
          c = (char)charRead;
          if(charRead != 0 && charRead != 13 && charRead != 10){
            Serial.print(c);        
          }
        }
      }    
    Serial.println("\"} ");    
  }
}



String getStringFromSerial() {
   String content = "";
   char character;
   while(Serial.available()) {
      character = Serial.read();
      content.concat(character);
      if(character == 10){
        break;
      }
  }
  return content;
}

not working one

#include <SoftwareSerial.h>

SoftwareSerial ss(2,3)

void setup(){
  ss.begin(38400);
  Serial.begin(115200);
}

void loop(){
  if(ss.available()){
    char c = (char)ss.read();
    Serial.write(c);
  }
}

no matter i try to start using Softserial with different baud rate and different combination the result always unreadable chars and when i use AltSoftSerial it works , idk why. so now i am using AltSoftSerial

Some GPS devices have the tx and rx pins intentionally mis-labeled, to make it "easy", to connect tx to tx and rx to rx.. Two of mine do.

michinyon:
Some GPS devices have the tx and rx pins intentionally mis-labeled

That's just mean.