Project

General

Profile

CSD » History » Revision 7

Revision 6 (fixeria, 01/25/2024 11:20 PM) → Revision 7/8 (fixeria, 01/25/2024 11:32 PM)

h1. CSD (Circuit Switched Data) 

 {{>toc}} 

 This page documents Circuit Switched Data support in the [[mobile]] application (see #4396). 

 h2. L1 PHY support 

 At the time of writing this wiki page, CSD support is implemented for the following L1 PHYs: 

 * [[Layer1bin]] firmware for [[Phones#TI-Calypso-based|Calypso based phones]] 
 * SDR PHY ([[osmotrx:|osmo-trx-ms]]) + [[TRX_Interface#The-trxcon-application|trxcon]] application 
 * SDR PHY ([[osmocom-bb-sdr-phy:|grgsm_trx]]) + [[TRX_Interface#The-trxcon-application|trxcon]] application 
 * [[FakeTRX]] (virtual Um) + [[TRX_Interface#The-trxcon-application|trxcon]] application 

 h2. L23 support state 

 * async (soft-UART) transparent V.110 calls 
 * [not tested] sync transparent V.110 calls 
 ** [not tested] including fax calls 
 * TCH/F9.4, TCH/F4.8, TCH/F2.4 (only @ 2400 bps) 
 * [not tested] TCH/H4.8, TCH/H2.4 (only @ 2400 bps) 

 h3. TODO/limitations 

 * non-transparent calls (V.110 RLP, V.120) 
 * TCH/F14.4 (see also #6167) 
 * TCH/F2.4 and TCH/H2.4 @ 300 bps, 1200/75 bps 
 * ECSD (multi-TCH support) 
 * "CUSE (Character devices in user space)":https://lwn.net/Articles/308445/ 

 h2. VTY configuration 

 Below is an example configuration snippet (only relevant params): 

 <pre> 
 ms 1 
  support 
   no full-data-14400 
   full-data-9600 
   full-data-4800 
   half-data-4800 
   full-data-2400 
   half-data-2400 
  tch-data 
   io-handler unix-sock 
 ! 'ti' is valid for Calypso PHY, change to 'osmo' for trxcon 
   io-tch-format ti 
   unix-socket /tmp/ms_data 
   call-params type-rate 71 
   call-params ce transparent 
   call-params async 
   call-params async nr-stop-bits 1 
   call-params async nr-data-bits 8 
   call-params async parity none 
 </pre> 

 (you can use @osmo-config-merge@ from [[libosmocore]] to merge this snippet into your mobile.cfg) 

 

 h3. Call parameters 

 You can configure data call parameters either using @call MS_NAME params@ command: 

 <pre> 
 OsmocomBB(mobile)> enable 
 OsmocomBB(mobile)# call 1 params ? 
   data    Parameters for data calls 
 OsmocomBB(mobile)# call 1 params data ? 
   type-rate    Type and rate (values like in AT+CBST; see 3GPP TS 27.007, section 6.7) 
   ce           Connection element (does not apply to FAX calls) 
   sync         Synchronous connection (always used for FAX calls) 
   async        Asynchronous connection (does not apply to FAX calls) 
 </pre> 

 ... or by entering the configuration node: 

 <pre> 
 OsmocomBB(mobile)> enable  
 OsmocomBB(mobile)# configure terminal  
 OsmocomBB(mobile)(config)# ms 1 
 OsmocomBB(mobile)(ms)# tch-data  
 OsmocomBB(mobile)(tch-data)# list 
 ... 
   io-handler (none|unix-sock|loopback) 
   no io-handler 
   io-tch-format (osmo|ti) 
   unix-socket PATH 
   call-params type-rate (4|5|6|7|68|70|71) 
   call-params ce (transparent|non-transparent) [prefer] 
   call-params (sync|async) 
   call-params async nr-stop-bits <1-2> 
   call-params async nr-data-bits <7-8> 
   call-params async parity (none|even|odd|mark|space) 
 </pre> 

 Below is the list of supported bearer type/rate combinations: 

 <pre> 
 OsmocomBB(mobile)# call 1 params data type-rate? 
   type-rate    Type and rate (values like in AT+CBST; see 3GPP TS 27.007, section 6.7) 
 OsmocomBB(mobile)# call 1 params data type-rate ? 
   4     2400 bps (V.22bis) 
   5     2400 bps (V.26ter) 
   6     4800 bps (V.32) 
   7     9600 bps (V.32) 
   68    2400 bps (V.110 or X.31 flag stuffing) 
   70    4800 bps (V.110 or X.31 flag stuffing) 
   71    9600 bps (V.110 or X.31 flag stuffing) 
 </pre> 

 This list may be extended in the future, e.g. after adding support for TCH/[FH]2.4 @ 300 bps, 1200/75 bps. 

 h2. Making calls 

 Making a data call is as easy as making a regular voice call: 

 <pre> 
 OsmocomBB(mobile)# call 1 MSISDN ? 
   [voice]    Initiate a regular voice call (default) 
   [data]     Initiate a data call (UDI or 3.1 kHz audio) 
   [fax]      Initiate a data call (Facsimile group 3) 
 </pre> 

 An incoming data call is answered just like a voice call: 

 <pre> 
 OsmocomBB(mobile)# call 1 answer 
 </pre> 

 After the call is connected (i.e. answered either locally or remotely), you can connect to the UNIX socket. 

 An ongoing call can be terminated just like a regular voice call: 

 <pre> 
 OsmocomBB(mobile)# call 1 hangup 
 </pre> 

 An incoming call can also be rejected using this command. 

 h3. Example: sending text using @socat@ 

 <pre><code class="shell"> 
 socat UNIX-CONNECT:/tmp/ms_data STDIO,echo=0,icanon=0 
 </code></pre> 

 h3. Example: sending files using @socat@ and @[xyz]modem@ 

 On the receiving side: 

 <pre><code class="shell"> 
 socat UNIX-CONNECT:/tmp/ms_data EXEC:"lrzsz-rz -v" 
 </code></pre> 

 On the sending side: 

 <pre><code class="shell"> 
 socat UNIX-CONNECT:/tmp/ms_data EXEC:"lrzsz-sz -v /usr/share/licenses/spdx/GPL-2.0-or-later.txt" 
 </code></pre>
Add picture from clipboard (Maximum size: 48.8 MB)