GPRS and GPS on embedded Linux - gps

I've got an embedded linux and a Telit gprs/gps module ("GM862-GPS" on USB-Port). My current project requires it to be connected via gprs for sending data, while continuously asking the module for the gps position. I'm connected to gprs with a ppp-daemon and chatsripts, but when the connection is established, the module seems to be locked (no reaction on AT-commands through minicom).
I read, that 'AT+CMUX' could be one solution, which is provided by this device, but I don't know how to use it, since the 'CMUX User Guide' by Telit isn't really helpfull (and a program for automatic setup is only provided for windows).
Does anyone know, how to deal with this command, or even knows a better choice to handle this problem ?

My answer might be too late.
You need to use CMUX to create another COM port to talk to it. I played with CMUX once and I understand your frustrations. In my case, it worked for a while and then failed and I couldn't find out why. You might want to post your question at Roundsolutions.
I programmed the module by writing Python scripts and upload to the module. Their Python API provides two channels to send AT commands to the module: MDM and MDM2. I use MDM as the AT command and use MDM2 to create sockets. Initially, you use MDM2 to send AT commands to create a socket connection. Once connected, whatever data sent to it will be interpreted as data stream instead of AT commands. They allow you to send '+++' to switch back to AT command mode.

Related

using webrtc for audio broadcast

I'm trying to stream a microphone/audio to multiple clients.
the broadcaster is a screenless raspberry, so I can't open a Webbrowser and click on "share mircophone"
The clients will be using their smartphone to listen.
the latency must be super low.
I did not find any WebRTC Demo that worked. All of them are either p2p or the scalable Broadcasting from muaz khan is only working for the initiator; not clients.
I came across Janus (which I didn't really understand what exactly this is doing) but I don't get how to install this and how to configure it.
Is there any way to easily share the microphone's output via WebRTC? Something like Apache hosting a simple website where the microphone audio is hosted on?
Thanks for all the ideas on how to solve it!
Is there any way to easily share the microphone's output via WebRTC?
No. There's nothing easy or simple about WebRTC.
the broadcaster is a screenless raspberry, so I can't open a Webbrowser and click on "share mircophone"
This is the simplest option... running a browser. Are you sure you need to actually allow it to access the audio device?
In the past, I've used a flag on Chromium to get around this problem. I don't remember exactly what that flag was, but looking at the list, it might have been...
--use-fake-ui-for-media-stream
You might also be able to use --enable-kiosk-mode.
At a minimum, if you were to open the browser interactively and enable access, that page would get automatic access in the future.
I did not find any WebRTC Demo that worked. All of them are either p2p
WebRTC is peer-to-peer, but remember that the "server" can be one of those "peers".
Finally, you can look into using GStreamer, but don't expect anything quick and easy. https://github.com/centricular/gstwebrtc-demos

Use Arduino programmer modes to upload code on virtual COM port

This question is related to Upload Arduino code on virtual serial port through Arduino IDE. The main problem is being able to upload code onto virtual COM port instead of using Arduino so I could take the binary code output and use it in some other application. The problem with that is that the process of uploading is also related to the bootloader on the Arduino and that's why the upload process never reaches 100%. The suggested solution was either to implement a bootloader in my application or use something that is already out there.
My question now is can I make use of the different programmer modes in the Arduino IDE to sort of by-pass the bootloader so the upload process can reach 100% and the code would actually reach the virtual COM port?
Any help would be highly appreciated. Thanks
Sounds like your Virtual Serial Port driver is getting stuck on some timeouts or buffers. The IDE calls avrdude with a specific protocol to match with what is built into the Arduino's bootloader, loaded on the AVR. There are other bootloader (in fact many, too many to mention), some of which may have different timing and such, but to use them would basically no longer be Arduino. to see the possibilities .\avrdude.exe -c.
If you are just trying to get a dump of what is going over the Serial port. I have used Virtual Serial Ports Emulator . It is very versatile in that its modular, allowing you to build up what you want.
Also, as mentioned from the other threads about this, note the data over the serial port is formated ontop of the STK500 protocol. You also mention in other thread that you don't want to use another tool to get the data. Whereas in order to use another protocol you would need to change the source compiler.java and rebuild the project as to call avrdude with the new protocol. So you might as well just get it with another tool. see below this will tie back in.
you can get the raw binary, from what is being fed to avrdude. Where as it may not be initially obvious. As avrdude get ELF not BIN. The Arduino IDE contains all of avr-gcc and its tools. Where avr-objcopy located in .\Arduino\hardware\tools\avr\bin can convert the IDE's output that is funneled into avrdude, to the binary you likely desire. No need for scoping the serial port stream.
To do this by hand, You need to locate IDE's temp working directory, by enabling the IDE's verbose compile prints. And also likely put avr-objcopy in your path. then simply call it as in the below example, substituting your sketch's filename, in place of mine.
C:\Users\mflaga\AppData\Local\Temp\build6135656488044319492.tmp>avr-objcopy -I ihex FilePlayer.cpp.hex -O binary FilePlayer.cpp.bin
Where as you could replace avrdude.exe with a batchfile that calls both avrdude and avr-objcopy to automat

Creating a WebRTC receiver

I am new to WebRTC and trying to figure out how to create a program outside a browser which receives a WebRTC audio stream and outputs it on speakers.
Are there any WebRTC libraries for Java or C#?
That receiver will be running on a linux machine.
--
I've been thinking about using getUserMedia() to access the microphone. But then:
In what format will such a stream be transmitted?
Let's say I use WebRTC2SIP and build a Java endpoint using JSIP;
or I just use a socket and send the stream over http.
What audio format will I get on the receiver side? So far I have read WebRTC does compress the stream somehow.
I guess there are two ways for you:
build the whole WebRTC voice engine for android/iOS or Mac etc., and just use the API provide by VOE.
build standalone NS/VAD/AECM/AGC modules and using it in your project. for example, you build standalone NS module for android mobile, you use AudioRecord(java layer, android things) to record sound from MIC, and do the noise suppression process on these data(jni layer, WebRTC things), and finally playback the processed data by using AudioTrack(java layer, android things).
EDIT:
for the 2nd situation, the format is PCM raw data.
Check out the working Audio demo and code at demo.easyrtc.com
The code is all open source and can be checked out at https://github.com/priologic/easyrtc
You can look for any known issues around easyRTC at our forum at
https://groups.google.com/forum/#!forum/easyrtc
Also check out our main site at easyrtc.com

Sending AT commands to my internal UMTS modem

I have a thinkpad laptop and I would like to send AT commands to my modem once it is connected to the network. The interface that is used is '/dev/ttyACM0'. What is the best way to send my commands there? I tried gnokii but wasn't able to connect to my modem :/ I also tried echo'ing commands to the device, this worked, but it is not easy to get the output of the command to proceed with the computation. Maybe one of you guys has a better way to do this. TIA
Have you tried minicom? (assuming from your interface that you are using Linux)
Introduction to minicom.
Entering "minicom" in www.alternativeto.net gives a link to another terminal emulator for Linux called Cutecom, but I have no personal experience of it.

What's the best way to spy on IOCTLs?

I have a U9 Telit modem which, at first, appears as a disk drive on USB bus. Then, the native software after autorun and install, sends a couple of IOCTLs to tell the device to reappear as other things. I can see them in procmon.
I want to better spy on these, to know exactly what they send and how, in order to do the same in proper way.
Try something like Systemtap. Attach a probe that dumps all ioctls and arguments from the kernel, grep through them.
You could use something like strace under linux. The windows equivalent is discussed here Systrace for Windows.
This might show you the ioctl commands sent.
Some companies offer the linux kernels of their devices as direct download from their official webpage. There you might find more information on how it works. For some devices, it's easy to build and deploy your own kernel. This helps as you can add custom debug output.