FGCOM Testing

From FlightGear wiki
Revision as of 07:46, 30 September 2009 by Jomo (talk | contribs) (structural changes)
Jump to navigation Jump to search
WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

This "FGCOM_Testing" is intended to support FGCOM-users in debugging their FGCOM-System directly after installation, but also for those who want to verify the basic functionality or want to readjust the audio-system. It covers the following 4 areas in more detail:

  1. Testing of the standalone FGCOM Installation
  2. Testing the FGCOM together with the FlighGear Simulator
  3. Adjusting the Microphone and Speaker volumes
  • In the Appendix you will find supporting informations
  • Of course the prerequisite for the following is that you have already installed the FGCOM (see the FGCOM-main-page) !

    The Initial test of the standalone FGCOM Installation --> the so called "-f910 Test"

    Prior to executing the following command open a command-window and change into the directory, into which the FGCom was installed. This path will then be shown shown in the command window, followed by a "$"-sign. Enter the following "fgcom"-command with the required/wanted options:

      fgcom -Sfgcom.flightgear.org.uk -f910
    
    fgcom the command (in case you installed by using the download_and_compile.sh script for LINUX-Systems you have to replace the command "fgcom" with "sh ./run_fgcom.sh". Then the complete command would be: "sh ./run_fgcom.sh -f910")
    -Sfgcom.flightgear.org.uk the central server for FGCOM
    -f910 the only available frequency for echo-tests
    optional In case your audiosystem is rather weak, you may try the options:

    -i and/or -o: i=input(microphone) o=output(Speaker), both values between 0.0 and 1.0 (e.g.: -i0.9)

    You do not need any Login-Passwords and/or User-Names !!!

    For a detailed description of all available options see Commandline Parameters - in the following we will only show the usually required options:
    That should give you the following return:

       fgcom - a communication radio based on VoIP with IAX/Asterisk
       (c)2007 by H. Wirtz <wirtz@dfn.de>
       Version 1.2.2 build 163M
       Using iaxclient library Version SVN 163M
       
       Successfully parsed commandline options.
       Reading list of airports...done.
       Initializing IAX client as guest:xxxxxxxxxxx@fgcom.flightgear.org.uk
       Call 0 accepted
       Call 0 answered
    

    Speak into your microphone and your words should be echoed back with a short delay. e.g. say "one" - and you should notice that the "one" is returned after you finished speaking it.
    If that was OK


    In case of trouble check the following most probable errors:


    Error: Incorrect Home-Directory specified for FGCOM:

    typical for Windows-Systems:
       C:\Users\emmerich>cd \Programme\Fxx
       The System cannot find the given path.
     
       C:\Users\emmerich>fgcom.exe -Sfgcom.flightgear.org.uk -f910
       The command "fgcom.exe" is either mistyped or could not be found.
    
    typical for Linux-Systems:
    /home/emmerich/Desktop/Link to fgcom: line 1: cd: /home/emmerich/fgf: No such file or directory
    sh: Can't open run_fgcom.sh
    
    • The system is right: I gave it (for testing) a wrong directory!
    • You better correct yours prior to retrying!


    Error: "TYPO" (mistyped command or option) or Network-problem:

       ./fgcom - a communication radio based on VoIP with IAX/Asterisk
       (c)2007 by H. Wirtz <wirtz@dfn.de>
       Version 1.2.2 build 223M
       Using iaxclient library Version SVN 223M
       
       Successfully parsed command-line options.
       Reading list of airports...done.
       Initializing IAX client as guest:xxxxxxxxxxx@fgcom.flightgear.org.uk
    

    after some time there may appear:

       Call 0 timed out.
       Timeout for a non-existent session.  Dropping
    

    most likely you may have

    • defined a wrong Frequency to use or you may have forgotten to define one. You must define the option -f910
    • forgotten a "-"sign in front of an option
    • typed a small "-sfgcom..." instead the capital "-Sfgcom..."
    • mistyped the Server-Name or defined a wrong FGCOM-Server
    • or you may have created your own unique "typo" (lol).
    • or it may indicate a Network-Problem:
      • Check your network by using some other application (e.g. your file browser to look up an usually not used http-address - if you use a recently used address the answer might be out of your locally saved copies - even so the network is not connected! (e.g. use "http://mainz.de/" to test)
    • If you use a firewall (what you should - out of general safety reasons!) make sure the ports
      2005	UDP	Vcp-Stream
      4569	UDP	FGCom  VoIP, (Inter-Asterisk eXchange)
      5000	UDP	in/out Multiplayer    (VPN Sftw.)
     16661	UDP	FGCom listening to FGFS, usually “local host” only
    

    are enabled for your PC.

    Error: "Phone-book" and/or "positions" cannot be found and/or are corrupted:

       ./fgcom - a communication radio based on VoIP with IAX/Asterisk
       (c)2007 by H. Wirtz <wirtz@dfn.de>
       Version 1.2.2 build 223M
       Using iaxclient library Version SVN 223M
       
       Successfully parsed commandline options.
       Reading list of airports...Cannot open /home/emmerich/fgfs/install/fgcom/fgcom/positions.txt
       fopen: No such file or directory
       Stopping service.
       (etc)
    
    • check the directory in which the FGCOM is installed for the files "phonebook.txt" and "positions.txt". These are normal text-files in which you can add missing informations with a standard editor, for Windows you should use the "WordPad" (not the "Editor"). Replacing a complete "Windows" position.txt with a "Linux" one can lead to errors, although lines of both files may be exchanged/added.


    Error: The Sound-Card is not fully compatible:

       ./fgcom - a communication radio based on VoIP with IAX/Asterisk
       (c)2007 by H. Wirtz <wirtz@dfn.de>
       Version 1.2.2 build 223M
       Using iaxclient library Version SVN 223M
       
       AL lib: alsa.c:564: set access failed: Invalid argument
       Successfully parsed commandline options.
       Reading list of airports...done.
       Initializing IAX client as guest:xxxxxxxxxxx@fgcom.flightgear.org.uk
       Call 0 accepted
       Call 0 answered
    
    • Continue checking/adjusting:
      • If everything else works out OK forget this problem (but be aware: The Audio might not function perfectly!)
      • otherwise check the Internet for new drivers for your sound-card or other fixes.


    Test the FGCOM together with the FlighGear Simulator

    In the forgoing chapter you checked the FGCOM as a standalone application. Now we will test whether the FGFS (FlighGear Flight-Simulator) itself and the FGCOM work together, inclusive the PTT-button (PushToTalk, usually the space-bar) and the internal connections via the assigned ports.
    For this test

    1. start the FGFS with any plane at any airport you like

    2. start the FGCOM (usually it does not matter which one starts first - but in case of trouble you should try to start in this sequence!)

    3. if the FGCom Command-window initiates, but does not respond to any COMM or PTT activity:
      • Try to enforce (the usually predefined) port as option. i.e. add the option “-p16661” to the FGCom Start-Command
      • check the FGrun extended Options → Input/output “generic=socket..”: The port there must be the same as for the FGCom, i.e. 16661 (if it was not intentionally changed by you)
      • You may try to change the interface-port to e.g. UPD 5004. In this case you have to watch 3 places:
        • add the option “-p5004” to the FGCom start-command
        • also change the value in the FGrun (“Wizard”) → Advanced Options → Input/output to 5004.
        • and you may have to tell your Firewall to allow port UPD 5004

    4. in the FGFS menu-bar select: "Equipment" --> "Radio Settings"

    5. into the field "COM1" enter the frequency "910.00" then click "Apply" (and "OK" if you want to close the Pop-up.)

    6. make sure the FGFS is the active window - so whenever something does not work out as expected click with the mouse somewhere into the Main-FGFS-window (that will activate the window) and then retry the last action(s)!!!

    7. Push the PTT (normally the Space-Bar (if you reassigned the PTT to another key - use that one!)) and speak into your microphone:
      • your words should be echoed back with a short delay. e.g. say "one" - and you should notice that the "one" is returned after you finished speaking it.
      • if you heard that echo:
        • keeping the PTT pressed for about 3 sec and watch for a possible start of "funny noises".
        • if those occur continue with chapter Adjust the Microphone and Speaker volumes
        • otherwise switch your COM1 back to the frequency wanted --> continue with the next numbered item.
      • if you did not hear the echoed return
        • Test your PTT: Watch the FGCOM messages in the FGCOM-Window:
        • When pushing the PTT they must switch between [SPEAK] unmute mic [LISTEN] mute mic Did they switch?
        • If they did not switch see chapter





    Adjust the Microphone and Speaker volumes

    Finally we will adjust the Microphone and Loudspeaker volumes to an optimum, as well for yourself as also for your fellow players.
    (You could perform this test also with the "f910-test" in chapter 1, but with the test-setup in chapter 2 it becomes more realistic!)

    1. Start your FGFS and FGCOM as described in the forgoing chapter(s), the COM1 must be switched to 910.00 and be the active one.
    2. Talk into your Microphone and verify the delayed feedback. If this does not function as described before, repeat the forgoing chapters.
    3. While talking into the microphone adjust your loudspeaker so that your echoed voice is understandable, but not any louder than required.
    4. Now adjust your microphone volume from 0 to full. Somewhere in between you will find a spot at which the returned echo-volume will not increase according to the microphone-volume changes. Leave the volume just a little below that point.
    5. After the microphone is set, adjust the loudspeaker volume to a level you prefer.
    6. Finally verify both settings by keeping the PTT pressed for about 10 seconds without talking and/or feeding any other sounds into the microphone.
      • listen for "funny noises" building up over time (hard to describe: some "unverified whoosh" and maybe additional even some sound like "air in a water-pipe" - actually: Whenever you hear anything --> it is no good!!!.
      • Mostly these "build up sounds with time" are due to an active microphone booster. Try to keep that booster to an absolute minimum (even better try to switch it off completely if not really needed!) while instead increasing the microphone volume
      • but also a rather high adjusted speaker-volume may cause such "funny noises" - try reducing the loudspeaker volume if you cannot solve the problem by adjusting the microphone and/or booster.
      • then you might readjust as described in the forgoing items.
    7. Now you are ready to talk to others, e.g. set your COM1 to the desired frequency and let your co-players praise you for that "absolute brilliant voice you have"!

    PLEASE: While "on Air" in MP keep the PTT pressed only while actually talking - and never longer than about 20 sec. After some time you will be timed out anyhow - but even before that drastic cutoff you might give your co-players a chance to reply/say something!

    Appendix

    Tips and Tricks

    1. Microphone not plugged: It sounds stupid – but most technical problems are due to such “cannot bee”s – please: Always spend the 2 sec. to check this first!

    2. Plug/Jack connections are often the cause for trouble: Try to re-seat your plugs and (if possible) try to use another jack (after cleaning the plug!).

    3. Multiple Microphones and/or Loudspeakers plugged to your PC: Be aware that most PC's do have Jack-mechanisms that prevent more than one input and/or output per PC. Try using only one (at best the major one - mostly at the back of the PC)

    4. If you changed your Mic/Loudspeaker setup or did plug them into anther jack, it is advisable to restart your PC – just to make sure the system knows what you did! (For Windows-Systems this is usually not necessary - but: It cannot hurt to reassure!)
      • If you use USB-headsets you might first try to get FGCOM running with standard Input/output devices – and go back to USB after that. If nothing else it helps to narrow down into the trouble-area!

    5. Check that none of your Sound-system Inputs/Outputs are set to “Mute”:
      • For basic systems you might use a right mouse-click onto the loudspeaker-symbol in the upper or lower position of you screen.
        • For WIndows-Systems: If that symbol is not there:
          • for Vista: Left mouse-click onto “Start”, type “SndVol.exe” into the line just above the Start-button
          • for XP: Left mouse-click onto “Start” then on “Run”, type “SndVol32.exe” into the appearing input-field.
      • For some “highly sophisticated (and expensive)” sound-cards you might need to use their unique descriptions.
      • FGCOM does not require a “better” sound-card like e.g. for Music or so – it is all Telephone/TCP-IP talking only – (except some people I know like to play country-music while pushing the PTT – that sounds nice - but still is not really high fidelity!)

    6. Always make sure that you can record and playback something you talk into the microphone with your basic system tools, completely independent of the FlightGear and/or the “OpenAL”. (See your handbooks for testing your unique system and/or the chapter Where to find the volume controls)

    7. If the connection is noisy or poor quality:
      • First retest your sound-setup as described above
      • try routing your Mic/Speaker cables away from electro-smog (Fans, AC/DC modules, motors, lamps, etc.)
      • even placing your sound-card into another plug-position may help

    8. Most PC's are set up that you need to keep your PTT (PushToTalk) button pushed as long as you talk. But there are also sound-cards which open for talk with the first push/release and close it with the second push/release. Test your system how it works (may be while trying to record something or while testing according to the above).

    9. If the FGFS sound-volume does not match your FGCOM-volume:
      • After starting the FGFS click onto “File” in the FGFS menu-bar, then onto “Sound Configuration”: Adjust the upper slide-control to a proper volume. Be aware that this setting will get lost when you exit via “X” - always exit via “File” → “Exit/Quit”.
      • To the opposite you may adjust the volume of your FGCOM by changing the “-o” and/or “-i” options to values between 0 and 1 (see the FGOM command at the beginning of this wiki-page).

    10. It is known that the AirToAir frequency 123.45 does not yet work - reason unknown and fix-date unknown. (This affects all Operating Systems!)

    11. Did you know? If no Tower-frequency is in range, you also can use the VOR-frequencies - just put them into your COM1 or COM2.


    Try to keep in mind: FGCOM is proven to work! So if there are problems look also for surrounding PC-features like unique hardware, software, etc.

    Where to find the volume controls

    Please be aware that FGCOM is used on many very different PC's, Notebooks, etc. under very different Operating-Systems and with very different Sound-Cards. So the following basic concepts may not fit your actual system 100%. In addition you may have to check your actual System and/or unique Sound-Card manuals!

    1. Define the audio-devices to use:
      Enter command: gnome-sound-properties
      test devices

      For each task you can open a selection-menu (on the right the downward arrow) in order to select the wanted device. I suggest to first try setting all to "Autodetect". Then click onto the green "Test"-button. If you need to make changes, reboot the PC after each change!


      Click right onto the audio-icon → Preferences → Audio-tab:
      set devices
      Open with Menu --> System-preferences:
      set devices

      Switch between "Output" and "Input" and select the wanted device('s) in the field "Chose a device...".

      If you did change these device-settings, it is a good idea to reboot the PC and retest the settings prior to continue.


    2. Adjust volumes and switch boosters (for the first loudspeaker-adjustments you should switch off the Mic.!)
      Click right on Audio-Icon → Open Vol. Ctrl:
      Volume Control

      The amount of the slider-controls vary depending on the capabilities of the sound-card or the usage of USB-headsets.

      The “booster” is available under “Switches”.

      Click right on the Audio-Icon → Volume-Ctrl. (or type command: sndvol32)
      set devices

      In this example the card overrides the std. Microsoft “Mic.” with “Rear Pink In”. Be aware of such changes caused by usually “high expense” devices! The “booster” is available under options.

      Use the above shown window to adjust.




    3. Verify the basic Mic/Loudspeaker functionality:
      Use the volume-control-panels to enable the microphone for this test. Then:
      Open the recorder with the command: gnome-sound-recorder
      Recording-test
      • Record
      • Stop
      • Play
      Open the Recorder with command: sndrec32
      Recording-test
      • Start recording (click red point)
      • talk some words into the mic
      • stop (rectangel)
      • spool back ( < < )
      • listen (>)
      There is no basic recording program available with OSX.