So, I’ve been trying to stream audio off of a USB microphone connected to an Arduino Yun.
Looking into it online I found some examples using ffserver & ffmpeg, which sounded like they could do the trick.
However right from the start I’ve had many problems with playing the streams on Android and iOS devices.
Seems Android likes a certain list of codecs (http://developer.android.com/guide/appendix/media-formats.html) and iOS like a different set of codecs (Link here), but they do have on codec in common – good ol’ MP3.
Unfortunately, the OpenWRT on the Arduino Yun has an ffmpeg build which does not provide MP3 encoding… it does have the MP3 muxer/container format, but streaming anything other then MP3 in it (for example MP2, which the Yun-ffmpeg does have) simply doesn’t work on the Android/iOS.
From experiments streaming from my PC a ffmpeg/libmp3lame MP3 stream, it looks like the mobile devices are quite happy with it – so I will need to recompile ffmpeg with Lame MP3 support to be able to stream it.
Category: Networking
This is a quick tip. If you need to push a notification to your smartphone, or even send a file, I recently stumbled upon “Pushbullet“.
I was looking for a solution to send a file (with automatic download) to my phone, via bash script on my raspberry pi. I’ve been using pushover for a while, but as far as I know, it doesn’t support files
I have read the Pushbullet API, and came to realise that sending a file have 3 steps
1. Getting credentials to send the file
2. Upload the file to a remote server
3. Send a notification of “file” type with the download url
Of course, you can do 1 and 2 youself if you have access to a place which stores the file (I also managed to send a dropbox download link)
You need to sign up for Pushbullet via web, to get the api key, and also install the app on your smartphone (obviously)
So here is the bash script (It’s not elegant – but it works)
Not long ago, I have purchased an IP camera for my home. A nice toy I must say. I wanted to expose this camera for outside access. The issue is that this camera’s interface does not support SSL.
Well because privacy is involved, the least I could do is add SSL somehow. I googled a bit and came across this article. I decided to use my raspberry pi for that.
The process itself is relatively easy but I had to do some improvisations over the article above. So I decided to make a tutorial for this.
You can use this to add SSL layer on top of every http you have.
So here we go:
Well, At least when it comes to SIP communication
Update:
Well, there has been a great leap in Android support with VoIP. Skype has released a decent client for most Android based phones (with the exception of Galaxy S, and USA Based clients cannot use 3G), and I have discovered another excellent VoIP client for Android called cSipSimple (If you liked Sipdroid I advise you to check this one out as well. It’s my current default).
Other than that, the upcoming Android 2.3 is said to have native SIP support which is extremely cool
Having said all that, enjoy my original post 🙂
A Smartphone, as its name implies is… eventually… a smart phone! Exactly! That’s what I thought. And as one I should have the ability to run any software that is compatible with its hardware and software.
That turns out to be almost true. VoIP is off the limit.
And it is not because the device cannot handle it, Far from it. It is because mobile companies are afraid for their revenues. When people are using VoIP on their infrastructure, it takes away money from them. Oh you poor phone companies. My heart goes out for you.
And after all the tears run out, I went out to look for some VoIP that DOES work for me. SKYPE of course was off limit. Even though there is “Skype Lite Beta” for Android, it does not support Skype-to-Skype user call. And why should it? Skype is an excellent IM software and VoIP is only secondary (wink).
I then stumbled upon SipDroid. Sip droid is a SIP client for android. This is great if you have a SIP account provider. I for instance, have an account which runs on asterisk server (open source IPBX system).
I got the installation of SipDroid at once! And installed on my phone to try it.
What can I say? It has huge potential. But it is only fully compatible with its mother ship, which is pbxes.com. Luckily (but of course – not a solution) they allow you to enter your own sip account there so you can connect to it through them (like connecting to your neighbor through china… but it works). Although pbxes.com has a strange certification error they claim is negligible.
So, using it directly with asterisk server causes poor outgoing audio which is lame. I’m sure some people might be able to tweak their server to handle it directly and properly but I didn’t manage to do that… nor found proper idea sharing on that subject.
But this client is still in beta stage so I honestly believe it will kick ass when it’s complete.
It’s no Skype, and I hope some Skype-like client like Fring will port soon for Android, but until then, it’s better than nothing.
Two important notes if you want to use it:
- If you are planning to download it from the Android Market – You will get a limited version which disables usage of VoIP over 3G/EDGE. So if you want the full one then download it directly from the project page.
- VoIP data, is currently 1.20mb per minute, so watch your data plan
This is the story of my journey to find a way to run a process (or a program on a remote pc)
This wasn’t an easy thing at all…
Overall, I thought, this should be an easy thing to do.
I found this C# code on a Microsoft forums
object[] theProcessToRun = { "notepad.exe" }; ConnectionOptions theConnection = new ConnectionOptions(); theConnection.Username = "username"; theConnection.Password = "password"; ManagementScope theScope = new ManagementScope("<\\\\" + IP + "\\root\\cimv2", theConnection); ManagementClass theClass = new ManagementClass(theScope, new ManagementPath("Win32_Process"), new ObjectGetOptions()); theClass.InvokeMethod("Create", theProcessToRun);
I tried this code, not after forgetting to disable the firewall on the remote computer – a big downside but I guess if I had gone with it I’d hunt a way to stable port to unblock in the firewall.
Â
Then I found the big downside (which can be an upside to some of you):
The remote process this way will never have a GUI window opened (In this example, a process of notepad will be opened in the background).
This can be a big advantage to system admins which want to run scripts.
Â
Ok, back to the quest.
Not too long ago, I wrote a network administration utility with specific needs.
One of the needs was to scan all the LAN pool for MAC addresses.
The code will look at your active network adapters, calculate start and end IP according to your address and netmask,
and query all the IPs within that range for their MAC address.
The code is written in C#, and it’s basically going over the whole range in a nested loop.
If you find this useful, you are welcome to use the code: