GPS data is unable to read | Thales IoT Developer Community
November 3, 2015 - 8:11am, 14040 views
Hi, I am using EHS8 mounted on cinterion B80 starter.
JSR 179 API is always giving timeout expired even if it didn't take more than 1 second time. Forget that, we have direct AT command.
this is the config that I have.
AT^SGPSC="Engine","3"<CR> is giving frequent output and location fix is also happening. how can I decode that to my code? Response Listener is only giving the first response. Listener is giving the buffer status. Nobody is there to give me the actual data. Now I am able to see the data, but I couldn't use it in my code.
Correct me if i am doing all it wrong and please help me read the data. i don't need A-GPS. GPS is what i need.
Thanks in Advanse,
The GPS data is available on NMEA port while you are using AT commands to access the GPS.
So that's why you are not able to catch it with the listener.
Can you share some code and log showing more details about how you access the GPS with Java API and what the result is?
I made a previous post asking how to get the GPS position in an EHS8 from the Java API and I've had still no success. I've managed to do it with AT commands, but no with the Java API. I 've tried it in 2 ways, but none of them worked:
1. Using GpsApiMngr(). Although there is no documentation of this class, I've tried my best. I create an instance of this class and call to the method GpsEngineModeSet(3,0) to switch it on. After that, if I call the GpsEngineModeGet, it returns 0, so it's not working.
2. Using AT command class to switch on the GPS. It is configured to output the NMEA frames through the local interface. Once the GPS is switched on, it's created an instance of the LocationProvider, but I get a LocationException: Provider is temporarily unavailable or timeout expired.
Please, I'm a bit lost. Any suggestions?
Thanks in advance,
As GpsApiMngr is not documented I wouldn't recommend to use it.
It should be possible to activate the GPS engine with At commands and then use the GPS with the Java API using LocationProvider class.
Have you tried to turn off the NMEA output? The provider might be throwing the exception because it is busy with outputting data to NMEA interface.
I've tried to set the NMEA output as "off" and "buffered", but still I get the provider exception. This is the GPS configuration used:
I've sent you the example application which should work.
You don't need to initiate the GPS with AT commands for this application to work.
So I'm sorry for my previous advice but it turned out that initiation with AT commands should not be done for using LocationProvider class. This is quite a new product which I don't have yet on my desk to play with it.
Could you send me this example application please? I have the same setup (EHS8 on B80 board) and the same problem.
You should have received the email.
Hi Bartlomiej, could you send me this example application too? I inititate the GPS with AT commands, and i recieve Nmea data, but I want to work with Java application.
Thanks in advance!
I have sent you an email.
Hi Bartlomiej, Please hekp me with the example. Thanks a lot for your help.