ublox GPS strange characters interspersed with NMEA output - gps

I am using a ublox GPS for a data acquisition application. The device is outputting NMEA on a virtual COM port.
The NMEA output works just fine. But between the NMEA messages strange characters are interspersed. See screenshot below from Realterm with setting "Ascii".
Can somebody tell me what this is? And ideally what commands I would need to send to the device to disable this output?

You should disable the UBX binary protocol. The NMEA and UBX messages are interleaved on the same port. This can be done by sending UBX-CFG-PRT message disabling the UBX output protocol on your port. You can use the handy u-center application avaiable from u-blox website to perfrom this task.
An alternative is to reflash the device or remove the backup battery. It should default back to NMEA only.

Related

Unable to access bluetooth device via COM port on dell axim pda with J2ME

I'm trying to write part of a J2ME application and I'm responsible for reading NMEA data from a GPS device attached via bluetooth (to a Dell Axim X51 PDA).
I've paired the gps device with the PDA and I can run the sample program that comes with the gps device and it succesfully streams NMEA strings.
In system settings, in GPS settings, I've set up a COM port (8) for programs to use to obtain GPS data, however, when providing the details for the GPS hardware port there doesn't seem to be a matching baud rate to the one I had to use in the sample program? Does this matter? What does baud rate actually mean?
Now, as far as I understand the settings, I should now be able to read NMEA data over COM 8?
However, when I print out:
System.getProperty("microedition.commports")
COM8 does not appear in the list returned and if I try and open a connection on that port I get the following error:
java.io.IOException: GetCommState() failed; error code=21, (21) The device is not ready.
Any pointers on successfully setting up the COM port for reading, and actually reading from it would be most welcome. I'm pretty stumped and clueless as to what to do.
Don't know about that particular device, but the usual way of opening a bluetooth COM port in J2ME is using the JSR-82 API.
You would scan for devices within your vicinity, figure out which is your GPS (usually contains "GPS" in the friendly name), scan for services on that device (most GPSs only offer one), and open a BTSPP connection to that service.
There is a good chance the j2me implementation on your device doesn't support bluetooth COM ports at all. I would suggest confirming that first. It could be worth comparing the result of the system property call on other (recent) handsets.

How to detect the port to which a GPS device is connected in my program(C/C )

I am writing a program to plot the route.
Is there a way to find out the GPS device connected port?
I can list out all available ports now. But would be nice to list the GPS device port.
The only way to do this is to open each port, and listen a bit for NMEA data. The port attributes don't change based on the data sent through it.
There is nothing standard in serial hardware that allows for easy identification (like deviceid's in usb). In the case of nmea protocol you will just have to open each port and see on which one the nmea data is coming in. Then close the ports you don't need.

how to read GPS information on linux and on windows

Is it possible to get location information from the GPS to my laptop?
As I understand it, I can connect the GPS device by a cable to my laptop (through UART or through USB) and get this information.
I don't have a specific GPS device, so any example of how to get this information on any device will be great.
(My main goal is to save this information on a file while I'm driving and then, by using an online map, see the places I've beem)
Once you have a UART / RS232 type connection, GPS is typically streamed through in NMEA 0183 format which is comma separated ASCII. It is easy enough to decode, and there are plenty of free examples out there on how to do this.

Receive Sms from gprs modem

I have attached a HUAWEI Gprs Modem to my computer. I want to receive sms messages sent to this device via my delphi application.
I have no ideea how can i do this can somebody point me to the right direction
You will be required to Communicate with the modem using AT Commands over a serial port ( physical / emulated in case of USB) . you may search for similar programs and what AT commands you need to issue to read messages.
Use a ComPort or a similar library to connect to the modem, then use these extended Hayes commands:
To enter a PIN code:
AT+CPIN=<pin_code>
To use text mode instead of PDU
AT+CMGF=1
To start receiving SMS's in live without polling and saving to SIM card:
AT+CNMI=1,2,0,1,1
To send an SMS:
AT+CMGS="<recipient>"
Message body.<char #27>
This is probably enough to get you started, if you want more features you should really learn the PDU syntax, it is mighty powerful.
You can also refer to a simple SMS gateway that I wrote a couple of years ago:
SmsManager.pas
I wrote a full blown commercial sms gateway 10 years ago now. So I think I can help you :)
You need to get familiar with the PDU encoding of the sms messages as this will give you the most flexibility. To better understand the PDU encoding I suggest you go visit this site. It is also very useful to read the about the AT command set that your modem supports, start with the modem manual. Most commands are universal though and are supported by all modem brands.
Here are some commands to get you started:
AT+CMGS : to send an sms
AT+CMGR : to read an sms
AT+CMGD : to delete an sms from the mobile
If you want information how to communicate with the modem, decode/encode messages, convert character sets, etc., I suggest to check out the source code from the (kannel sms gateway). (hint: search for file smsc_at.c under folder gw\smsc).
The code is written in c but it shouldn't be too hard to understand (a bit of C knowledge is welcome though).

Why I am not able to receive sms using AT commands?

I want to send / receive sms using AT commands from my computer to my mobile phone. I connected my phone to my computer using a USB port. My computer detects the modem and I am able to send sms from the computer to mobile phone. However, I am not able to receive sms in my computer..
I am presenting a sample of what I get from AT editor
AT+CMGF=1
OK
AT+CNMI=1,2,0,0,0
Error
What can I do to send this prob and why am I getting this Error?
Every phone has different capabilities so you should check which values for each parameter are valid for your phone by sending it a
AT+CNMI=?
For example my phone doesn't support your example because mode 1 is not supported. For the full syntax of +CNMI you can consult the AT Manual of your manufacturer or the ETSI standard or read this brief tutorial http://www.cellular.co.za/at_etsi.htm
AT+CNMI is used anyway just to get a notification when a SMS arrives, in order to read the content of the stored SMS you have to use AT+CMGL= or AT+CMGR=.
Briefly:
AT+CMGF=1 ;sets the text mode
AT+CMGL=? ;tells you which memories are available
AT+CSCS=? ;tells you which character sets are available
AT+CSCS="8859-1" ;sets Latin1 as the charset so that you can see eventually accented letters
AT+CMGL="ALL" ;prints every text message you have stored in your phone
Most of the phones returns Error when some special AT command sent to them and +CNMI is one of that command. It will return error also when send AT+CNMI=?.
So forget Phones buy a GSM Modem based on RS232 or USB and then try it again.

Resources