0406
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
Vers  Date     Who  What
01.00 22.09.03 RS - first release for production annuncicom ic
01b01 02.10.03 RS - added parameter to set command for IO/1 on/off actions
                  - added command to set/reset talk via command
                  - added command for reset to defaults without network
                  - correct commands for factory defaults
                  - extend length of init sequence to 64 characters
                  - added command r= to send udp commands to other devices
                  - added configuration parameter for udp and tcp cmd rx port
      03.10.03 RS - fixed blocking streams if a client is missed
      06.10.03 RS - added telnet port (default 12303) for telnet <-> serial
                    (default 9600,8,n,1 no flowctrl) with parameter for port,
                    baudrate, data-, stopbits, parity, flowcontrol
                  - send back always with own udp rx port as destination
                  - store last ip of commands for send back
                  - fixed remote commands without protocol
      07.10.03 RS - active open serial gateway (telnet) with destination ip and
                    port. if both set this function is active.
                  - stream udp to addr 0.0.0.0 is broadcasting on the subnet
                  - if udp send stream port is 0 use udp rx port. if the udp rx
                    port is 0 aus default port 3030
                  - added parameter to set command for CTS on/off actions
                  - added command to set/reset cts via command
                  - added parameter preset to store the selected preset
      08.10.03 RS - don't allow sending during streaming
                  - added command for forced talk
                  - added status for talk, in-/exstreaming active and
                    streaming mode and added them in getstate
                  - fixed setup for concatenated command sequences
                  - fixed volume control if loop to output is activated and the
                    volume is temporary changed by user control
      09.10.03 RS - added internet radio support for annuncicom
                  - on active serial gateway test every 30s for a connection. if
                    no answer after 1s activate serial command interface in the
                    mean time
                  - the green led blinks slow if sending and fast if receiveing.
                    it is on if not sending nor recieving
                    the red led blinks together with the green if talk is forced.
                    it blinks every second time if talk is suppressed and it
                    blinks together with the green led if talk is forced
      10.10.03 RS - fixed encoder quality setting
                  - pre play parameter new in msec
      13.10.03 RS - PIO1 used to shoutdown amplifier if 0
      21.10.03 RS - fix for correct value for D OUT (difference web page -> D OUT)
                  - fix for broken streams
      30.10.03 RS - added answer page for dynamic marks
                  - fix for configuration of empty strings
                  - added port and type to command set target and fixed command
                    concatenation after this command
                  - added definitions for inmode configuration for spdif1/2 in
                  - fix for don't stop sending in streaming mode send on receive
      12.11.03 RS - fix commands for html configuration
      28.11.03 RS - fix web app vers in discover 
01.02 08.12.03 RS - don't accept toggle command durning toggle time (discard it)
                  - fix configuration positions of cts commands etc.
      09.12.03 RS - removed telnet setup (available still in the bootloader)
01.03 17.12.03 RS - fix for string2url if character changed to %hh
      08.01.04 RS - wait until streaming buffer empty before rx timeout executed
      09.01.04 RS - stop streaming on buffer underrun, restart after start
                    threshold bytes are received
                  - play buffer default value set to 1024
      06.02.04 RS - added command for set encoding quality
                  - set single channel mode for encoding if mono is set
      09.02.04 RS - activate command RESETTALK for instreamer too
                  - set factory default for instreamer cts close command to
                    RESETTALK and cts open to FORCETALK
                  - fix for set config strings that contain the character &
      17.02.04 RS - fixed streaming breaks on internet radio streams
                  - set default play buffer size to 4096
                  - if rx stream is detected during sending (not forced) stop
                    own tx stream
                  - added parameter name for the device
                  - changed setup and dyn. marks to newest version
                  - added name parameter
                  - added ir out support for instreamer
                  - don't set pio22 as output because it isn't needed
      22.02.04 RS - fixed rts/cts for serial gateway
                  - set param pre start to 0 per default
      24.02.04 RS - added ir gateway
      27.02.04 RS - added no-cache to http response (for all dyn files and
                    commands)
      01.03.04 RS - show lan mac address, add id 6 for active mac (for wireless)
                  - included TFTP
                  - store volume correct if mute
                  - removed balance and stereo out command
01.04 10.03.04 RS - use always stereo/mono from inmode parameter after
                    autodetection of the input
                  - added workaround for codec error (s/pdif)
                  - fixed selection of optic. or coax. s/pdif in
                  - faster sonic ip
      12.03.04 RS - added sync master functionality
01.05 22.03.04 RS - added SNMP private tree and traps
      23.03.04 RS - SPDIFOPT_EN (pio23) fix to 1 for always connect SPDIR to AGND
      30.03.04 RS - sync output ptr is directly the input of the encoder, this
                    moves the sync nearer to the original source
      16.04.04 RS - don't stop reader for encoded data on buffer overrun
      13.05.04 RS - buffer underrun mode disconnect or skip (incl. param)
      14.05.04 RS - improved speed for web pages (read quasi peak only every 0.5s)
                  - fixed and optimized encoder reading
                  - fix for dyn. marks where string params are after 2. par
                  - busy wait before testing command password
                  - support for escape sequences in dyn. marks (without \o)
                  - new dyn. mark for web application versions
                  - support for set config cmd C= via serial, tcp and udp
                  - check max. length of a serial command
                  - added recursive dyn. marks (dyn. marks in dyn. marks)
                  - added dyn. mark for !=, >, <
                  - added dyn. marks for build date
                  - don't wait on udp commands but send nothing back if something
                    else currently is executed
                  - fixed cmd blocking on an error
                  - fixed file handle leak in web server
                  - fixed file handle leak in read file for factory defaults
      17.05.04 RS - send encoded data as soon as possible (2ms after last packet
                    received)
      18.05.04 RS - if stream connection type is tcp raw a port is set but no
                    ip selected (0.0.0.0) use this as tcp listener
                  - open tcp connection only actively if ip and port is set
                  - fixed streaming status for status page
                  - added dyn. mark for syncstate
      01.06.04 RS - don't blink red led during instreaming
      02.06.04 RS - fix passiv serial gateway disconnection from other partner
                    (ex. power loss, network down, etc)
      03.06.04 RS - send always full length sync packets (minimized bandwith)
      07.06.04 RS - fixed encoder interrupt timing
      08.06.04 RS - added talk commands with timeouts for keypads
      09.06.04 RS - fixed tcp sending mode (tcpopts = 1) for serial gateway
                    (immediate sending)
                  - added functionality serial keypad (qtronix qx-022) including
                    command send to selectable target s= for sending to a target
                    out of a file, to one of the 8 targets in the config and
                    directly to a specific ip/port (udp based)
      10.06.04 RS - fixed fragmentation of tcp command answers
                  - command e=255 reinitializes the encoder without change cfg
                  - new faster encoder reading isp routine (bytewise in ram) 
      11.06.04 RS - fixed tcp stream sending over the buffer wrap
                  - fixed optimized package length
      14.06.04 RS - added monitor (only for instreamer)
                  - fix/add (micronas) workaround for s/pdif on coaxial input
      15.06.04 RS - return nosupport tag if c=<nr> is unknown
                  - monitor encoded stream on headphone (not the original one)
      16.06.04 RS - added a/d amplifier gain with parameter (default 0)
                  - fixed setting for encoder clock
      18.06.04 RS - added workaround for gargling sound (restart codec if crc
                    is wrong) -> permanent serial debug output and syslog on
                    restart codec)
                  - added mp3 crc disable/enable parameter
      21.06.04 RS - reset crc error counter on restart encoder workaround
                  - added parameter bitreservoir used (default)/kept empty
                  - added parameter channel mode extension (default enabled), 
                    copyright protection (default protected),
                    copy (default)/original stream and emphasis (default none)
                  - changed snmp mib number from 7777 to real barix id 17491
                  - added parameter for web server port
      22.06.04 RS - added 'stream type' 'internet radio' and use the port as
                    radio port (removed parameter 'radio port'). max. 6 streams
                    are supported.
      23.06.04 RS - fixed send status picture on send always
      24.06.04 RS - fixed answer for commands that execute command sequences
                  - use get_ticks and get_time instead of ticks and time
                  - use telnet port as source port for active serial gateway
      28.06.04 RS - restart encoder after 1 sec if no more encoded data received
                  - added command toggle rts including toggle timeout parameter
      01.07.04 RS - improved workaround for micronas encoder error (gargling)
                    mp3 crc must be enabled!
      12.07.04 RS - improved workaround for less but faster encoder restarts
      13.07.04 RS - added dyn. mark for last caller ip address
      14.07.04 RS - restart encoder after 1 sec if no more mp3 frame crc received
                  - added command g= for open serial gateway to specific ip:port,
                    if command executed from serial cmd interface the connection
                    will be closed 1 sec after the last transmitted byte
      15.07.04 RS - restart encoder every hour (workaround)
01.06 21.07.04 RS - removed restart encoder every hour (workaround)
                  - restart sync on restart encoder workaround
      05.08.04 RS - added parameter for sync port (0 for fix algorithm)
                  - removed crc workaround and use easier workaround from
                    micronas (read out every second D1:$9d8, restart codec if
                    (bit[15:14] == 0) && (bit[0] == bit[16]) is false)
      12.08.04 RS - removed tcp rx stream port. use 'stream to' for listeners
                  - restart encoder if no data for 4s from encoder (workaround)
      13.08.04 RS - fixed codec handling, locked access
      23.08.04 RS - fixed streaming rom song (m=) during encoding
      28.08.04 RS - fixed concatenated command seqeunces in configuration
                  - don't discard udp commands during execution of another cmd
                  - scan io's every 50ms (before 20ms)
      31.08.04 RS - fixed timeout waiting for end of execution (5 sec)
      11.09.04 RS - s/pdif workaround also if mono input is selected
01.07 21.09.04 RS - added * to ir cmd j=
                  - fixed command b=, j=, l=, L=, r=, t=, T=, v= not terminated with 0x00
                  - fixed bug udp answer not always sent
      22.09.04 RS - added volume with inc/dec, balance with inc/dec, bass with
                    inc/dec, treble with inc/dec, loudness with on/off and
                    inc/dec, mute with force, volumelock, mono out and T=
                    commands for the instreamer
                  - if no udp command port is set use the default udp command
                    port for the command r
                  - fixed crash if ir sent during sonic ip
      08.11.04 RS - fixed corrputed html/tcp output
                  - calc bitrate for sync every 50ms instead of 100ms
      09.11.04 RS - send sync response not as broadcast
                  - fixed crash if udp stream received during startup
                  - if no ip is given for r= cmd (annuncciom ic only) and not
                    yet received an ip then send it as broadcast
      11.11.04 RS - fixed neg. values for balance, bass, treble
                    (add c for dyn. mark 'print string if equal')
                  - send back busy.ack on a udp command if currently a command
                    is executed, fix udp and tcp packet loss
      18.11.04 RS - fixed blocked listening caused by a underrun if the streaming
                    buffer isn't filled up again by the sender and the rx tout
                    occurs during this time
                  - fixed blocking first command after execution of a
                    parametrized command
      02.12.04 RS - no timeout on active gateway cmd g= if executed from tcp
                  - send ack immediately after g= cmd if exectued from serial
B1.08 09.12.04 RS - increased primary receiving buffer for tcp listener to 2k
                    fixes stuttering of high bitrate streams
                  - added dyn. mark for streamingmode as value
      07.01.05 RS - fixed reentrant bug in dyn. mark for resource version
                  - added ulaw/alaw/uncompressed en/decoding audio formats
                    including parameter non mp3 packet size
      10.01.05 RS - added udp and tcp priority port
                  - added command queue to fix missing cmd after short press of
                    I0 or I1
      13.01.05 RS - added 8 destination tables including new command s=tab://n,
                    where n is 1..8 (1 is default). on a changetable cmd all
                    current connections will be closed.
      14.01.05 RS - added new command loop rom song (M=)
                  - cut rx buf if too many bytes are in because this causes a 
                    big delay.
      20.01.05 RS - fixed web page garbage bug
                  - last 2 entries in table also can be used as internet radio
                    (still max. 6 stations)
      21.01.05 RS - fixed not answering on web interface
                  - correct content-type audio/mpeg for internet radio
                  - all http header changed to version 1.1
      25.01.05 RS - fixed cmd m= and M= if concatenated
                  - M= stopps after file played, m= stops immediately, M=*.mp3
                    loops a file, M=*.mp3 during loop changes the file to the
                    new one after the loop, m=*.mp3 will stop the loop at the
                    end and plays the the file, m=*.mp3 during playing a file
                    will play the new one after the current
                    loop and stops the loop
      28.01.05 RS - fixed speed and intersection of sonic ip
      10.02.05 RS - fixed factory reset for instreamer
      17.02.05 RS - fixed ulaw/alaw streaming (bug because of new M= cmd)
B1.09 31.03.05 PK - special version for PowerCorp
                  - commands not broadcasted if no origin source is known
                  - origin source IP expires after 30 seconds
B1.10 05.04.05 PK - command queue bug fixed
B1.11 13.05.05 KS - Content-type changed to Content-Type for both audio and text
                    Media streaming replies with HTTP/1.0 instead HTTP/1.1 & no Connection: close
                    Bug 1. Security error on logout (D=) corrected
      20.05.05 PK - SNMP MIB updated - using 17491 instead of 7777
                  - Temporarily fixed bug with broken sysDescr
B1.12 23.05.05 PK - fixed infinite loop bug when TCP stream is interrupted in PAUSE mode
      26.05.05 PK - fixed "audio interrupted every 30 seconds in TCP mode" bug
                  - fixed "device doesn't play first TCP stream after reboot" bug
B1.13 08.06.05 PK - c=94 (set defaults) does not mute any more
      10.06.05 KK - song and XT version printout added into dynamic marks.
      10.06.05 PK - removed 140ms delay on codec switch-over in G711/PCM mode
                  - temporary fix on buffer start treshold
B1.14 15.06.05 KS - fixed WEB Method authentication support for:
                    http://<ip add>/rc.cgi?L=<html answer file>    and
                    http://<ip add>/setup.cgi?L=<html answer file> 	       
B1.16 28.06.05 PK - rewritten streaming - priority port, TCP, UDP, all encoding
                    including PCM working correctly
               KS - If the control password is set you can now issue control commands from WEB Interface
                    But to use this feature you need to update the WEB UI uistatus.html and skin.html
                    with the control password &L(0,"*",7)(bits 1-3=3)     
               PK - fixed possible command queue bug "source ip address overwritten"
               PK - removed legacy exstreamer commands: PAUSE, PLAY and FORCE_PAUSE (c=3, c=1, c=39)
      29.06.05 PK - added compatibility mode for broadcasting "r=c=" commands
      06.07.05 KK - Added Icecast and Shoutcast source support
                  - Added Listening password
      15.07.05 KS - E29   c=77 command with type=2 (RAW TCP) now disconnects session (which then restarts)
                    SNMP  System OID corrected and new Annuncicom OID added
                          Private MIB now readable
                          Community strings, now checked as password L1-6
      18.07.05 KS - Added command to Setup method for: Default, Reboot and Update
                  - Broadcast as default for backwards compatinility.
      19.07.05 KS - Annuncicom: Set SET_BIT_CHMODEEXT for Mono as default 
                    stdgetEx: fixed default index.html which overwrote hdr so if password set,
                    check always failed
      20.07.05 PK - Fixed streaming bug - receive timeout didn't work when waiting to fill the buffer 
      20.07.05 KS - SET_WebMethWebSetup: Save password now also supported via HTTP hdr authentication  
                    stdgetEx: Added WWW-Authenticate "realm" reply for pop up password window 
      21.07.05 KS - WebMethWebSetup: Added SetupRangeCheck
                  - RC_bRTS invertion corrected to use virtual bits 
      26.07.05 PK - unimportant expression optimization 
      05.08.05 KS - cosmetic change
      09.08.05 KS - Support Syntax: r=[<prot>://][[<ip>][:<port>]/]<cmd_seq> where 
                    <cmd_seq>:= <cmd>|<start bracket>{&<cmd>}<End bracket> 
<==== 12.08.05 KS Version B1.16 Frozen and Released =======>                     
B1.17 24.08.05 KS - 29. Error in c=77 raw tcp. vReOpenTCPConnections now allocs and initializes a
                    TCP structure if none exists.
                    34. Radio listen password. Correct Unauthorized return strings for Basic realm 
      29.08.05 KS - 30. Built with tcp lib that uses max 1200 data bytes. 
      31.08.05 KS - 39. TFTP removed for security and consistency                           
      31.08.05 PK - siospi moved to the song module                
      05.09.05 PK - reboot to update-mode fixed for EX
      12.09.05 KK - Exstreamer and Instreamer hanged when the connection was
                    lost for more than 120s when Instreamer was streaming raw
		    TCP to Exstreamer listening streaming port. Fixed.
<==== 13.09.05 PK Version B1.17 Ended and Version A2.00 Created  =======>                     
A2.00 13.09.05 PK - porting to EX platform finished, initial version for both hardwares created
                  - G711 encoding @96MHz fixed on EX
                  - IOs and RTS ported to EX
		  - known issues: none
<==== 13.09.05 PK Version B1.17 Released  =======>                     
A2.01 14.09.05 KK - Removed the fix from 12.09.05 from Instreamer. It
                    can cause problems because the connection port is not
		    being increased. The fix will be part of the TCP library.
      27.09.05 PK - Temporary fix of "serial commands terminated by LF only are ignored"
      12.10.05 PK - Codec rev. B2 workaround bug fixed ("instreamer suddenly stops sending data and buffer level is 0")
      19.12.05 KK - Added RTP support
      27.01.06 KK - Added missing fields into the Icecast header.
A2.02 03.02.06 KS - Legacy changes added ===============>
      01.09.05 KS - 37. Error streaming "receive mode" fixed
      02.09.05 KS - 42. MUTE command (c=8) fixed
                    38. Modify packet size for 1200 byte tcp library
      07.09.05 KS - 40. Security Header now supported in config.bin
      19.09.05 KS - 44. Built with tcp16.lib which has working keep alive
      19.09.05 KS - 45. Buffer underrun mode (TCP) - disconnect corrected
                        Corrected vCodecEncode leaving Stream disabled. This bug had the side affect the 
                        work around for HW bug in CODEC B2 (EncoderCheck) which calls CodecEncode failed.
      26.09.05 KS - 48. SNMP Input Audio Level added 
      27.09.05 KS       Serial lf and param fixes. 
                        web, startup, printf taken from lib 
      25.10.05 KS -     Serial:RTS Recompile with new bsw lib 
      27.10.05 KS -     RTS initialized with Serial params which are setup only at start  
      31.01.06 KS -     010.10 vPostCProcessing added to re-register UDP receive ports  
      01.02.06 KS -     010.11 s=tab://0 added to stop sreaming 
      <==== End of Legacy changes added 
      09.02.06 KS -     010.11 s=tab://0 corrections 
      20.02.06 KS       010.13 s=tab://n clear radio session bug fixed 
                        FIN,PSH,ACK sent, FIN ignored. This known bug thought to be correted is still 
                        not fixed in current tcp16. So sending data+FIN is avoided.
<==== 23.02.06 KK Version B2.02 Released  =======>                     
      03.03.06 KK - Updated the _readme.txt and made the firmware kit
                    support IPAM
      07.03.06 KS -     snmpmib.h: Updated to correct level OIDs                   
      26.04.06 KK - Fixed two bugs where the seqno and timestamp wasn't and
                    usually wasn't increased, respectively.
      01.06.06 KK - The bootloader version is now displayed correctly for both
                    the new and the old bootloader.
      30.06.06 KK - Implemented a strictly SIP-noncompliant SIP implementation
                    :)
      03.07.06 KK - Improved the SIP compliance of the SIP implementation
                    significantly.
      05.07.06 KK - Fixed a bug: in talk on level mode, the SENDING indicator
		    was showing permanently "not sending", even if the device
		    was sending.
      20.07.06 KS -  Jump to Bootloader replaced by HW_BootLoader()   
<==== 02.04 20.07.06 KS Version 02.04 Released  =======>        
<==== 20.07.06 KK Version 0204 Frozen and released  =======>        
<==== 24.07.06 KK Version 0205 Frozen and released  =======>        
      25.07.06 KK - implemented automatic redial when the incoming RTP
                    traffic stops for 10 seconds. But not tested yet.
<==== 31.07.06 KK Version 0206 Frozen and released ===>
      02.08.06 KK - improved the latency of G.711 RTP from 160ms skips down to 30ms
                    skips (approx. 256-byte chunks that go from the codec).
      09.08.06 KK - Made the toomanyusers.html return 503 Service Unavailable
      11.08.06 KK - Implemented talk on real CTS (not only the simulated one)
      15.08.06 KK - Implemented CTS transmitted in ID3 tags.
      16.08.06 KK - Fixed MPEG stream corruption in raw UDP.
      17.08.06 KK - added start.html to be looked for before index.html when
                    accessing the web root.
      30.08.06 KK - Added S= command which prints a string to the serial port.
      01.11.06 KK - Put back the S/P-DIF workaround which has been apparently
                    taken out in the past.
      21.11.06 KK - Fixed: Instreamer did not retransmit when the receiving party
                    reported a TCP window < 4096 bytes. The communication hanged
		    in that case.
      22.11.06 KK - Removed the old sync mechanism.
      04.12.06 KK - Added a workaround against codec hangs.
      13.12.06 KK - When the codec is reset, the mp3 parser is reset now too.
                    Prevents frames with correct header but incorrect contents
		    in case of codec crash.
      20.12.06 KK - disabled the S/P-DIF parity error checks because they seem
                    to create corrupted sound even in case of valid S/P-DIF
		    input.
      03.01.07 KK - removed the output UDP quench that made the device
     		    unscalable for >10 BRTP clients.
      09.01.07 KS - 013.20 Reduced BRTP_MAX_CLIENTS to 32
                    Send out frames to BRTP clients made more efficient
<==== 19.01.07 KS Version B207 Frozen and released ===>                     
      16.02.07 KK - Added Supported: header as the SIP RFC says it SHOULD be
                    there
      22.02.07 KK - Added receiving SIP keepalives. This prevents connection
                    falling apart when the other side doesn't send periodic
		    RTP packets and sends only comfort noise.
<==== 12.03.07 KK Version B208 Frozen and released ===>                     
      19.03.07 KK - Added Shoutcast metadata.
      21.03.07 KK - Added external loading of Shotcast metadata through E=
      13.04.07 KK - Shoutcast server with metadata stream now loses data during
                    TCP overrun in whole MPEG frames, preventing MPEG stream
		    corruption.
      16.04.07 KK - HTTP/1.0 200 OK replaced with ICY 200 OK in Shoutcast
                    server mode. Removed the blank after the icy-metaint
		    argument.
      14.04.07 PK - shoutcast header changed
		  - metadata interval changed to 1024
      18.04.07 KK - Now Shoutcast server mode tests if the client requests
      		    metadata or not and turns them on or off accordingly.
      20.04.07 PK - bass, treble, loudness, balance removed
      23.04.07 PK - sonic IP corrected for song versions >4.07
      30.04.07 KK - Shoutcast server mode uses large internal buffer to
                    prevent overrun and allows up to 8 simultaneous connections.
      02.05.07 KK - Made command be processed from serial port only when Local Port
                    is set to zero.
      03.05.07 KK - Removed the Icecast/ID3 option.
      03.05.07 KK - Made the Icy-Metadata header testing case insensitive for
                    iTunes to work.
      04.05.07 KK - Fixed a bug where memory was corrupted if UDP command came that
                    didn't contain neither 0 byte, nor CR nor LF. Also caused the
		    command to be misinterpreted.
      07.05.07 KK - Fixed memory corruption bug where the device crashed after
                    receiving large amount of web commands.
      14.05.07 KK - Implemented input and output serials for command que to
                    prevent (rather theoretical) livelock in waiting for command
		    completion
      15.05.07 KK - Rewritten the blocking connection reopener into an finite automaton
                    driven one, eliminating system delays during connection establishment.
      24.05.07 KS - MEDIA::vDetectCommand added check for non zero cmd->w              
      24.05.07 KK - Changed the Internet radio protocol from HTTP to Shoutcast
                    server protocol which supports Shoutcast metadata.
      13.06.07 KS   013.21 setpar::SonicIP: Don't save settings on factory defaults 
<==== 15.06.07 KS Version B209 Frozen and released ===> 
<==== 15.06.07 KS Version 0209 Frozen and released ===> 
      18.06.07 KS 019.05 BHW version 1.12 included to correct bug in Ethernet driver (NIC960)
<==== 18.06.07 KS Version B210 Frozen and released ===>
<==== 18.06.07 KS Version 0210 Frozen and released ===>       
A2.11 18.06.07 KS Start version 2.11
      18.06.07 KS Watch debug patched out from setpar
<==== 18.06.07 KS Version B211 Frozen and released ===>
<==== 18.06.07 KS Version 0211 Frozen and released ===>  
A2.12 18.06.07 KS Start version 2.12                       
      22.06.07 KK - Disabled web server access at different ports than 80, only
                    radio stream is accessible there.
      05.07.07 KS 013.17 tcpip v5.12 now includes ARP optimisation which corrects delays 
                  causing audio stutter if one or more partners unreachable.      
      12.07.07 KS (See Exstr. 24.32) wWriteOutput for all accept WEB add 3 sec timeout on fifo
      13.07.07 KS xt05_version.txt for v0.03 added to dist and used for build 
      16.07.07 KS wrong version date
<==== 16.07.07 KS Version B212 Frozen and released ===> 
<==== 16.07.07 KS Version 0212 Frozen and released ===>   
      23.07.07 KK Blocking the HTTP server on the non-server media ports works
                  also when the normal HTTP server is on a different port than 80.
<==== 24.07.07 KS Version B213 Frozen and released ===>
<==== 24.07.07 KS Version 0213 Frozen and released ===>
A2.14 26.07.07 KS get::stdget: SET_WEBPORT check added to port 80 test (see also 23.07.07 KK)                
      27.07.07 KK Fixed a bug which decreased the maximum amount of BRTP
                  channels available without slowdown.
<==== 30.07.07 KS Version B214 Frozen and released ===>
<==== 30.07.07 KS Version 0214 Frozen and released ===> 
      07.08.07 KS       major version number incremented to reflect chip change                   
<==== 07.08.07 KS Version 0300 Frozen and released ===>                                        
A3.01 07.10.19 KK Audio input goes into audio output also with PCM recording
                  now.
      09.11.07 KS 013.30 Added MAC to all Traps
      12.11.07 KK 013.31 Added support for commands through a firewall.
      11.12.07 KK added list of connected clients - clients.cgi
<==== 04.02.08 KK Version B301 Frozen and released ===>
      05.02.08 KK Also internet radios send now icy-url, icy-genre and more
                  information from the configuration page.
      06.02.08 KK Added an alignment to 2 bytes so that PCM 16-bit mono data
                  can be transmitted over the "Internet Radio" entries.
<==== 06.02.08 KK Version B302 Frozen and released ===>
<==== 12.02.08 KK Version B303 Frozen and released ===>
      03.03.08 KK Fixed swapped source and destination port in g711 RTP.
<==== 04.03.08 KK Version B304 Frozen and released ===>
<==== 04.03.08 KK Version B305 Frozen and released ===>
A3.06 06.03.08 KK Rewritten Instreamer for the new Song interface.
      06.03.08 KK Fixed a latent bug with overlapping memory between the MPEG
                  parser and the TCP stack.
      06.03.08 KK Fixed 1- or 2-byte TCP segments occuring often in optimal
                  package.
      24.07.08 KS Added Binary Discovery initialized in main            
      22.08.08 PK Fixed incorrect quality settings in audio open for uncompressed modes
      27.08.08 PK Fixed sonic IP enable/disable bit checking
      29.08.08 JP added support to use ToS in IP header.
<==== 02.09.08 JP Version B306 Frozen and released ===>
A307  04.09.08 JP Fixed security level 3 check for TCP connection and serial.     
<==== 04.09.08 JP Version B307 Frozen and released ===>
A308  23.10.08 JP Fixed Security level 3 check for CGI.
<==== 29.10.08 JP Version B308 Frozen and released ===>
A309  18.12.08 JP Fixed Sonic IP announement bug. bug id 13.57.
<==== 18.12.08 JP Version B309 Frozen and released ===>
A310  09.01.09 KS Bug #013.59 setpar::SET_WebMethWebSetupQ added check for a=
      09.01.09 KS medianew::MEDIA_vSonicIP increased volume ramp to 200 msecs
<==== 09.01.09 KS Version B310 Frozen and released ===>
A311  17.03.09 PK using global HW.ee_hw_type rather than reading it locally
      27.03.09 PK using IR from BCL_IO rather than from SONG
      09.04.09 KK Added RTP extension with inputs
      15.04.09 KK Added a rudimentary shoutcast metadata insertion according to
                  the inputs.
      21.04.09 KK Removed the unnecessary struct g711_tx.buf.
      15.05.09 KK Added RTP payloads:
                  PCM 8, 24 kHz mono, stereo little endian
                  PCM 12, 32 kHz mono, stereo little, big endian
		  uLaw, ALaw 12,32 kHz mono
                  PCM 44.1 kHz mono big endian
                  PCM 44.1, 48 kHz mono, stereo little, big endian
                  All work except PCM 44.1kHz mono big endian which distorts
                  since the Song produces stereo data when asked for mono.
      06.07.09 KK Added programmable start,stop on open, closed constact and
                  transitions.
<==== 07.07.09 KK Version B311 Frozen and released ===>
A312  21.07.09 KK Fixed a bug where MPEG BRTP had last 12 bytes of the UDP
                  packet cut off
      23.07.09 PK removed WEPKEY from setpar.c
                  removed licensing from setpar.c
      23.07.09 KK Changed tcp16not.lib back to tcp16.lib because this was causing
                  the shoutcast source crash 06.05
<==== 24.07.09 KK Version B312 Frozen and released ===>
      13.08.09 KK Changed the way stream on GPI is selected according to
                  Instreamer STL control 1.1
      14.08.09 KK Fixed shift and polarity of the contact closures in BRTP and
                  Shoutcast
      14.08.09 KK SSRC in RTP are now random.
<==== 14.08.09 KK Version B313 Frozen and released ===>
      26.08.09 KK Radio Path / doesn't cause binary data on website anymore.
                  013.41
      01.09.09 KK Configurable contact closure insertion 060.12
<==== 04.09.09 KK Version B314 Frozen and released ===>
      11.11.09 KK Fixed crash on Shoutcast source. 060.15
      03.12.09 KK Fixed 60.18 BRTP not working. 
<==== 04.12.09 KK Version B315 Frozen and released ===>
      07.01.09 KK #60.23 G711 RTP was not reacting to turning off metadata. Fixed. 
<==== 07.01.10 KK Version B316 Frozen and released ===>
A317  07.01.10 PK reads only the first bit of digital input status
                  this way will work also on Ann1000 and Ann155
      17.05.10 KS #060.26 medianew:open_for_encoding 44.1kHz PCM mono BE corrected from 32kHz            
      16.05.10 KK #60.29 Server Path moved from Setup+353 to Setup+566 so that
                  space can be increased from 32 chars to 64 chars.
      10.09.10 KK #60.30 Increased number of inputs transmitted in RTP from 4 to 8
      27.09.10 KS setpar::SET_vInit. Syslog set under debug flag, saves another 16 bytes 
      27.09.10 KS #60.29 setpar.h setup version incremented to 1.6
      27.09.10 KS #60.21 makefile.nrec: Updated to use the new script formats
      24.03.11 KS main_new. Addded patched out debug feature crash_dump (to use needs debug.lib)
      24.03.11 KS #060.40 medianew::codec_init work around for song crash/error.
                  If Sonicip congigured, added additional audio_open, audio_close
      30.03.11 KS #60.27 & #60.36 medianew::open_for_encoding corrected invalid alaw,ulaw 12kHz byte swap
      31.03.11 KS #60.24 medianew::check_audio_peaks changed to dB, level values treated as negative 
      01.04.11 KS #60.31 medianew::codec_init: added mic_in, mic_gain and correctly mask for input source
      04.04.11 KS #60.31 medianew::codec_init: If mic_in selected set mike to electret so power is supplied
      04.04.11 KS #60.34 setpar:VersionInit DHCP name copied from setup to nethw.DHName
      04.04.11 KS #60.32 medianew: Multiple streaming tables removed since Instreamer only uses 1
      05.04.11 KS #52.20 rc.c: tcpcmd_last_active made DWORD to avoid SYN flood after 64K secs if no answer
                         rc.c::open_control_tcp for active checked first IP add byte is non zero
      05.04.11 KS        setpar.h reordered definitions to identify gaps easier                    
      05.04.11 KS #60.32 setpar.h SET_DOMAINNAMES replaces SET_TARGETTABLES (Setup + 944)
      06.04.11 KS #60.32 medianew::setup_tables Added IP resolve from domain name
      06.04.11 KS #60.32 main_new dns_resolve removed so tcpip version taken
      06.04.11 KS #60.32 ani.h expand setup to same size as Annuncicom (5F8h) - setpar.h new version 1.7
      08.04.11 KS #60.35 medianew::send_packets_low_latency. For perform_reset(1), last=mediaBuf->outp
      08.04.11 KS #60.35 medianew::vStreamTxProcess. Added send_packets_low_latency(1) 
                         to initialize start buffer pointer for RTP
      12.04.11 KS #60.35 medianew: timer routine speed() re-instated for Pre Trigger Start calculation                      
      06.05.11 KS #60.32 medianew::setup_tables Configured IP address given priority over DN 
                         Otherwise this is confusing for the user. So to use DN, IP address must be 0
<==== 09.05.11 KS Version B317 Frozen and released ===>
Revert to B3.17 
      16.05.11 KS #60.31 medianew::vPrintStateValEqual hw_type added 
      17.05.11 KS #60.32 setpar.h num domain names reduced to 4, length increased to 98 
      17.05.11 KS #60.32 medianew::setup_tables Adjusted for no IP address if space for domain name 
<==== Cancel Re-release ===> 
      23.05.11 KS #60.42 get.c: remove html length calculation which is anyway wrong
                         The wrong length information causes Chrome not to work
      23.05.11 KS #60.43 rc.c use ioctl instead lio_cts to control RTS.	
<==== 24.05.11 KS Version B317 Re-released ===>  
      15.07.11 KS #060.46 medianew:codec_init Added input_source case 7 external ADC on Ex1000/500  
<==== 25.07.11 KS Version B317 Re-released ===>

<---- 20.02.12 PK IPAM 101 version merged into head, new version A4.01 ---->
IPAM101 Changes 
A318  27.09.11 PK main_new: CPU speed increased from 48MHz to 96MHz
                  medianew: IPAM 101/102 compatibility: little-endian codec support
      28.09.11 PK setpar:   fixed wrong FLASH offset for XT05 version
      28.09.11 PK distfiles/compound_uni, Makefile.nrec updated song to take 2 flash pages 
      03.10.11 PK main_new: removed PIO 0..15 initialization to input,
                            this was clashing with low level HW drivers (Song, BCL IO)
A400  17.10.11 KS IPAM101 change: version set to next major number 
<==== 17.10.11 KS Version A4.00 released for IPAM101 testing ===>    
<---- 20.02.12 PK IPAM 101 version merged into head, new version A4.01 ---->
A401  28.02.12 KS 060.59 IPAM101 change: medianew::vPrintStateVal:      IPAM TYPE method added (offset 35)
      05.04.12 KS 060.59 IPAM101 change: medianew::vPrintStateValEqual: IPAM TYPE method added (offset 35)
      05.04.12 KS 060.59 IPAM101 change: makefile updated to add HW & IPAM lists to util.js
      10.04.12 KS        medianew::codec_init. Store Codec Type for display 
      11.04.12 KS 060.58 medianew: IOHandler added to pick up CTS input changes  
      11.04.12 KS 060.58 medianew. corrected use of bLastRTS and read initial start up val from iostate(200)
      11.04.12 KS 060.58 rc::RC_bRTS corrected use of ioctl and iostate.
      11.04.12 KS 060.58 rc::RC_bGetCTS changed to use iostate to return input value for CTS (instead InWord)
      30.04.12 KS 060.53 medianew::reopen_connections: re-resolve DNS on active TCPOpen.  
<==== 04.05.12 KS Version B4.01 released ===>    
A402  10.07.12 PK 060.64 MP3 CBR support
      11.07.12 PK fixed bug in "e=" command handling: encoding was not changed
                  implemented CBR in "e=" command
      12.07.12 PK added dynamic mark &LState(1,15)
      13.07.12 PK added dynamic mark &LState(1,15)
      14.07.12 PK added dynamic mark &LState(1,32)
      16.07.12 PK #60.39: implemented HTTP POST method for setup.cgi; ready for the new UI
      17.07.12 PK improved handling of a= password in HTTP POST
      18.07.12 PK added dynamic mark &LState(1,10)
<==== 18.07.12 PK Version B402 Frozen and released ===>
B402  26.08.13 KS #060.75 medianew: reopen_connections domain resolve moved from case 2 to case 1
      27.08.13 KS #060.76 medianew: tcp_active flag added to targets, routine check_domain_and_resolve added
                  check_domain_and_resolve used in setuptables and init_tcp 
<==== 27.08.13 KS Version B402 20130827 patched version Frozen and released ===>
      28.08.13 KS #060.76 medianew:init_tcps correctd test for !ip.addr && !DN
                  reopen_connections. use case 2 to force at least 500msecs between DNS requests
<==== 28.08.13 KS Version B402 20130828 patched version Frozen and re-released ===>
A403  22.10.13 KS #060.78 medianew:send_packets_high_latency: If PCM, swap endian (IPAM100:LE, IPAM102:BE) 
      23.10.13 KS #060.61 medianew: send_mpeg_frame, g711_callback: RTP, use UDP_STREAM_LISTEN_PORT if ports 0 
      24.10.13 KS #060.72 medianew:vPrintByte: state(3,..55) added to return current webPort
      24.10.13 KS #060.77 medianew:write_estimated_bitrate: CBR processing added
<==== 24.10.13 KS Version B403 Frozen and released ===>                     
A404  01.12.14 PK - workaround for #60.85: added detection and recovery of codec crash
      22.10.15 PK - Monitor removed to gain space
      23.10.15 ASI- #060.94 medianew: modified when changing the codec on-the-fly to use the command line codec parameters after they have been applied and codec reinitialized
      26.10.15 PK - #060.93: reset button timeout for factory defaults increased from 2 to 10 seconds
                  - #060.93: factory defaults via reset button are now configurable via the web UI
      27.10.15 PK - #060.94: setup.cgi now reboots after the WEB server has closed the connection
                    setup.cgi also closes audio before writing Setup to EEPROM to avoid noisy artefacts
<==== 28.10.15 ASI Version B404 Frozen and released ===>
A405  05.11.15 PK - X3-164: configurable username for Icecast 2 source
      03.11.17 ASI- INS-175: wrong listen.xml
<==== 03.11.17 ASI Version B405 Frozen and released ===>
A406  21.03.22 ASI- INS-182: Missing MIC gain in Status report
      22.03.22 ASI- INS-183: instreamer.pls wrong
      23.03.22 ASI- INS-184: External ADC not selectable as audio input
      24.03.22 ASI- Verifying INS-187 (actually solved by BARIOLEG-43/SC-308)
                    Merged with the "update_vlsi_fw" branch to bring in Song module v10.19 (SONG-126)
<==== 24.03.22 ASI Version B406 Frozen and released ===>
*/