Voice commands for Huawei GSM/UMTS usb dongles? - usb

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

Related

Silicon Labs CP2102 interface. How to talk using minocom

I have an infrared thermometer which operates on a virtual serial port over USB, which I am trying to use on a Linux intel and next on a raspberry Pi. The system did not enumerate a /dev/ttyUSB device.
I found a piece of a solution here :
Cygnal Integrated Products serial port on Linux
I reprogrammed the product_ID and can now see it as /dev/ttyUSB0.
But trying to talk to the thermometer with minicom doesn't work.
minicom keeps saying "disconnected" despite the "9600 8N1" indication.
I must say, I had many attempt to work with this kind of communication over USB/serial adapter trying using many different terminal emulator like screen or minicom but without any success at all !
I'm not even sure about the right way to send request and receive data.
Here is the documentation I'm using trying to talk to the thermometer :
http://www.optris.com/interfaces?file=tl_files/downloads/Manuals/addendums-de-en/ct-ctlaser-commands.pdf
Edit :
I'm now trying to use PySerial Python library in a Python script with an Arduino as a target (to act as my thermometer, the arduino runs a simple code that takes the data received and send them back to my Python console.) But still, there is so many confusion possible between ASCII, Hexa, binary, that I'm not capable of debugging anything as I don't know where the transformation between different format takes place !
The communication is working as I can get some data forth and back from my Python console through the Arduino. But I can't get sending hexadecimal data and getting any response back in hexadecimal format. + You say "Your latest question puts you in the off-topic category. ", what do you mean ? Sorry of being so confused.

GSM Modem not able to receive SMS

i doing a simple application that able to integrate with GSM Modem to send and receive the SMS. i had completed the send SMS part, but i not able to receive the SMS. i get error message said that my SIM card memory is full when trying to send the SMS with other mobile device to my SIM card in the GSM Modem. i tried to use the AT command "AT+CMGL" to remove all the messages, but still same. May i know there are any method to store the message in my computer memory so that i able to receive the SMS with my GSM Modem. I using the sample code from here
http://www.codeproject.com/Articles/38705/Send-and-Read-SMS-through-a-GSM-Modem-using-AT-Com
The AT+CMGL command is for listing messages, not deleting them. Deleting messages is done with the AT+CMGD command. Do yourself a favour and download a copy of the 3GPP 27.005 standard, it defines all the standard sms AT commands (most other mobile phone AT commands are defined in 27.007), and by all means get a copy of the ITU standard V.250 which defines the basic command syntax, structure and behaviour for AT commands - an absolute must read for anyone that issues AT commands (read all of chapter 5 at least). These documents are more valuable than any random internet web site, including stackoverflow.
Speaking of random websites, the web page you linked as source seems to be of dubious value. It gives an example function DeleteMsg which issues AT+CMGF=1 but this command does in no way delete anything, it selects text or PDU mode for the various sms related commands.
It does have response handling that is better than the horrible send-sleep-read mistake that unfortunately is not as uncommon as it ought to be, but it is only half decent and not robust at all.
After sending an AT command to a modem you should continuously read and parse response lines from the modem (over and over again) until you receive a final result code (and not just once). See this answer for details.
All of the the message commands operate on the storage location set by AT+CPMS. And notice that you should always set <mem1> and <mem2> at the same time, e.g.
AT+CPMS="SM","SM"
It both makes little sense to only change one of mem1/mem2, and some phones do not like attempts to set only one of them.

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

zte voice modem problem

we are using zte usb modem. we try to call by AT command (ATD) successfully. But there is no sound when remote device answered.
Does anyone have any idea?
My problem was associated with ZTE usb modem.
I solved the problem.
i can receive and send voice separately to voice port now. But i can not get clean sound like WCDMA UI.
how can i receive and send data with high quality?
Please look at my source code. [http://serv7.boxca.com/files/0/z9g2d59a8rtw6n/ModemDial.zip]
Does anyone now where is my error?
Thank you for your time.
a) Not all zte usb modems supports voice, to detect if modem supports check for ZTE voUSB Device in your ports list.
b) If port present, voice will go through it in pcm format, with 64kbps frequency (8000 samples per sec, 8 sample size).
In your own program, you should read audio stream from there.
stream is additionaly encoded with g.711, so you need to decode it before sending to audio device
It is fairly common to shut off the speaker after connection. Try sending ATM2, that should make the speaker always on.
Basic hayes command set:
M2
Speaker always on (data sounds are heard after CONNECT)
I'm trying to use asterisk's chan_dongle module on ZTE MF180 Datacard model with activated voices abilities.
Originally chan_dongle using raw PCM format on voice data.
But i was discover, that ZTE using ulaw format on sending and recciving voice data.
You can get voice data and save file in this format for learn by using standard Asterisk's Record(filename:ulaw) command in dialplan.
My voice data, dumped from ZTE modem in the same format.
I check it. ZTE dumped data was successefully played by Asterisk's command Playback(dumped)

How to get NMEA from the GPS Device?

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