zte voice modem problem - modem

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)

Related

USB packet and data buffer capture

I need a software or application with API support to capture USB packet and data buffer. I would like to analyse the captured data using LabVIEW.
Suggest applications for usb packet and data capture with API support, so that I can access them using LabVIEW.
Or
Alternate methods to capture and analyse usb data using LabVIEW
I had tried a approach using logman.exe . But that doesn't log all the USB packets. Has anyone tried logman to capture the usb packets?
you can consider using VISA functions.
A few examples are shipped with Labview (open example finder and look for USB).
Here is a starting point giving instructions about how to give VISA access to the device.
You need find out some windows dll's and use it in labview. the examples provided for NI USB devices.

How to get audio from GSM modem - Not to a speaker but as a RTP stream

I have a GSM modem with a serial port and soldered points for MIC and Speaker. Through the serial port I can send AT signalling commands, send SMS and make/receive calls. I had to solder a speaker and a MIC to the modem card. My problem is that I want to read the audio stream as a RTP stream, possibly through some intermediate hardware/software. My goal is to ultimately get the audio as a RTP stream on some port with some RTP profile. I understand that I need to run a UDP server to serve the audio over a UDP IP-address/port tuple, but how do I get the audio to the UDP server in the first place? Codec conversion is also something that I am familiar with and am aware that I may need it.
This is a simplified diagram of what I intend to do:
GSM-modem-audio ---*1*---> audio-over UDP(ip-address:port)---->
>---*2*--> Kurento RTPendpoint---*3*--->Kurento-WebRTC endpoint
I don't know how to handle part * 1 * piece of the puzzle.
Easy way: get Rassbery-PI, get usb sound card, connect analog output of modem to sound card.
Have be no problem convert digital ALSA sound card signal to rtp stream.
More complex way - create special hardware which will do same.. oh wait! That will be like sangoma board.
Anyway it is not wise idea create something like that yourself except for educational purpose, becuase it will be costly or low quality.

NAudio decode stream of bytes

Hi
I am using the NAudio library at http://naudio.codeplex.com/
I have this hardware made by some manufacturer which claims to send
audio with the following characteristics.
aLaw 8khz, AUD:11,0,3336,0
Not sure what it all means at this stage.
I received bunch of bytes from this device when a user speaks into the
equipment.
Hence I am constantly recieving a stream of bytes at particular times
At this stage I have been unable to decode the audio so I can hear
what is spoken into the device with my headphones.
I have tried writing the audio to a file doing code like
FWaveFileWriter = new WaveFileWriter("C:\Test4.wav",
WaveFormat.CreateALawFormat(8000, 1));
And have been unable to playback the sound using the sample demo apps.
I have tried similar code from
http://naudio.codeplex.com/Thread/View.aspx?ThreadId=231245 and
http://naudio.codeplex.com/Thread/View.aspx?ThreadId=83270
and still have not been able to achieve much.
Any information is appreciated.
Thanks
Allen
If you are definitely receiving raw a-law audio (mono 8kHz) then your code to create a WAV file should work correctly and result in a file that can play in Windows Media Player.
I suspect that maybe your incoming byte stream is wrapped in some other kind of protocol. I'm afraid I don't know what "AUD:11,0,3336,0" means, but that might be a place to start investigating. Do you hear anything intelligible at all when you play back the file?

Voicepath GSM modem a single wave file

When a GSM modem is receiving voice(i.e., multiple wave files continuously) in the voice path, how will the modem able to identify the completion of a single wave file? Is there any software that could perform this?
The modem doesn't actually send wave files (in the sense of .wav files), because these require a header that describes how long the file is. Instead, the modem keeps sending raw data until either the call ends or the computer tells it to stop. The modem signals the end of the data with a DLE byte followed by a ! - see the wikipedia article about voice modem commands for details of this (and for how a DLE byte is sent in the datastream).
As for converting the data to .wav or another usable format: many audio conversion programs can do this; soxis one such command-line program.
A GSM mobile station may support different bearers. Depending on device capability this includes
voice
circuit switched data
packet switched data
A mobile phone typically supports voice, CS data and PS data. A GSM modem may support PS data only. Each of these bearers are implemented differently in order to utilize the radio channel effectively.
You can transport a WAV file via an packet switched bearer, however then it will be transported using IP technology. This needs an application on both endpoints handling the transport and the presentation to the user, e.g. playout.
A voice bearer supplies a continuous audio stream, starting with connecting the call and ending with terminating the call. GSM does not support discrete portions of audio on the voice bearer. Playing a WAV file on the voice bearer is a non-standard functionality for virtually all commercial devices. You may need to find test devices supporting this.
If you use the voice bearer to play out the WAV file like a normal telephone call and want to detect completion of a playout you may detect a pattern in the audio (requires an algorithm to calculate similarity since your WAV file will be encoded several times and may be mixed with noise) or use some sort of out-of-band signalling, some phones support dual mode, i.e. running voice bearer and PS bearer in parallel. Both not trivial to do.

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