Asterisk or Mumble?

09 Aug 2016 10:01 #30342 by Algernon
This thread is to look into the best VOIP solution for the UHF project. At time of writing, Mumble can in theory perform the required functionality for intercom and radio communications; Richard suggests an FGCom improvement, which runs on Asterisk. There may also be other options to be considered. But let's look into Asterisk first.

Please Log in or Create an account to join the conversation.

09 Aug 2016 10:03 #30344 by Algernon

Richard wrote: Using RPI in a modular distributed system is a great idea; providing that the devices are properly integrated with the simulation host (i.e. FG pc). Latency and frame synchronisation need to be considered as does the method of communicating; but I think this is well understood.

I don't know if you've looked into FGcom but it's basically an IAX VOIP client for asterisk. The FGCom server is just an asterisk server configured in a certain way. I'm sure you already know this but asterisk is a fully fledged PBX VOIP system. I'm using one at home to run our phones. So the problems with channels and quality are all configuration related. The one thing that I don't think we would be able to simulate is two stations transmitting simultaneously on the same frequency and the results based on receiver distances from the two stations. In terms of the audio quality asterisk supports many different codecs, which is good because we can match the codec to the available bandwidth in each frequency band to get an approximation of the quality you'd expect from VHF/UHF.

You can configure your own FGCom server probably quite easily.

I'm sure that there were a whole heap of issues and workarounds that will need to be addressed with mumble; and possibly FGCom has already fixed most of these.

If using a standalone FGCom client then it might be easy to reconfigure and customise.

But I don't really know much about how mumble works so it might be more suitable

Please Log in or Create an account to join the conversation.

09 Aug 2016 10:37 #30349 by Algernon
Yes, latency and frame synchronisation - if I understand correctly, that you mean sounds and visual actions being synchronised, are a big consideration, although to some extent we can live with a certain amount as very few of the sounds coming through the headset will be associated with a visual "cue".

I haven't looked into FGCom, I'm only really judging it by its current implementation built into FlightGear. There are certain functions I would like from the UHF system which seem to have been far from the developers minds when FGCom was built. But having looked at Asterisk's website, I can first of all tell why FlightGear used it :) and can see the potential. I'll summarise the concept:

Anyone with a powered up compatible radio is connected to the server. Upon connection, the client joins a "channel" associated with the frequency on their radio set, or creates one if it does not exist (this is based on Mumble's "temporary channels", where a channel is created and remains extant until the last user leaves). There is no time out. The MP callsign of each client is identified and available to Nasal for basic propagation calculations They can also "link" into other channels: principally, aircraft intercom (channels distinct from the radio spectrum channels), some which are listen only. For example, a Vulcan intercom might have four crew (in separate locations naturally) connected "locally", with ground crew able to join in while the aicraft is "plugged in" to ground services, and a telebrief (receive only intercom) as well as potentially two U/VHF radios. And possibly HF as well, eventually. I have now reached the far end of the wish list! :)

So, the requirements for a client seem to be - the ability to be in multiple channels at once, with different privileges; the ability to create channels on an ad-hoc basis; the ability to identify other channel users; high-quality audio codec; half-decent volume please!! FGCom is dreadfully quiet; and also, though this is more in the "would like" section, the ability to pass back information on when someone is "live" or "transmitting" so that the local radio system can do nice little touches.

I'd imagine we'd need to modify FGCom quite a lot... is that likely to be a reasonable task for people like Scott and I with relatively little experience?

Please Log in or Create an account to join the conversation.

09 Aug 2016 16:32 - 09 Aug 2016 16:38 #30369 by Richard
If you've not already had a look at the sources for fgcom sourceforge.net/p/flightgear/flightgear/...tils/fgcom/fgcom.cxx then I suggest you do.

Asterisk is pretty fleixble; but I think the key difference that we should use is to have effectively one FGCom per radio set. This is closer to real life; as most aircraft have some sort of audio mixing/control panel that all the radios feed into.

In terms of the volume and the quality I suspect this is just a codec issue. Also by using asterisk you get bucket loads of features that might come in handy.

I reckon that you would find it easy enough to modify FGCom, maybe a bit more complicated to build it. I can assist with this process.

So I think the next step is to properly analyse Asterisk/IAX/FGCom and understand how it works to see if you think it is missing anything substantial that mumble would give you.

Latency is often a problem; but hard to explain or predict as it depends. Take an example of a switch in the cockpit when propogated over the network might take 0.2 seconds to turn the audio off; which would be a strange sensation.

Please Log in or Create an account to join the conversation.

17 Aug 2016 10:43 #30672 by ScottBouch
After my first experience of using mumble on a PC yesterday, I've had a play with installing Mumble client onto a Raspberry Pi 1 Model B.

I couldn't find any guidance on how to configure Mumble using the command line, so instead installed the desktop edition of OS, and installed Mumble Client. I can install it from the command line, but that's about the end of it, so needed to use the GUI for config.

I am using a cheapo USB sound card for my headset. It was relatively plug and play, just required setting as the default sound device in sound settings for input and output.

When calibrating Mumble, and setting the audio buffer, I got no audio out of mumble. Setting the microphone gain worked well though.

I've not yet had chance to test it with someone else over the internet.

I was able to record my speech using Mumble, and played it back using VLC. It sounded very rough and chopped up.

There may be room for improvement with:
Messing with mumble settings (I've not explored it fully yet)
Using a raspberry Pi 2 or 3 for the job, instead of 1.

I have a Pi2 running Kodi on the TV in the front room, I'll see if I can borrow that for testing.

Cheers, Scott

Please Log in or Create an account to join the conversation.

17 Aug 2016 10:50 #30674 by Algernon
VOIP is apparently quite demanding, so you may find a more powerful Pi will improve things significantly. I'll be able to test a bit later, if we can match up times, I'm running about rather this morning but should have an hour or so this afternoon...

Please Log in or Create an account to join the conversation.

17 Aug 2016 12:22 #30675 by ScottBouch
Awesome, suggest a time and I'll try and make it as long as the phone doesn't ring...

Please Log in or Create an account to join the conversation.

17 Aug 2016 12:29 #30676 by Algernon
How about 2pm? I should have half an hour to an hour then - would also like to test the VHF in the Lightning with FGCom if possible...

Please Log in or Create an account to join the conversation.

17 Aug 2016 12:38 - 17 Aug 2016 12:41 #30677 by ScottBouch
OOHHHH!! IT works!

I've tried using a mumble app on my smartphone, as user Scott, and the raspberry Pi as user Fright, and it works fantasticisamally!

I set the Pi to low quality, 16 kb/s, it worked fine. I tried upping the quality, and it kept up until I was at 60 something, and it started to break up a little. And all this is on a Raspberry Pi 1 Model B, the first generation ever released.. and my first ever Pi.

Oooh, I nearly Jizzed in my pants!

Great stuff, ready for a call when you are dude.

Looks like we nay have the basis of a >£35 solution for remote comms audio! Hoorah! It'll be good to now see if we can make it headless / GUI-less.

Cheers, Fright

Please Log in or Create an account to join the conversation.

17 Aug 2016 12:43 - 17 Aug 2016 12:44 #30678 by ScottBouch

Algernon wrote: How about 2pm? I should have half an hour to an hour then - would also like to test the VHF in the Lightning with FGCom if possible...


2:00 is fine, but I will only have a smattering of 5 to 10 minute periods, so will probably only be able to test mumble, probably won't be able to get into flying / deeper testing myself today.

Cheers!

Please Log in or Create an account to join the conversation.

17 Aug 2016 12:53 #30679 by Algernon
Ok cool - no hurry with the U/VHF, I just forgot to test it out before the release but I intend to update it next week anyway so no problem...

Please Log in or Create an account to join the conversation.

17 Aug 2016 15:12 #30680 by ScottBouch
Hi all,

Today Algy and myself had a successful test using his Mumble server, connecting his PC to my Raspberry Pi 1 client!

After a bit of messing about with audio quality settings, we got it working, starting off at 16kb/s, and it worked right up to 61kb/s! But we backed it off to 56kb/s to give the Pi a little more headroom, at no significant loss to quality.

To perfect it, I still need to work on my mic gain, and PTT threshold, as it was cutting me out half way through long sentences when I went a bit quiet, could also be related to Automatic Gain Control of the cheapo sound card.

Thinking about it, in terms of Flightgear simulation, a PTT button would be used, so the threshold cut-out issue I had would go away anyway!

I now have the VOIP bug, and am thinking about an intercom to the front door from my smartphone!

Cheers, Fright
The following user(s) said Thank You: enrogue

Please Log in or Create an account to join the conversation.

18 Aug 2016 15:35 #30705 by ScottBouch

Please Log in or Create an account to join the conversation.

Time to create page: 0.220 seconds
Powered by Kunena Forum

PM Mailbox

You are not logged in.