1、 ETSI TS 1Digital cellular telecoUniversal Mobile TelCellular Transm(3GPP TS 26.2floppy3TECHNICAL SPECIFICATION126 230 V13.0.0 (2016communications system (Phaelecommunications System (r text telephone modem; smitter bit exact C-code .230 version 13.0.0 Release 13GLOBAL SYSTEMOBILE COMMUN16-01) hase
2、2+); (UMTS); 13) TEM FOR ICATIONSRETSI ETSI TS 126 230 V13.0.0 (2016-01)13GPP TS 26.230 version 13.0.0 Release 13Reference RTS/TSGS-0426230vd00 Keywords GSM,UMTS ETSI 650 Route des Lucioles F-06921 Sophia Antipolis Cedex - FRANCE Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16 Siret N 348 623 562 000
3、17 - NAF 742 C Association but non lucratif enregistre la Sous-Prfecture de Grasse (06) N 7803/88 Important notice The present document can be downloaded from: http:/www.etsi.org/standards-search The present document may be made available in electronic versions and/or in print. The content of any el
4、ectronic and/or print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the print of the Portable Document Format (
5、PDF) version kept on a specific network drive within ETSI Secretariat. Users of the present document should be aware that the document may be subject to revision or change of status. Information on the current status of this and other ETSI documents is available at http:/portal.etsi.org/tb/status/st
6、atus.asp If you find errors in the present document, please send your comment to one of the following services: https:/portal.etsi.org/People/CommiteeSupportStaff.aspx Copyright Notification No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photoc
7、opying and microfilm except as authorized by written permission of ETSI. The content of the PDF version shall not be modified without the written authorization of ETSI. The copyright and the foregoing restriction extend to reproduction in all media. European Telecommunications Standards Institute 20
8、16. All rights reserved. DECTTM, PLUGTESTSTM, UMTSTMand the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members. 3GPPTM and LTE are Trade Marks of ETSI registered for the benefit of its Members and of the 3GPP Organizational Partners. GSM and the GSM logo are Trade Marks regi
9、stered and owned by the GSM Association. ETSI ETSI TS 126 230 V13.0.0 (2016-01)23GPP TS 26.230 version 13.0.0 Release 13Intellectual Property Rights IPRs essential or potentially essential to the present document may have been declared to ETSI. The information pertaining to these essential IPRs, if
10、any, is publicly available for ETSI members and non-members, and can be found in ETSI SR 000 314: “Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to ETSI in respect of ETSI standards“, which is available from the ETSI Secretariat. Latest updates are available
11、 on the ETSI Web server (https:/ipr.etsi.org/). Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee can be given as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI Web server) which are, or
12、 may be, or may become, essential to the present document. Foreword This Technical Specification (TS) has been produced by ETSI 3rd Generation Partnership Project (3GPP). The present document may refer to technical specifications or reports using their 3GPP identities, UMTS identities or GSM identit
13、ies. These should be interpreted as being references to the corresponding ETSI deliverables. The cross reference between GSM, UMTS, 3GPP and ETSI identities can be found under http:/webapp.etsi.org/key/queryform.asp. Modal verbs terminology In the present document “shall“, “shall not“, “should“, “sh
14、ould not“, “may“, “need not“, “will“, “will not“, “can“ and “cannot“ are to be interpreted as described in clause 3.2 of the ETSI Drafting Rules (Verbal forms for the expression of provisions). “must“ and “must not“ are NOT allowed in ETSI deliverables except when used in direct citation. ETSI ETSI
15、TS 126 230 V13.0.0 (2016-01)33GPP TS 26.230 version 13.0.0 Release 13Contents Intellectual Property Rights 2g3Foreword . 2g3Modal verbs terminology 2g30 Scope 5g31 Normative references . 5g32 Definitions and Abbreviations 5g33 C code structure 5g33.1 Contents of the C source code 6g33.2 Program exec
16、ution 6g33.3 Code hierarchy . 10g33.3.1 Initialization routines 10g33.3.2 Signal Processing Functions . 11g33.4 Description of global constants used in the C-code 12g33.5 Type Definitions . 13g33.6 Functions of the C Code . 13g3Annex A (informative): Change history . 27g3History 28g3ETSI ETSI TS 126
17、 230 V13.0.0 (2016-01)43GPP TS 26.230 version 13.0.0 Release 13Foreword This Technical Specification has been produced by T1P1. The contents of the present document are subject to continuing work within the 3GPP TSG and may change following formal 3GPP approval. Should the 3GPP TSG modify the conten
18、ts of this TS, it will be re-released by the 3GPP TSG with an identifying change of release date and an increase in version number as follows: Version x.y.z where: x the first digit: 1 presented to 3GPP for information; 2 presented to 3GPP for approval; 3 Indicates 3GPP approved document under chang
19、e control. y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. z the third digit is incremented when editorial only changes have been incorporated in the specification; ETSI ETSI TS 126 230 V13.0.0 (2016-01)53GPP TS 26.230 version 1
20、3.0.0 Release 130 Scope This Technical Standard (TS) contains an electronic copy of the ANSI-C code for the Cellular Text Telephone Modem (CTM) for reliable transmission of text telephone text via the speech channel of cellular networks. While CTM is generally usable with text in UCS coding, the exa
21、mple application linked to CTM in this document is limited to use the signals and character set of the Baudot type. 1 Normative references This TS incorporates by dated and undated reference, provisions from other publications. These normative references are cited at the appropriate places in the te
22、xt and the publications are listed hereafter. For dated references, subsequent amendments to or revisions of any of these publications apply to this TS only when incorporated in it by amendment or revision. For undated references, the latest edition of the publication referred to applies. 1 3GPP TS
23、26.226: “Cellular text telephone modem; General description“. 2 ISO/IEC 10646-1: “Information technology Universal Multiple-Octet Coded Character Set (UCS) Part 1: Architecture and Basic Multilingual Plane“. 2 Definitions and Abbreviations For the purposes of this TS, the following abbreviations app
24、ly: CTM Cellular Text Telephone Modem FEC Forward Error Correction FSK Frequency Shift Key HCO Hearing Carry Over, (individual may be able to hear, but cannot speak) Alternating transmission of speech and text. PCM Pulse Code Modulation RX Receive TX TransmitTTY Text Telephone UCS Universal Multiple
25、-Octet Coded Character Set UTF UCS transformation format VAD Voice Activity Detection VCO Voice Carry Over, Alternating transmission of speech and text 3 C code structure This clause gives an overview of the structure of the bit-exact C code and provides an overview of the contents and organization
26、of the C code attached to this document. The C code has been verified on the following system. - Sun Microsystems workstations with SUN SolarisTMoperating system and the the Gnu C Compiler (gcc version 2.7.2.3) and GNU Make 3.77; The C code has also been successfully compiled and used in the followi
27、ng environment, with the exception that it cannot be guaranteed that the upper part of the UCS code table in file ucs_functions.c will be compiled correctly since it depends on the codepage setting of the environment. - IBM PC/AT compatible computers with WindowsTMNT 4.0 operating system and Microso
28、ft Visual C+ 6.0TMcompiler. ETSI ETSI TS 126 230 V13.0.0 (2016-01)63GPP TS 26.230 version 13.0.0 Release 133.1 Contents of the C source code The distributed files with suffix “c“ contain the source code and the files with suffix “h“ are the header files. All these files are in the root level of the
29、ZIP-archive. Makefiles are provided for the platforms in which the C code has been verified (listed above). They are called Makefile for GNU Make and Makefile.vc for Microsoft Visual C+TM. For the Sun Microsystems platform, an example shell script for a transmission via two signal adaptation modules
30、 is given in “test_negotiation“. For the Microsoft WindowsTMplatform, no shell script or batch program is provided. The software can be compiled using the commands make all or gmake all in case of Gnu Make nmake /f Makefile.vc in case of Microsoft Visual C+. The executables are compiled into the dir
31、ectory ./solaris (in case of Gnu Make) or into the actual directory in case of Microsoft Visual C+TM. The directory ./patterns provides the file baudot.pcm that serves as input signal for the test script test_negotiation. All output data of test_negotiation will be stored into the directory ./output
32、. If required, this directory will be created by test_negotiation automatically. 3.2 Program execution The CTM signal adaptation module is implemented in the execuable adaptation_switch (in case of Sun SolarisTMplatform) or adaptation_switch.exe (in case of the Micorsoft WindowsTMplatform). The prog
33、ram should be called like: adaptation_switch -ctmin -ctmout -baudotin -baudotout using the following parameters: -ctmin input file with CTM signal -ctmout output file for CTM signal -baudotin input file with Baudot Tones -baudotout output file for Baudot Tones -textout output text file from CTM rece
34、iver (optional) -numsamples number of samples to process (optional) -nonegotiation disables the negotiation (optional) All files contain 16-bit linear encoded PCM audio samples, which are swapped according to the platform“s endian type (Sun Microsystems platforms use big endian, Intel platforms use
35、little endian). An example file baudot.pcm containing a Baudot Code modem signal (big endian) is provided in the subdirectory ./patterns. Due to the fact that the signal adaptation module expects a successful negotiation before Baudot Code signals can be converted to CTM signals, the signal adaptati
36、on module has to be executed several times in two instances in order to execute a successful negotiation. For the Sun Microsystems platform, a shell script test_negotiation is provided for executing the following structure: ETSI ETSI TS 126 230 V13.0.0 (2016-01)73GPP TS 26.230 version 13.0.0 Release
37、 13- ctm_forward - baudot.pcm -| | -| |- baudot_out.pcm | adapt#1 | | adapt#2 | /dev/null Enquiry Burst generated! Enquiry Burst generated! Enquiry Burst generated! CTM from far-end detected! Enquiry From Far End Detected! Enquiry From Far End Detected! Enquiry From Far End Detected! Enquiry Burst g
38、enerated! CTM from far-end detected! CTM from far-end detected! Enquiry From Far End Detected! in case that inChar is not valid (e.g. inChar=0) ETSI ETSI TS 126 230 V13.0.0 (2016-01)153GPP TS 26.230 version 13.0.0 Release 13char convertTTYcode2char(Shortint ttyCode); Purpose: Conversion from TTY cod
39、e into Character Defined in: baudot_functions.c Input Variables: ttyCode Baudot code (must be within the range 0.63) or -1 if there is nothing to convert Return Value: character (or 0 if ttyCode is not valid) char convertUCScode2char(UShortint ucsCode); Purpose: Conversion from UCS code into charact
40、er (Universal Multiple-Octet Coded Character Set, Row 00 of the Multilingual plane according to ISO/IEC 10646-1). This routine only handles characters in the range 0255 since that is all that is required for demonstration of Baudot support. Defined in: ucs_functions.c Input Variables: ucsCode UCS co
41、de index, must be within the range 0.255 Return Value: character (or 0 if ucsCode is not valid) void conv_encoder_exec(conv_encoder_t* ptr_state, Shortint* in, Shortint inbits, Shortint* out); Purpose: Execution of the convolutional encoder for error protection Defined in: conv_encoder.c Input Varia
42、bles: in Vector with net bits inbits Number of valid net bits in vector in Output variables: out Vector with the encoded gross bits. The gross bits are either 0 or 1. The vector out must have at least CHC_RATE*inbits elements. Input/output variables: *ptr_state state variable of the encoder void con
43、v_encoder_init(conv_encoder_t* ptr_state); Purpose: Initialization of the convolutional encoder Defined in: conv_encoder.c Output Variables: *ptr_state Initialized state variable of the encoder ETSI ETSI TS 126 230 V13.0.0 (2016-01)163GPP TS 26.230 version 13.0.0 Release 13void ctm_receiver(fifo_sta
44、te_t* ptr_signal_fifo_state, fifo_state_t* ptr_output_char_fifo_state, Bool* ptr_early_muting_required, rx_state_t* rx_state); Purpose: Runs the CTM Receiver for a block of (nominally) 160 samples. Due to the internal synchronization, the number of processed samples might vary between 156 and 164 sa
45、mples. The input of the samples and the output of the decoded characters is handled via fifo buffers, which have to be initialized externally before using this function (see fifo.h for details). Defined in: ctm_receiver.c input/output variables *ptr_signal_fifo_state fifo state for the input samples
46、 *ptr_output_char_fifo_state fifo state for the output characters *ptr_early_muting_required returns whether the original audio signal must not be forwarded. This is to guarantee that the preamble or resync sequence is detected only by the first CTM device, if several CTM devices are cascaded subseq
47、uently. rx_state pointer to the variable containing the receiver states void ctm_transmitter(UShortint ucsCode, Shortint* txToneVec, tx_state_t* tx_state, Shortint *ptrNumBitsStillToModulate, Bool sineOutput); Purpose: Runs the CTM Transmitter for a block of 160 output samples, representing 8 gross
48、bits. The bits, which are modulated into tones, are taken from an internal fifo buffer. If the fifo buffer is empty, zero-valued samples are generated. The fifo buffer is filled with channel-encoded and interleaved bits, which are generated internally by coding the actual input character. With each
49、call of this function one or less input characters can be coded. If there is no character to for transmission, one of the following codes has be used: - 0x0016 : indicates that there is no character to transmit and that the transmitter should stay in idle mode, if it is currently already in idle mode. If the transmitter is NOT in idle mode, it might generate symbols in order to keep an active burst running. The CTM burst is terminated if five symbols