How to get NMEA from the GPS Device? - gps

im trying to read the current position of GPS Device...using N95 from Nokia.
I read tht i will need my device to return the NMEA lines to the serialport and then i will parse/split it to get things I want but all along I dont know what to write to the serialport to make device return the NMEA ?
Like There are other commands of AT for messaging etc...Is there any specific command to send to serialport to get NMEA ???

I found this site site which seems to guide you through everything you need to do.

I am not sure how it works in the N95, but in my HTC phone you cannot send commands to the GPS device to have it behave in a certain manner. Once I am connected to the serial port that the GPS device uses I can read a stream of data coming from it, which happens to be NMEA data. There is no way that I have found to send commands to the device to tell it how to behave.

I haven't used that specific GPS device before, but for mine, I just have to open the port and I start receiving the NMEA data immediately.

I have an N82, and as far as I know it doesn't speak NMEA directly. I use a script from this page - specifically one the titled "# Turn your S60 phone with an internal GPS (eg your N95) into a Bluetooth GPS" - to get NMEA strings.

Ahh oki so I need to run some script.Oki I think i should buy a specific GPS Device for it.
Which device will do my job in cheapest manner ?

I've never worked specifically with the N95, but most GPS devices will just start spitting out NMEA as soon as they're powered up, regardless of whether or not they have a lock. I don't know how the N95 is designed, but I'll bet it probably wasn't designed to give you access to the raw NMEA data from the GPS. You'll probably need some pretty fancy trickery to get it to do that.
If you don't need to use the N95, you might find it easier to just get a GPS module and use that instead. I've always purchased mine from SparkFun. They have some good evaluation boards boards and tutorials to help you get started.

A great way of doing this in Java ME is to use JSR 179: the Location API. Your app needs to create an implementation of LocationListener, then set it on the default LocationProvider. When your listener's locationUpdated method gets called, call:
location.getExtraInfo("application/X-jsr179-location-nmea");
This will provide access to the NMEA sentences.
You can send this over a serial port by using the Java ME commports mechanism (use:
System.getProperty("microedition.commports");
as described here).
Hope this helps,
funkybro

Related

Placing a call programmatically though GSM Modem

I was tasked with devising a solution to initiate a voice call using a GSM Modem programmatically. The call will be initiated via an API and play and audio file or just ring a number and then drop the call. This is to be used to notify staff during the night about critical alarms on the network.
Does anyone know of a solution or worked on something similar?
GSM network modem with SIM Card is to be used.
I'm not sure the staff will appreciate an autodialer like feature, rather than a text or other message, but as this is your requirement I am guessing your customer must have already made the decision.
One good approach for which there is plenty of documentation is to use an Asterisk based solution.
If you are not familiar with it, Asterisk is a open source PBX which is capable of connecting, initiating and receiving calls.
There are several firms that made GSM/UMTS interfaces cards that you can host in a standard server/PC and use as you have described above (you want to make regular GSM voice calls not VoIP over data over a GSM model I am assuming).
Some specific info on your use case is here for example:
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out+deliver+message

NAudio: Recording Audio-Card's Actual Output

I successfully use WasapiLoopbackCapture() for recording audio played on system, but I'm looking for a way to record what the user would actually hear through the speakers.
I'll explain: If a certain application plays music, WASAPI Loopback shall intercept music samples, even if Windows main volume-control is set to 0, meaning: even if no sound is actually heard through audio-card's output-jack (speakers/headphone/etc).
I'd like to intercept the audio actually "reaching" the output-jack (after ALL mixers on the audio-path have "done their job").
Is this possible using NAudio (or other infrastructure)?
A code-sample or a link to a such could come in handy.
Thanks much.
No, this is not directly possible. The loopback capture provided by WASAPI is the stream of data being sent to the audio hardware. It is the hardware that controls the actual output sound, and this is where the volume level is applied to change the output signal strength. Apart from some hardware- and driver-specific options - or some interesting hardware solutions like loopback cables or external ADC - there is no direct method to get the true output data.
One option is to get the volume level from the mixer and apply it as a scaling factor on any data you receive from the loopback stream. This is not a perfect solution, but possibly the best you can do without specific hardware support.

Voice commands for Huawei GSM/UMTS usb dongles?

I am trying to find out how to use voice functions with a HUAWEI E173 dongle in linux.
My dongle is voice enabled (voice works with the windows application).
I can check the voice activation in linux using the AT^CVOICE? command.
This tells me how the raw audio stream should be organized.
From question How make use of the Voice API to make calls using Huawei 3g Modems? I understand that the idea is to
send commands on ttyUSB2 while passing raw audio data on ttyUSB1.
I also understand that stack overflow user https://stackoverflow.com/users/1043421/sai-chaitanya has voice working in Ubuntu in this way, so that this should indeed be the right approach.
What is completely unclear to me is how to dial out voice calls, to check if someone is calling and to answer voice calls.
Can anyone provide some clue or some pointer on this?
Thanks!
To do those, you need to use AT commands on the same interface as the one you entered the AT^CVOICE? command.
For example, dialing a certain number (+1 234 567 8888 in this case):
ATD+12345678888;
You see an incoming call on the terminal with the "ring" or "RINGING" indication. You can use 'ATH' to hang up or 'ATA' to answer.
Read more about AT commands, also called the Hayes command set here:
http://en.wikipedia.org/wiki/Hayes_command_set

Reading values from a Power Meter via USB

Over the past two days, I am doing some reading on how to get data over USB from an external device which has no device driver installed. I have to read data from a WT500 Yokogawa Power Meter (basically I want to read just one of the parameter that the meter shows, just the power values) over USB. I am aware that a device driver for WT500 is available, but it has some dependencies and I do not want to install a software or change anything majorly in our node to cater to that.
I have found that libusb could be used to perform what I would want, and I have a C program that sniffs the USB device and returns some information. I have looked into usb-robot as well, which also uses libusb. The server node that I am probing has OpenSUSE Linux kernel 2.6.30. I have usbfs mounted.
Question:
I am expecting that using libusb, I would be able to get data dumps from the power meter whenever I request, via usb device. Can I request the meter something like - send 25k of data, and then upon parsing it, I get the parameter value that I am looking for? Considering that I have zero knowledge about the device, can I get some meaningful values out of it? An example code would help.
--
There are some standard messages like ?IDN with which a USBTMC device could be queried. However, specific queries need to be sent to a meter (the syntax should be there in the technical doc/manual/communication interface) if one needs to get whatever is showing up on screen.
I guess there are no easier ways of doing what I want - like just reading a file using something like fread ??
--
Yes, almost. If USBTMC module is installed (the default one in our kernel did not work, detailed explanation of installing and querying a device is here - http://code.google.com/p/scte/wiki/USBTMC), then one just needs to send some queries and read the response via cat or something from the specific files under /dev.
From the meter technical document, I see that the driver communication interface that is described is Windows specific, so I reckon I might need to do some reverse engineering.
--
Yes, but only a tiny bit or may be not at all.
Thank you.
EDIT: After a bit of googling I think I have the answers, I have added them next to the questions I asked.

GPS connection is lost and does not recover

We have developed an application on Windows.net mobile framework and it is used on a Windows 6.5 Smartphone. for our location based application. Our application is real time and tracks our employees. We are finding that the device loses its GPS signal.
Has anyone managed to restart the GPS receiver so that it starts giving the GPS signal again. I would be ever so gratefull if someone can help. We are using GeoFramework2.0 to deliver the geographic information that you need.
Regards
Sandy
The GPS is "shut down" when no application is using it. Just close your handles and re-open them.
If the GPS on your device is part of the WWAN radio (i.e. cellular phone) it may get put in to a low power state rather than being actually shut off. In that case, you can try restarting the radio.
If that doesn't work, some GPS's will allow you to send proprietary commands to them to force a reset or clear the memory. These commands are not standard and will differ significantly by manufacturer. If you have a SiRF GPS, take a look at the SiRF Binary Protocol Reference.