Neo 1973 and Neo FreeRunner gsm modem

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(add gsmhandset.state to eliminate echo on non-neo end of calls)
(Eliminating echo on the non-neo end (far end) of phone calls: +link)
 
(40 intermediate revisions by 13 users not shown)
Line 1: Line 1:
This page is about the [[Neo1973]] GTA01 (and GTA02) GSM Modem, based on the Ti Calypso chipset.
+
This page is about the [[Neo1973]] and [[Neo FreeRunner]] GSM Modem, based on the Ti Calypso chipset.
  
 
== [[Hardware:AT Commands|AT command]] interface ==
 
== [[Hardware:AT Commands|AT command]] interface ==
Line 6: Line 6:
 
To send commands to the GSM modem, you may use  
 
To send commands to the GSM modem, you may use  
 
cu -l /dev/ttySAC0
 
cu -l /dev/ttySAC0
or use gsmd and libgsmd-tool for a less direct method.
+
or use [[gsmd]] and libgsmd-tool for a less direct method.
  
 
If you connect directly (via cu) you must `chown uucp.uucp /dev/ttySAC0` first since cu is picky about permissions.
 
If you connect directly (via cu) you must `chown uucp.uucp /dev/ttySAC0` first since cu is picky about permissions.
Line 17: Line 17:
  
 
=== Standard AT commands ===
 
=== Standard AT commands ===
The GSM modem follows GSM TS07.05, 07.07 and 07.10 very closely.
+
The GSM modem follows GSM [http://www.3gpp.org/ftp/Specs/html-info/0705.htm TS07.05], [http://www.3gpp.org/ftp/Specs/html-info/0707.htm 07.07] and [http://www.3gpp.org/ftp/Specs/html-info/0710.htm 07.10] very closely.
  
FIXME: Describe how those documents can be obtained.
+
[http://www.3gpp.org/specs/numbering.htm 3gpp.org] has information about 3G and GSM specifications
  
 
=== TI proprietary AT commands ===
 
=== TI proprietary AT commands ===
  
there are a few of them, but none of them are really required for regular operation of the device.  Due to NDA issues, OpenMoko cannot provide a reference documentation to those commands.  Using the standards-compliant '''AT+CLAC''', you will notice that the non-standard commands also show up in the command listing.
+
there are a few of them, but none of them are really required for regular operation of the device.  Due to NDA issues, Openmoko cannot provide a reference documentation to those commands.  Using the standards-compliant '''AT+CLAC''', you will notice that the non-standard commands also show up in the command listing.
  
 
You will also notice that those non-standard commands are prefixed with '''AT%''' rather than '''AT+''' for the standards-compliant commands.
 
You will also notice that those non-standard commands are prefixed with '''AT%''' rather than '''AT+''' for the standards-compliant commands.
Line 29: Line 29:
 
Thus, we welcome our user and developer community to play with those commands and document them here.  Since we never have released any NDA documentation to our community, there is no legal issue.
 
Thus, we welcome our user and developer community to play with those commands and document them here.  Since we never have released any NDA documentation to our community, there is no legal issue.
  
Note that the syntax and the interpretation of the output of the commands listed here are only educated guesses and should not be relied on.  Part of the proprietary command set has identical or similar usage as on other modems in the market, some of which have fully opened specifications and information about these commands can be taken from their datasheets (some known similar modems with open specs: ''BenQ M22A'' and ''M23A'', ''Enfora Enabler-G II/III'' and ''SPT 1834'').
+
Note that the syntax and the interpretation of the output of the commands listed here are only educated guesses and should not be relied on.  Part of the proprietary command set has identical or similar usage as on other modems in the market, some of which have fully opened specifications and information about these commands can be taken from their datasheets (some known similar modems with open specs: ''BenQ M22A'' and ''M23A'', ''Enfora Enabler-G [http://www.enfora.com/index.cgi?CONTENT_ID=376&User:LANGUAGE=en II] / [http://www.enfora.com/index.cgi?CONTENT_ID=377&User:LANGUAGE=en III]'' and ''SPT 1834'').
  
 
==== AT%VER ====
 
==== AT%VER ====
Line 134: Line 134:
 
! Parameter no. !! Name !! Meaning !! Remarks
 
! Parameter no. !! Name !! Meaning !! Remarks
 
|-
 
|-
|1  || arfcn || Current Channel Number ||
+
|1  || arfcn || Current Channel Number || See below for frequency calculation
 
|-
 
|-
 
|2  || c1 || Path Loss Criterion C1 ||
 
|2  || c1 || Path Loss Criterion C1 ||
Line 154: Line 154:
 
|10 || rlt || Radio Link Timeout Counter ||
 
|10 || rlt || Radio Link Timeout Counter ||
 
|-
 
|-
|11 || tav || Timing Advance ||
+
|11 || tav || Timing Advance || See below for distance calculation
 
|-
 
|-
 
|12 || rxlev_f || Received Field Strength full ||
 
|12 || rxlev_f || Received Field Strength full ||
Line 174: Line 174:
 
|20 || vocoder || Vocoder || Sig/speech/efr/amr/14.4/9.6/4.8/2.4
 
|20 || vocoder || Vocoder || Sig/speech/efr/amr/14.4/9.6/4.8/2.4
 
|}
 
|}
 +
 +
According to http://www.qrctech.com/freq_chart_24x36.pdf, frequencies can be calculated using the arfcn field like this:
 +
if 172 < arfcn <  252 then freq = 869 + (arfcn -127) x 0.2 MHz    # 850 band
 +
if 511 < arfcn <  811 then freq = 1930 + (arfcn - 511) x 0.2 MHz  # 1900 band
 +
if  1 < arfcn <  124 then freq = 935 + (arfcn * 0.2) MHz        # 900 band (original alloc)
 +
if 974 < arfcn < 1023 then freq = 925 + (arfcn - 974) x 0.2 MHz  # 900 band E-GSM
 +
if 511 < arfcn <  886 then freq = 1805 + (arfcn - 511) x 0.2 MHz  # 1800 band
 +
 +
Notice the 1800 and 1900 bands have the same channel ids and nearly the same algorithm with a different starting point.
 +
 +
According to [http://lists.openmoko.org/pipermail/openmoko-kernel/2008-April/002434.html this mail] the distance from the Base Station can be calculated using the ''tav'' field in 550-metre steps.  This information together with [[GTA01_gsm_modem#Neighbour_Cell_Information_.282.2C3.29|the list of neighbouring cells]] could be used for geolocation and potentially yield better results than using Signal-quality values for that.
  
 
===== Serving Cell GPRS Information (2,2) =====
 
===== Serving Cell GPRS Information (2,2) =====
Line 193: Line 204:
 
|6  || rac || Routing Area Code ||
 
|6  || rac || Routing Area Code ||
 
|-
 
|-
|7  || tav || Timing Advance ||
+
|7  || tav || Timing Advance || See [[GTA01_gsm_modem#Serving_Cell_Information_.282.2C1.29|distance calculation note]]
 
|-
 
|-
 
|8  || dsc || Downlink Signal Counter ||
 
|8  || dsc || Downlink Signal Counter ||
Line 223: Line 234:
 
! Parameter no. !! Short name !! Meaning !! Remarks
 
! Parameter no. !! Short name !! Meaning !! Remarks
 
|-
 
|-
|1  || arfcn || BCCH channel ||
+
|1  || arfcn || BCCH channel || See [[GTA01_gsm_modem#Serving_Cell_Information_.282.2C1.29|frequency calculation note]]
 
|-
 
|-
 
|2  || c1 || Path Loss Criterion C1 ||
 
|2  || c1 || Path Loss Criterion C1 ||
Line 284: Line 295:
 
|1 || bs_pa_mfrms || BS PA MFRMS paging repeat period
 
|1 || bs_pa_mfrms || BS PA MFRMS paging repeat period
 
|-
 
|-
|2 || t3212 || Periodic location updating interval
+
|2 || t3212 || [https://secure.wikimedia.org/wikipedia/en/wiki/Periodic_location_update Periodic location updating interval]
 
|-
 
|-
 
|3 || mcc || [http://en.wikipedia.org/wiki/Mobile_country_code Mobile Country Code]
 
|3 || mcc || [http://en.wikipedia.org/wiki/Mobile_country_code Mobile Country Code]
Line 417: Line 428:
 
  OK
 
  OK
 
===== GMM Information (2,10) =====
 
===== GMM Information (2,10) =====
 +
GSM MM ([https://en.wikipedia.org/wiki/Mobility_management Mobility Management]) protocol
 +
Response format:
 +
%EM: < >,< >,< >,< >,< >,< >,< >,< >
 
{{todo|Fill in}}
 
{{todo|Fill in}}
 +
 
===== GRLC Information (2,11) =====
 
===== GRLC Information (2,11) =====
 +
General RS232 Logical Channel - This channel can handle the 07.07/07.05
 +
AT command set ([https://en.wikipedia.org/wiki/Circuit_Switched_Data CSD], FAX, GPRS, Voice, Network AT, and so on.)
 +
 
{{todo|Fill in}}
 
{{todo|Fill in}}
 +
 
===== AMR Configuration Information (2,12) =====
 
===== AMR Configuration Information (2,12) =====
 +
[https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec Adaptive Multi-Rate Speech Codec]
 
{{todo|Fill in}}
 
{{todo|Fill in}}
 +
 
===== PDP Information (2,13) =====
 
===== PDP Information (2,13) =====
 +
[https://en.wikipedia.org/wiki/Packet_Data_Protocol#PDP_Context Packet Data Protocol], e.g. IP, [https://en.wikipedia.org/wiki/X.25 X.25], [https://en.wikipedia.org/wiki/Frame_Relay FrameRelay]
 
{{todo|Fill in}}
 
{{todo|Fill in}}
  
=== GSM Modem OpenMoko commands ===
+
==== AT%Nxxxx ====
 +
[https://en.wikipedia.org/wiki/Echo_cancellation#Acoustic_echo_cancellation AEC] and [https://en.wikipedia.org/wiki/Noise_reduction#In_audio Noise reduction].
 +
 
 +
This commands can be used to activate builtin echo suppression and
 +
noise reduction. At the moment there's no known way to determine the
 +
current setting.
 +
 
 +
Possible values are:
 +
"0083" "Short AEC is active"
 +
"0283" "Long AEC is active"                                                 
 +
"028B" "Long AEC -6 dB is active"
 +
"0293" "Long AEC -12 dB is active"
 +
"029B" "Long AEC -18 dB is active"
 +
"0105" "Noise reduction is active"
 +
"0125" "Noise reduction -6 dB is active"
 +
"0145" "Noise reduction -12 dB is active"
 +
"0165" "Noise reduction -18 dB is active"
 +
"0187" "Both AEC and Noise reduction are active"
 +
"0001" "AEC and Noise reduction are unactivated"
 +
 
 +
=== GSM Modem Openmoko commands ===
  
The Ti calypso GSM Modem firmware has been extended by OpenMoko specific AT
+
The Ti calypso GSM Modem firmware has been extended by Openmoko specific AT
 
commands.  This page documents those commands.
 
commands.  This page documents those commands.
  
Line 541: Line 583:
 
This also means that gsmd will eventually have to re-program the GSM modem to make sure only relevant unsolicited response codes are sent during suspend.  You usually don't want a signal level change to cause a CPU wake up, only things like incoming message / call.
 
This also means that gsmd will eventually have to re-program the GSM modem to make sure only relevant unsolicited response codes are sent during suspend.  You usually don't want a signal level change to cause a CPU wake up, only things like incoming message / call.
  
Upgrading the modem's firmware is technically possible but no proper software is currently legally available to users outside OpenMoko staff.
+
Upgrading the modem's firmware is technically possible but no proper software is currently legally available to users outside Openmoko staff.
 +
[edit jOERG 2009-04-02] There's FLUID software and GSM-FW-images as well as a uSD-image for automatic update (this GTA02 for now) now. See [[GSM/Flashing]]
  
 
== Power On, Power Off, and Reset of the GTA01 GSM Modem ==
 
== Power On, Power Off, and Reset of the GTA01 GSM Modem ==
Line 568: Line 611:
  
 
  stty -F /dev/ttySAC0 -echo
 
  stty -F /dev/ttySAC0 -echo
  echo "1" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
+
  echo "1" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
  
 
(Note that the stty command argument syntax is somewhat unusual: "-echo" means "disable echo", while "echo" means "enable echo".)
 
(Note that the stty command argument syntax is somewhat unusual: "-echo" means "disable echo", while "echo" means "enable echo".)
Line 581: Line 624:
  
 
  stty -F /dev/ttySAC0 -crtscts
 
  stty -F /dev/ttySAC0 -crtscts
  echo "0" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
+
  echo "0" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
  
 
=== Resetting the GSM Modem ===
 
=== Resetting the GSM Modem ===
Line 588: Line 631:
  
 
  stty -F /dev/ttySAC0 -crtscts
 
  stty -F /dev/ttySAC0 -crtscts
  echo "0" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
+
  echo "0" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
 
  stty -F /dev/ttySAC0 -echo
 
  stty -F /dev/ttySAC0 -echo
  echo "1" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
+
  echo "1" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
  
 
It should be noted that this reset sequence will also power up the modem if it is not enabled and powered up to begin with.  For this reason, the reset sequence above should be used for both power-up and reset purposes.
 
It should be noted that this reset sequence will also power up the modem if it is not enabled and powered up to begin with.  For this reason, the reset sequence above should be used for both power-up and reset purposes.
Line 600: Line 643:
 
  ### Reset the modem to place it in a known state
 
  ### Reset the modem to place it in a known state
 
  stty -F /dev/ttySAC0 -crtscts
 
  stty -F /dev/ttySAC0 -crtscts
  echo "0" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
+
  echo "0" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
 
  stty -F /dev/ttySAC0 -echo
 
  stty -F /dev/ttySAC0 -echo
  echo "1" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
+
  echo "1" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
 
   
 
   
 
  ### Now enable hardware flow control, and transmit the sequence
 
  ### Now enable hardware flow control, and transmit the sequence
Line 612: Line 655:
 
  ### Finally, we disable flow control, and switch back the port
 
  ### Finally, we disable flow control, and switch back the port
 
  stty -F /dev/ttySAC0 -crtscts
 
  stty -F /dev/ttySAC0 -crtscts
  echo "0" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
+
  echo "0" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
 +
 
 +
You probably actually want the GSM modem to turn off automatically when you power down the Neo.  Right now, there is no functionality available from the modem while the Neo is powered off, so it's just a waste of power.  See [[GSMPowerDownInitScript]].
  
=== Eliminating echo on the non-neo end of phone calls ===
+
=== Eliminating echo on the non-neo end (far end) of phone calls ===
Here is the modified /etc/gsmhandset.state that  eliminates echo during calls (at least for  [[User:Wurp]]):
+
Issue appropriate AT%Nxxxx command to enable AEC ([http://wiki.openmoko.org/wiki/Hardware:AT_Commands#Echo_Suppression_and_Noise_Reduction Echo Cancellation]) in calypso. Has to be done per-call as it's not "sticky" (=after modem-powerup/init and after every call). Recent GSM-handling-daemons (as of Apr 2009) tend to finally implement this function.
  
state.neo1973 {
+
This echo issue isn't considered to be fixable for good by modifying mixer-settings, as you always get a tradeoff resulting in either low earpiece volume or poor mic-sensitivity.
control.1 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 255'
+
iface MIXER
+
name 'PCM Volume'
+
value.0 230
+
value.1 230
+
}
+
control.2 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 255'
+
iface MIXER
+
name 'ADC Capture Volume'
+
value.0 195
+
value.1 195
+
}
+
control.3 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 127'
+
iface MIXER
+
name 'Headphone Playback Volume'
+
value.0 127
+
value.1 127
+
}
+
control.4 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 127'
+
iface MIXER
+
name 'Speaker Playback Volume'
+
value.0 121
+
value.1 121
+
}
+
control.5 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 127'
+
iface MIXER
+
name 'Mono Playback Volume'
+
value 121
+
}
+
control.6 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 7'
+
iface MIXER
+
name 'Bypass Playback Volume'
+
value.0 2
+
value.1 2
+
}
+
control.7 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 7'
+
iface MIXER
+
name 'Sidetone Playback Volume'
+
value.0 2
+
value.1 2
+
}
+
control.8 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 7'
+
iface MIXER
+
name 'Voice Playback Volume'
+
value.0 2
+
value.1 2
+
}
+
control.9 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 2
+
iface MIXER
+
name 'Headphone Playback ZC Switch'
+
value.0 false
+
value.1 false
+
}
+
control.10 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 2
+
iface MIXER
+
name 'Speaker Playback ZC Switch'
+
value.0 false
+
value.1 false
+
}
+
control.11 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 7'
+
iface MIXER
+
name 'Mono Bypass Playback Volume'
+
value 2
+
}
+
control.12 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 7'
+
iface MIXER
+
name 'Mono Sidetone Playback Volume'
+
value 2
+
}
+
control.13 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 7'
+
iface MIXER
+
name 'Mono Voice Playback Volume'
+
value 2
+
}
+
control.14 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Mono Playback ZC Switch'
+
value false
+
}
+
control.15 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Linear Control'
+
comment.item.1 'Adaptive Boost'
+
iface MIXER
+
name 'Bass Boost'
+
value 'Linear Control'
+
}
+
control.16 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 '130Hz @ 48kHz'
+
comment.item.1 '200Hz @ 48kHz'
+
comment.item.2 '100Hz @ 16kHz'
+
comment.item.3 '400Hz @ 48kHz'
+
comment.item.4 '100Hz @ 8kHz'
+
comment.item.5 '200Hz @ 8kHz'
+
iface MIXER
+
name 'Bass Filter'
+
value '130Hz @ 48kHz'
+
}
+
control.17 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 15'
+
iface MIXER
+
name 'Bass Volume'
+
value 0
+
}
+
control.18 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 15'
+
iface MIXER
+
name 'Treble Volume'
+
value 7
+
}
+
control.19 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 '8kHz'
+
comment.item.1 '4kHz'
+
iface MIXER
+
name 'Treble Cut-off'
+
value '8kHz'
+
}
+
control.20 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 7'
+
iface MIXER
+
name 'Sidetone Capture Volume'
+
value.0 2
+
value.1 2
+
}
+
control.21 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 7'
+
iface MIXER
+
name 'Voice Sidetone Capture Volume'
+
value 2
+
}
+
control.22 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 2
+
comment.range '0 - 63'
+
iface MIXER
+
name 'Capture Volume'
+
value.0 23
+
value.1 23
+
}
+
control.23 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 2
+
iface MIXER
+
name 'Capture ZC Switch'
+
value.0 false
+
value.1 false
+
}
+
control.24 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 2
+
iface MIXER
+
name 'Capture Switch'
+
value.0 false
+
value.1 false
+
}
+
control.25 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 '3.4Hz @ 48kHz'
+
comment.item.1 '82Hz @ 16k'
+
comment.item.2 '82Hz @ 8kHz'
+
comment.item.3 '170Hz @ 8kHz'
+
iface MIXER
+
name 'Capture Filter Select'
+
value '3.4Hz @ 48kHz'
+
}
+
control.26 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 HiFi
+
comment.item.1 Voice
+
iface MIXER
+
name 'Capture Filter Cut-off'
+
value HiFi
+
}
+
control.27 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Capture Filter Switch'
+
value true
+
}
+
control.28 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 7'
+
iface MIXER
+
name 'ALC Capture Target Volume'
+
value 3
+
}
+
control.29 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 7'
+
iface MIXER
+
name 'ALC Capture Max Volume'
+
value 7
+
}
+
control.30 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 Off
+
comment.item.1 Right
+
comment.item.2 Left
+
comment.item.3 Stereo
+
iface MIXER
+
name 'ALC Capture Function'
+
value Off
+
}
+
control.31 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'ALC Capture ZC Switch'
+
value false
+
}
+
control.32 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 15'
+
iface MIXER
+
name 'ALC Capture Hold Time'
+
value 15
+
}
+
control.33 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 15'
+
iface MIXER
+
name 'ALC Capture Decay Time'
+
value 12
+
}
+
control.34 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 15'
+
iface MIXER
+
name 'ALC Capture Attack Time'
+
value 2
+
}
+
control.35 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 31'
+
iface MIXER
+
name 'ALC Capture NG Threshold'
+
value 0
+
}
+
control.36 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Constant PGA Gain'
+
comment.item.1 'Mute ADC Output'
+
iface MIXER
+
name 'ALC Capture NG Type'
+
value 'Constant PGA Gain'
+
}
+
control.37 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'ALC Capture NG Switch'
+
value false
+
}
+
control.38 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 Capture
+
comment.item.1 Playback
+
iface MIXER
+
name '3D Function'
+
value Capture
+
}
+
control.39 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 '2.2kHz'
+
comment.item.1 '1.5kHz'
+
iface MIXER
+
name '3D Upper Cut-off'
+
value '2.2kHz'
+
}
+
control.40 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 '200Hz'
+
comment.item.1 '500Hz'
+
iface MIXER
+
name '3D Lower Cut-off'
+
value '200Hz'
+
}
+
control.41 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 15'
+
iface MIXER
+
name '3D Volume'
+
value 0
+
}
+
control.42 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name '3D Switch'
+
value false
+
}
+
control.43 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Capture 6dB Attenuate'
+
value false
+
}
+
control.44 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Playback 6dB Attenuate'
+
value false
+
}
+
control.45 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 None
+
comment.item.1 '32kHz'
+
comment.item.2 '44.1kHz'
+
comment.item.3 '48kHz'
+
iface MIXER
+
name De-emphasis
+
value None
+
}
+
control.46 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 Stereo
+
comment.item.1 Left
+
comment.item.2 Right
+
comment.item.3 Mono
+
iface MIXER
+
name 'Playback Mono Mix'
+
value Stereo
+
}
+
control.47 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Non Inverted'
+
comment.item.1 Inverted
+
iface MIXER
+
name 'Playback Phase'
+
value 'Non Inverted'
+
}
+
control.48 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 3'
+
iface MIXER
+
name 'Mic2 Capture Volume'
+
value 0
+
}
+
control.49 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 3'
+
iface MIXER
+
name 'Mic1 Capture Volume'
+
value 0
+
}
+
control.50 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'DAI 0'
+
comment.item.1 'DAI 1'
+
comment.item.2 'DAI 2'
+
comment.item.3 'DAI 3'
+
iface MIXER
+
name 'DAI Mode'
+
value 'DAI 0'
+
}
+
control.51 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 Stereo
+
comment.item.1 'Left ADC'
+
comment.item.2 'Right ADC'
+
comment.item.3 'Channel Swap'
+
iface MIXER
+
name 'ADC Data Select'
+
value Stereo
+
}
+
control.52 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Mic 1'
+
comment.item.1 'Mic 2'
+
comment.item.2 'Mic 3'
+
iface MIXER
+
name 'Mic Selection Mux'
+
value 'Mic 1'
+
}
+
control.53 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'RXP - RXN'
+
comment.item.1 'RXP + RXN'
+
comment.item.2 RXP
+
comment.item.3 RXN
+
iface MIXER
+
name 'Rx Mixer'
+
value 'RXP - RXN'
+
}
+
control.54 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Line 1 + 2'
+
comment.item.1 'Line 1 - 2'
+
comment.item.2 'Line 1'
+
comment.item.3 'Line 2'
+
iface MIXER
+
name 'Line Mixer'
+
value 'Line 1 + 2'
+
}
+
control.55 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Line Mix'
+
comment.item.1 'Rx Mix'
+
iface MIXER
+
name 'Line Mono Mux'
+
value 'Line Mix'
+
}
+
control.56 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Line 2'
+
comment.item.1 'Rx Mix'
+
iface MIXER
+
name 'Line Right Mux'
+
value 'Line 2'
+
}
+
control.57 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Line 1'
+
comment.item.1 'Rx Mix'
+
iface MIXER
+
name 'Line Left Mux'
+
value 'Line 1'
+
}
+
control.58 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'ALC Mixer Line Capture Switch'
+
value false
+
}
+
control.59 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'ALC Mixer Mic2 Capture Switch'
+
value false
+
}
+
control.60 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'ALC Mixer Mic1 Capture Switch'
+
value false
+
}
+
control.61 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'ALC Mixer Rx Capture Switch'
+
value false
+
}
+
control.62 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Left PGA'
+
comment.item.1 'Mic 1'
+
comment.item.2 'Mic 2'
+
comment.item.3 'Right PGA'
+
iface MIXER
+
name 'Mic Sidetone Mux'
+
value 'Left PGA'
+
}
+
control.63 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 PGA
+
comment.item.1 'Line or RXP-RXN'
+
comment.item.2 Sidetone
+
iface MIXER
+
name 'Capture Right Mux'
+
value PGA
+
}
+
control.64 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 PGA
+
comment.item.1 'Line or RXP-RXN'
+
comment.item.2 Line
+
iface MIXER
+
name 'Capture Left Mux'
+
value PGA
+
}
+
control.65 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 Stereo
+
comment.item.1 'Analogue Mix Left'
+
comment.item.2 'Analogue Mix Right'
+
comment.item.3 'Digital Mono Mix'
+
iface MIXER
+
name 'Capture Right Mixer'
+
value Stereo
+
}
+
control.66 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 Stereo
+
comment.item.1 'Analogue Mix Left'
+
comment.item.2 'Analogue Mix Right'
+
comment.item.3 'Digital Mono Mix'
+
iface MIXER
+
name 'Capture Left Mixer'
+
value Stereo
+
}
+
control.67 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Playback Mixer Voice Capture Sw'
+
value false
+
}
+
control.68 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Playback Mixer Left Capture Swi'
+
value false
+
}
+
control.69 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Playback Mixer Right Capture Sw'
+
value false
+
}
+
control.70 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 VREF
+
comment.item.1 'Capture ST'
+
comment.item.2 LOUT2
+
iface MIXER
+
name 'Out4 Mux'
+
value VREF
+
}
+
control.71 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 VREF
+
comment.item.1 ROUT2
+
comment.item.2 'Left + Right'
+
iface MIXER
+
name 'Out3 Mux'
+
value VREF
+
}
+
control.72 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 'Inverted Mono 1'
+
comment.item.1 Left
+
comment.item.2 Right
+
comment.item.3 'Left + Right'
+
iface MIXER
+
name 'Mono 2 Mux'
+
value 'Inverted Mono 1'
+
}
+
control.73 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Mono Mixer Left Playback Switch'
+
value false
+
}
+
control.74 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Mono Mixer Right Playback Switc'
+
value false
+
}
+
control.75 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Mono Mixer Voice Playback Switc'
+
value false
+
}
+
control.76 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Mono Mixer Sidetone Playback Sw'
+
value false
+
}
+
control.77 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Mono Mixer Bypass Playback Swit'
+
value false
+
}
+
control.78 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Right Mixer Voice Playback Swit'
+
value false
+
}
+
control.79 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Right Mixer Sidetone Playback S'
+
value false
+
}
+
control.80 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Right Mixer Right Playback Swit'
+
value true
+
}
+
control.81 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Right Mixer Bypass Playback Swi'
+
value false
+
}
+
control.82 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Left Mixer Voice Playback Switc'
+
value false
+
}
+
control.83 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Left Mixer Sidetone Playback Sw'
+
value false
+
}
+
control.84 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Left Mixer Left Playback Switch'
+
value true
+
}
+
control.85 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Left Mixer Bypass Playback Swit'
+
value false
+
}
+
control.86 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 31'
+
iface MIXER
+
name 'Amp Left Playback Volume'
+
value 22
+
}
+
control.87 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 31'
+
iface MIXER
+
name 'Amp Right Playback Volume'
+
value 22
+
}
+
control.88 {
+
comment.access 'read write'
+
comment.type INTEGER
+
comment.count 1
+
comment.range '0 - 31'
+
iface MIXER
+
name 'Amp Mono Playback Volume'
+
value 0
+
}
+
control.89 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 Off
+
comment.item.1 'Call Speaker'
+
comment.item.2 'Stereo Speakers'
+
comment.item.3 'Stereo Speakers + Headphones'
+
comment.item.4 Headphones
+
iface MIXER
+
name 'Amp Mode'
+
value 'Stereo Speakers + Headphones'
+
}
+
control.90 {
+
comment.access 'read write'
+
comment.type ENUMERATED
+
comment.count 1
+
comment.item.0 Off
+
comment.item.1 'GSM Handset'
+
comment.item.2 'GSM Headset'
+
comment.item.3 'GSM Bluetooth'
+
comment.item.4 Speakers
+
comment.item.5 Headphones
+
comment.item.6 'Capture Handset'
+
comment.item.7 'Capture Headset'
+
comment.item.8 'Capture Bluetooth'
+
iface MIXER
+
name 'Neo Mode'
+
value Headphones
+
}
+
control.91 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Amp Spk 3D Playback Switch'
+
value false
+
}
+
control.92 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Amp HP 3d Playback Switch'
+
value false
+
}
+
control.93 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Amp Fast Wakeup Playback Switch'
+
value false
+
}
+
control.94 {
+
comment.access 'read write'
+
comment.type BOOLEAN
+
comment.count 1
+
iface MIXER
+
name 'Amp Earpiece 6dB Playback Switch'
+
value false
+
}
+
}
+
  
 +
==See also==
 +
* [[Osmocom on TI Calypso]]
  
 
[[Category:Neo1973 Hardware]]
 
[[Category:Neo1973 Hardware]]
 +
[[Category:Neo FreeRunner Hardware]]
 
[[Category:GSM]]
 
[[Category:GSM]]

Latest revision as of 07:34, 12 February 2012

This page is about the Neo1973 and Neo FreeRunner GSM Modem, based on the Ti Calypso chipset.

Contents

[edit] AT command interface

[edit] Sending Commands

To send commands to the GSM modem, you may use cu -l /dev/ttySAC0 or use gsmd and libgsmd-tool for a less direct method.

If you connect directly (via cu) you must `chown uucp.uucp /dev/ttySAC0` first since cu is picky about permissions.

libgsmd-tool is less functional than the direct raw connection to the modem.

Note: If you use cu -l /dev/ttySAC0 to enter commands, type "~." to quit

[edit] Standard AT commands

The GSM modem follows GSM TS07.05, 07.07 and 07.10 very closely.

3gpp.org has information about 3G and GSM specifications

[edit] TI proprietary AT commands

there are a few of them, but none of them are really required for regular operation of the device. Due to NDA issues, Openmoko cannot provide a reference documentation to those commands. Using the standards-compliant AT+CLAC, you will notice that the non-standard commands also show up in the command listing.

You will also notice that those non-standard commands are prefixed with AT% rather than AT+ for the standards-compliant commands.

Thus, we welcome our user and developer community to play with those commands and document them here. Since we never have released any NDA documentation to our community, there is no legal issue.

Note that the syntax and the interpretation of the output of the commands listed here are only educated guesses and should not be relied on. Part of the proprietary command set has identical or similar usage as on other modems in the market, some of which have fully opened specifications and information about these commands can be taken from their datasheets (some known similar modems with open specs: BenQ M22A and M23A, Enfora Enabler-G II / III and SPT 1834).

[edit] AT%VER

Prints the firmware component versions.

The modem's response looks like this on an un-updated phase-0 GTA01Bv4 phone:

%VER: aci sean non_clearcase   15:11:24 17/04/07
%VER: cc a086 ** NONE **      10:16:39 28/03/07
%VER: dl a086 ** NONE **      10:17:34 28/03/07
%VER: mm a086 ** NONE **      10:23:09 28/03/07
%VER: rr a086 ** NONE **      10:25:37 28/03/07
%VER: sim a086 ** NONE **      10:26:45 28/03/07
%VER: sms a086 ** NONE **      10:27:21 28/03/07
%VER: ss a086 ** NONE **      10:28:52 28/03/07
%VER: alr a086 ** NONE **      10:15:48 28/03/07
%VER: l2r a086 ** NONE **      10:21:37 28/03/07
%VER: ra a086 ** NONE **      10:25:01 28/03/07
%VER: rlp a086 ** NONE **      10:25:12 28/03/07
%VER: fad a086 ** NONE **      10:18:09 28/03/07
%VER: t30 a086 ** NONE **      10:29:01 28/03/07

For a GTA01Bv4 phase 1 phone, produced start of september:

%VER: aci sean non_clearcase   12:32:56 24/08/07
%VER: cc a086 ** NONE **      14:07:10 08/06/07
%VER: dl a086 ** NONE **      14:07:46 08/06/07
%VER: mm a086 ** NONE **      14:11:52 08/06/07
%VER: rr a086 ** NONE **      14:13:01 08/06/07
%VER: sim a086 ** NONE **      14:13:54 08/06/07
%VER: sms a086 ** NONE **      14:14:20 08/06/07
%VER: ss a086 ** NONE **      14:15:52 08/06/07
%VER: alr a086 ** NONE **      14:06:38 08/06/07
%VER: l2r a086 ** NONE **      14:10:36 08/06/07
%VER: ra a086 ** NONE **      14:12:32 08/06/07
%VER: rlp a086 ** NONE **      14:12:40 08/06/07
%VER: fad a086 ** NONE **      14:08:06 08/06/07

For a GTA01Bv3 phase 0 phone:

%VER: aci sean non_clearcase   10:46:06 29/08/06
%VER: cc a086 non_clearcase   14:53:59 28/08/06
%VER: dl a086 non_clearcase   14:54:40 28/08/06
%VER: mm a086 non_clearcase   14:59:25 28/08/06
%VER: rr a086 non_clearcase   15:00:11 28/08/06
%VER: sim a086 non_clearcase   15:00:57 28/08/06
%VER: sms a086 non_clearcase   15:01:23 28/08/06
%VER: ss a086 non_clearcase   15:02:22 28/08/06
%VER: alr a086 non_clearcase   14:53:19 28/08/06
%VER: l2r a086 non_clearcase   14:58:02 28/08/06
%VER: ra a086 non_clearcase   14:59:50 28/08/06
%VER: rlp a086 non_clearcase   14:59:56 28/08/06
%VER: fad a086 non_clearcase   14:55:04 28/08/06
%VER: t30 a086 non_clearcase   15:02:27 28/08/06

The second column lists firmware component names (e.g. aci = AT Command Interface). The third column is the user name of the engineer who last modified given component. The rightmost column is probably the last time someone worked on it (Please note that the name 'sean' here is not Sean Moss-Pultz :) while a086 is an anonymous TI engineer's nick, meaning that the component has not been modified at FIC).

[edit] AT%A

Print values from an ADC.

This command is not listed in AT+CLAC output but it is triggered by any input that starts with AT%A except AT%ALS (Alternative Line Service) and AT%ATR, which are other proprietary AT commands. So for example AT%ABCD,HELLO will also run this commands. On my Neo modem it prints a line containing nine values of the form ADC <number> = <value>:

AT%A
EXT: I
ADC 0 = e19, ADC 1 = 0, ADC 2 = d, ADC 3 = 6ea, ADC 4 = a25, ADC 5 = 9fc, ADC 6 = 96d, ADC 7 = 0, ADC 8 = 6

It would seem there's an ADC (analog-to-digital converter) module in the modem with nine input lines connected to it and the values on these lines are reported by this command in hexadecimal format. The values change over time. Inputs 1 and 7 always show zero on my modem, input 1 value changes slightly (+/- 20), while values on inputs 3, 4, 5, 6 and 8 change seemingly randomly in the range 0x000 - 0xfff (it would seem the chip is 12-bit).

[edit] AT%NRG

The AT%NRG (Network registration and service selection) is an expansion of the AT+COPS command. It allows specifying the service state of the registration, in addition to AT+COPS functionality. It doesn't however allow listing all present operators (use AT+COPS for this).

[edit] AT%EM

Execution of Engineering Mode commands. Allows viewing the information accessible to the modem but not available through standard GSM AT commands set such as detailed information on the current Serving Cell (the one we're registered with), its neighbouring cells, the GPRS/EDGE availability and SIM card data.

Citing Enfora Inc. Application Note EDG0108TN01: The purpose of Engineering Mode (EM) is to provide means to observe the behavior of the mobile station and the settings of the network as counterpart and therefore defines a lot of possibilities to analyze the network. The EM can be used for observation of a defined data set during functional test and field test.

Warning: The display of certain parameters is dependent on the wireless network sending the correct information in the System Information Packets. There is no guaranty that the information is always forwarded from the network. At times data may not be present to display in the Engineering Mode responses.

Syntax:

AT%EM=<mode>,<command>

Allowed <mode> values:

  • 2 - AT command mode
  • 3 - PCO mode

I only describe the AT mode commands here. Commands are in range 1 to 13:

AT%EM=2,1  Serving Cell Information
AT%EM=2,2  Serving Cell GPRS Information
AT%EM=2,3  Neighbour Cell Information
AT%EM=2,4  Location and Paging Parameters
AT%EM=2,5  PLMN Parameters
AT%EM=2,6  Ciphering, Hopping, DTX Parameters
AT%EM=2,7  Power Parameters
AT%EM=2,8  Identity Parameters
AT%EM=2,9  Firmware components versions
AT%EM=2,10 GMM Information
AT%EM=2,11 GRLC Information
AT%EM=2,12 AMR Configuration Information
AT%EM=2,13 PDP Information
[edit] Serving Cell Information (2,1)

Response format:

%EM: <afrcn>,<c1>,<c2>,<rxlev>,<bsic>,<cell_id>,<dsc>,<txlev>,<tn>,<rlt>,<tav>,<rxlev_f>,<rxlev_s>,<rxqual_f>,<rxqual_s>,<lac>,<cba>,<cbq>,<cell_type_ind>,<vocoder>
Parameter no. Name Meaning Remarks
1 arfcn Current Channel Number See below for frequency calculation
2 c1 Path Loss Criterion C1
3 c2 Cell-reselection Criterion C2
4 rxlev Received Field Strength (rxlev/2)+2 gives the AT+CSQ response value
5 bsic Base Station ID Code
6 cell_id Cell Indentifier
7 dsc Downlink Signaling Counter current counter value
8 txlev Transmit Power Level
9 tn Timeslot Number
10 rlt Radio Link Timeout Counter
11 tav Timing Advance See below for distance calculation
12 rxlev_f Received Field Strength full
13 rxlev_s Received Field Strength sub
14 rxqual_f Received Quality full
15 rxqual_s Received Quality sub
16 lac Location Area Code
17 cba Cell Bar Access
18 cbq Cell Bar Qualifier
19 Cell_type_ind Cell Type Indicator NA/GSM/GPRS
20 vocoder Vocoder Sig/speech/efr/amr/14.4/9.6/4.8/2.4

According to http://www.qrctech.com/freq_chart_24x36.pdf, frequencies can be calculated using the arfcn field like this:

if 172 < arfcn <  252 then freq = 869 + (arfcn -127) x 0.2 MHz    # 850 band 
if 511 < arfcn <  811 then freq = 1930 + (arfcn - 511) x 0.2 MHz  # 1900 band
if   1 < arfcn <  124 then freq = 935 + (arfcn * 0.2) MHz         # 900 band (original alloc)
if 974 < arfcn < 1023 then freq = 925 + (arfcn - 974) x 0.2 MHz   # 900 band E-GSM
if 511 < arfcn <  886 then freq = 1805 + (arfcn - 511) x 0.2 MHz  # 1800 band

Notice the 1800 and 1900 bands have the same channel ids and nearly the same algorithm with a different starting point.

According to this mail the distance from the Base Station can be calculated using the tav field in 550-metre steps. This information together with the list of neighbouring cells could be used for geolocation and potentially yield better results than using Signal-quality values for that.

[edit] Serving Cell GPRS Information (2,2)

Response format:

%EM: <nts>,<nmo>,<spgc_ccch_sup>,<priority_access_thr>,<cba>,<rac>,<tav>,<dsc>,<c31>,<c32>,<band_ind>,<pfc_supp_n_w>,<ccn_mode_sts>,<Psi_sts_suppt>,<edge_support>,<epcr_support>,<bep_period>,<bss_paging_coord>
Parameter no. Name Meaning Remarks
1 nts PCCCH_TIMESLOT Number of downlink timeslots
2 nmo Network Mode of Operation
3 spgc_ccch_sup Network Control-spgc_ccch_sup Network support for split paging
4 priority_access_thr Network Control-Priority_Access_Threshold packet access to the NW according to priority level
5 cba Cell Bar Access
6 rac Routing Area Code
7 tav Timing Advance See distance calculation note
8 dsc Downlink Signal Counter
9 c31 Cell-reselect Criterion C31
10 c32 Cell-reselect Criterion C32
11 band_ind Band Indicator
12 pfc_supp_n_w PFC Support
13 ccn_mode_sts CCN Mode
14 Psi_sts_suppt PSI Support
15 edge_support EDGE Support
16 epcr_support EPCR Support
17 bep_period BEP Period
18 bss_paging_coord BSS Paging
[edit] Neighbour Cell Information (2,3)

The first line of response is of the format %EM: <number of cells listed>, where the maximum seems to be 6, one cell for each channel. The next sixteen lines list the values of each of the parameters for each of the cells.

Parameter no. Short name Meaning Remarks
1 arfcn BCCH channel See frequency calculation note
2 c1 Path Loss Criterion C1
3 c2 Cell-reselection Criterion C2
4 rxlev Received Field Strength (rxlev/2)+2 gives the AT+CSQ response value
5 bsic Base Station ID Code
6 cell_id Cell Indentity
7 lac Location Area Code
8 frame_offset Frame Offset
9 time_alignmnt Time Alignment
10 cba Cell Bar Access
11 cbq Cell Bar Qualifier
12 cell_type_ind Cell Type Indicator NA/GSM/GPRS
13 rac Routing Area Code
14 cell_resel_offset Cell-reselection Offset
15 temp_offset Temporary Offset
16 rxlev_acc_min Rxlen access min

My Neo1973 reports:

AT%EM=2,3
%EM: 6
763,766,771,778,780,773
20,8,14,18,17,8
20,8,14,18,17,8
73,46,54,51,13,12
6753,10951,3531,0,1933,1924
100,100,300,300,300,100
80229,961995,0,1166923,0,2715553
3504,724,0,3724,4,1112
0,0,0,0,0,0
0,0,0,0,0,0
2,2,2,2,2,2
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
10,10,10,10,10,10

OK
[edit] Location and Paging Parameters (2,4)

Response format:

%EM: <bs_pa_mfrms>,<t3212>,<mcc[0]><mcc[1]><mcc[2]>,<mnc[0]><mnc[1]><mnc[2]>,<tmsi>
Parameter no. Name Meaning
1 bs_pa_mfrms BS PA MFRMS paging repeat period
2 t3212 Periodic location updating interval
3 mcc Mobile Country Code
4 mnc Mobile Network Code
5 tmsi Temporary Mobile Subscriber Identity (in binary)

The MCC and MNC values are the same values that are used to form the Mobile Operator names used by the standard AT+COPS and AT+COPN commands in numeric format. The TMSI is the same number that AT%EM=2,8 gives, just in a different format.

[edit] PLMN Parameters (2,5)

Response format:

%EM: <no_creq_max>,<reest_flag>,<txpwr_max>,<rxlev_min>,<rel_cs>,<sgsnr_rel>,<mscr_rel>,<net_rel>
Parameter no. Name Meaning
1 no_creq_max Max. number or retries for channel requests
2 reest_flag Re-establishment Flag
3 txpwr_max MS TXPWR MAX CCCH
4 rxlev_min Rxlev_access_min
5 rel_cs Release Cause (only the last release cause is remembered)
6 sgsnr_rel SGSNR Release
7 mscr_rel MSCR Release
8 net_rel Network Release Info
[edit] Ciphering, Hopping, DTX Parameters (2,6)
TODO: Fill in (See: To-Do List)
[edit] Power Parameters (2,7)

The output consits of two lines, first line containing 12 comma-separated values and the second line 18 comma-separated values, such as:

AT%EM=2,7
%EM: 1,1,0,0,0,1,1,0,0,0,1,0
6,0,0,0,0,1,1,1,4,0,0,0,0,1,0,0,0,0

OK

On the first line (called Classmark 2) we have:

Value no. Meaning Remarks
1 Revision Level
2 Controlled Early Classmark Sending 1 means enabled
3 A5/1 Encryption algorithm 0 means available
4 RF Power capability
5 Pseudo-synchronisation capability 1 means present
6 SS Screening Indicator
7 SMS capability
8 Frequency capability
9 Classmark 3 options 1 means supported
10 CM Service Prompt 1 means supported
11 A5/3 Encryption algorithm 1 means available
12 A5/2 Encryption algorithm 1 means available

On the second line (called Classmark 3) we have:

Value no. Meaning Remarks
1 Multiband support
2 A5/7 Encryption algorithm 1 means available
3 A5/6 Encryption algorithm 1 means available
4 A5/5 Encryption algorithm 1 means available
5 A5/4 Encryption algorithm 1 means available
6 Valid Radio capability 2  ??
7 Associated Radio capability 2
8 Valid Radio capability 1  ??
9 Associated Radio capability 1
10 Valid R Support  ??
11 R Support R-GSM Class
12 Valid Multi-slot Class  ??
13 Multi-slot Class
14 Unicode 2 treatment
15 Extended Measurement capability 1 means supported
16 Valid Switch-measure-value  ??
17 Switch-measure-value
18 Switch-measure-switch-value
[edit] Identity Parameters (2,8)

Response format:

%EM: <imeisv>
<imsi>
<tmsi>

OK

The IMEISV line contains 20 numbers separated by commas, the numbers on positions 5 to 18 are the digits of the IMEI number as returned by AT+CGSN. The second line contains another 20 numbers and the numbers on positions 5 to 19 form the digits of your SIM card's IMSI number, as returned by the AT+CIMI command. The last line contains the Temporary Mobile Subscriber Identity number in plain format (ten digits).

[edit] Firmware components versions (2,9)

Prints version information for different components of the modem's firmware. The format and the scope of the information presented is identical to that in AT%VER output with the exception that only a subset of all of the components are listed:

AT%EM=2,9
%VER: alr a086 ** NONE **      10:15:48 28/03/07
%VER: dl a086 ** NONE **      10:17:34 28/03/07
%VER: rr a086 ** NONE **      10:25:37 28/03/07
%VER: mm a086 ** NONE **      10:23:09 28/03/07
%VER: cc a086 ** NONE **      10:16:39 28/03/07
%VER: ss a086 ** NONE **      10:28:52 28/03/07
%VER: sim a086 ** NONE **      10:26:45 28/03/07
%VER: sms a086 ** NONE **      10:27:21 28/03/07

OK
[edit] GMM Information (2,10)

GSM MM (Mobility Management) protocol Response format:

%EM: < >,< >,< >,< >,< >,< >,< >,< >
TODO: Fill in (See: To-Do List)
[edit] GRLC Information (2,11)

General RS232 Logical Channel - This channel can handle the 07.07/07.05 AT command set (CSD, FAX, GPRS, Voice, Network AT, and so on.)

TODO: Fill in (See: To-Do List)
[edit] AMR Configuration Information (2,12)

Adaptive Multi-Rate Speech Codec

TODO: Fill in (See: To-Do List)
[edit] PDP Information (2,13)

Packet Data Protocol, e.g. IP, X.25, FrameRelay

TODO: Fill in (See: To-Do List)

[edit] AT%Nxxxx

AEC and Noise reduction.

This commands can be used to activate builtin echo suppression and noise reduction. At the moment there's no known way to determine the current setting.

Possible values are:

"0083" "Short AEC is active"
"0283" "Long AEC is active"                                                  
"028B" "Long AEC -6 dB is active"
"0293" "Long AEC -12 dB is active"
"029B" "Long AEC -18 dB is active"
"0105" "Noise reduction is active"
"0125" "Noise reduction -6 dB is active"
"0145" "Noise reduction -12 dB is active"
"0165" "Noise reduction -18 dB is active"
"0187" "Both AEC and Noise reduction are active"
"0001" "AEC and Noise reduction are unactivated"

[edit] GSM Modem Openmoko commands

The Ti calypso GSM Modem firmware has been extended by Openmoko specific AT commands. This page documents those commands.

[edit] AT@POFF

Powers off the GSM Modem. No parameters/options.

[edit] AT@ST

configure the sidetone level for voice calls generated inside the GSM Modem. This should normally be off, since the sidetone in GTA01/GTA02 is generated inside the the wolfson audio codec.

AT@ST?
+ST: -5
OK
AT@ST=?
@ST: (-26,-23,-20,-17,-14,-11,-8,-5,-2,1)
OK
AT@ST="-26"
OK

-26 means turn off the sidetone totally.

[edit] AT@AUL

audio table load.

AT@AUL="0"
OK
AT@AUL=?
@AUL:(0)

This audio table is a collection of audio parameters for GSM calibrated by hardware engineers,

Mode of microphone
Gain of microphone
FM PGA gain setting
Bias setting for microphone
FIR coefficients
ANR parameters
Level of side tone
AEC parameters
Echo suppressor
Mode of speaker
Gain of speaker
Extra gain for AUDIO_SPEAKER_HANDSET and AUDIO_SPEAKER_HANDFREE modes
Enable/Disable filter
Enable/Disable high-pass filter
FIR coefficients
IIR uplink/downlink coefficients
Limiter parameters
Level of speaker
Mode of speaker
State of speaker
Sampling frequency
Level of volume 
AGC parameters
DRC parameters

The audio table will be stored in the flash file system within GSM modem, you can load it through this command.

For now, we only provide one configuration, that is "0".

If AT@AUL="0" responds with ERROR, it means there's no audio table existing and the GSM firmware will use default values.

[edit] Wakeup of CPU from GSM Modem

[edit] Problem description

For power management reasons, it is absolutely neccessary that only the minimal required parts of the device are powered at any given time. If you carry your Neo in your pocket, then all it should do is stay online with the GSM network, and notify you in case there's an incoming call/sms (like other phones).

During that time, the Neo1973 Application Processor (s3c24xx) is suspended, i.e. not powered at all. The SDRAM is in self-refresh mode.

In this suspend mode (which Samsung calls by the funny name of POWER_OFF), the processor is not able to receive any data from the GSM Modem. Nor is it able to detect incoming characters and wake up the CPU. The only wake up sources are a certain set of external interrupts (EINT).

Thus, the GSM Modem GPIO line IO1 was connected with the Samsung EINT1, and the GSM Modem firmware contains some special logic to generate an interrupt (and thus wake-up event) to the CPU.

[edit] Logic for problem solution

Preconditions

  1. The default state of GSM Modem output IO1 is logical LOW.

Anytime the modem has pending data on the MODEM-UART channel, it

  1. checks if CTS_MODEM permits sending of data
    1. if CTS_MODEM permits sending of UART data, go to '4.2'
  2. [implicit: CTS_MODEM does not permit sending of UART data]
    1. set IO1 line to logical HIGH level
    2. buffer modem data [until buffer is full, after which data gets discarded]
  3. wait until CTS_MODEM permits sending of UART data
  4. as soon as CTS_MODEM permits sending of UART data,
    1. set IO1 back to logical LOW level
    2. start sending of UART data
  5. once all data is transmitted, return to idle state. When next data item is to be transmitted, start again from '1'

[edit] Software implementation

NOTE: This is the plan, it has not been fully implemented yet


  1. a firmware post may-16-2007 needs to be present in the gsm modem. This is true for all phones bought during phase 1 in the online shop. However, I currently don't really know what firmware version was present in the GTA01Bv4 that we sent to phase 0.
  2. the suspend code probably still needs to correctly configure the RTS/CTS lines (i.e. put them in GPIO mode, and set them to their desired "don't send any more characters" level)

So in this case, any data from the GSM modem will wake up the cpu for processing of that data. The GSM modem has some internal buffer (I don't know how big right now) that should be sufficient for buffering the data until the CPU is alive.

This also means that gsmd will eventually have to re-program the GSM modem to make sure only relevant unsolicited response codes are sent during suspend. You usually don't want a signal level change to cause a CPU wake up, only things like incoming message / call.

Upgrading the modem's firmware is technically possible but no proper software is currently legally available to users outside Openmoko staff. [edit jOERG 2009-04-02] There's FLUID software and GSM-FW-images as well as a uSD-image for automatic update (this GTA02 for now) now. See GSM/Flashing

[edit] Power On, Power Off, and Reset of the GTA01 GSM Modem

[edit] GSM Modem Connections

The GTA01 GSM modem communicates via a standard serial port to the host system. The port operates at 115200 baud, 8 bits, no parity, and requires hardware flow control (RTSCTS) to operate. Due to the fact that the host CPU has only a pair of serial ports but there are three devices that wish to use them, the GSM modem port is actually shared with the serial console (the third device is the GPS chip, which has exclusive use of the second serial port).

A GPIO (General Purpose IO) pin controls the switching of the serial port between the console and the GSM modem. Another GPIO is used to turn on the power to the GSM modem. On older versions of the GTA01 a third GPIO could be used to reset the GSM modem; this signal proved to cause difficulties with the modem, and on all the GTA01 units sold this GPIO line is not connected. The driver combines the the switching of the serial port to the GSM modem and the power-on signal to the modem into a single operation; the two cannot be controlled independently from user-space (at the time of this writing).

It is important to note that the GPIO controlling the power-on of the GSM modem can only signal to the modem to turn itself on -- turning this GPIO off does not power off the GSM modem. Instead, the AT@POFF sequence must be sent to the modem in order to perform a power off.

Further complicating power control of the GTA01 GSM modem is the fact that the modem draws power from the battery/charger side of the power management circuitry -- this means that turning off the power to the host CPU on the GTA01 does not turn off the power to the modem. In real-world operation, this means that unless the shutdown procedure for the host cpu's operating system issues the AT@POFF command to power off the GSM modem, the modem will remain turned on, drawing power from the battery even thought the host CPU is completely powered off.

[edit] The Power-On Sequence

The sharing of the serial port between the console and the GSM modem results in the need for a very specific power-on and power-off sequence. Two major problems exist that must be avoided: infinite echos, and RTSCTS lockup.

[edit] Avoiding Infinite Echos

By default, the serial port is initialized in "echo" mode -- meaning that any characters sent to the serial port from the console will be echoed back to the console. Upon power-up or reset, the GSM modem also echos back characters it receives. So unless action is taken to disable the serial port's echo before the GSM modem is powered on, an infinite echo will result. The modem will print the standard "Interpretor Ready" message, which will be echoed back to it by the serial port driver, the modem will echo that back to the serial port again (adding some error text to the message), the serial port will echo that again, and this continues until buffers in either or both the serial port and the modem fill up, and one of them ceases to transmit.

Once in this situation, it is difficult for software (such as gsmd) to gain synchronization of commands and responses.

The best solution is to avoid the problem to begin with. Simply ensure that the serial port is set to "no-echo" mode before the GSM modem is enabled and powered up. This sequence illustrates how this is normally done:

stty -F /dev/ttySAC0 -echo
echo "1" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on

(Note that the stty command argument syntax is somewhat unusual: "-echo" means "disable echo", while "echo" means "enable echo".)

[edit] Avoiding RTSCTS Lockup

Hardware flow control uses additional signals in addition to the serial data in and out signals on the serial port to control the flow of the data. Specifically, when hardware flow control is enabled, a given endpoint is expected to assert its RTS (Request To Send) line when it has data to transmit, and not transit that data until it sees a CTS (Clear TO Send) signal from the other end. In this fashion, buffer overruns and data loss are avoided.

The GSM modem requires that hardware flow control be enabled in order to communicate with the host. However, the console lacks the RTS and CTS signals and thus is unable to communicate if hardware flow control is enabled. But what really makes this problem serious is that if hardware flow control is enabled while the serial port is switched to the console, and the (small) transmit buffer for the port fills (such as a kernel log message), the Linux kernel will lock up, and become completely non-responsive. There is no recovery mechanism for this other than to disconnect the device from its USB port or charger, and remove the battery.

One solution to this is to disable the use of the serial port as a console for the kernel. However, this is greatly inconvenient - the knowledgeable user with a debug board will usually wish to have a console available, and the novice user will probably wish to avoid changing the u-boot variables in order to disable the console. So, a better approach is to avoid this situation by taking great care when powering-up, resetting, or powering-down the modem. The following sequence illustrates how to switch the serial port back to the console mode safely:

stty -F /dev/ttySAC0 -crtscts
echo "0" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on

[edit] Resetting the GSM Modem

The GSM modem can be effectively reset by changing the state of the Power-On GPIO from off to on -- in other words, just disable the GSM modem and re-enable it. The safe way to accomplish this is to combine the two sequences above:

stty -F /dev/ttySAC0 -crtscts
echo "0" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
stty -F /dev/ttySAC0 -echo
echo "1" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on

It should be noted that this reset sequence will also power up the modem if it is not enabled and powered up to begin with. For this reason, the reset sequence above should be used for both power-up and reset purposes.

[edit] Powering Off the GSM Modem

Powering off the GSM modem on the GTA01 can only be done by issuing the AT@POFF command to the device. In order to issue this command, it is usually necessary to return it to a known state. So the normal mechanism is to issue the reset operation (above), wait for a short period of time (1 second seems to be sufficient), and send the AT@POFF command. This should be followed by an additional short delay (to allow the text to be transmitted), and then the serial port can be switched back to the console. The following script accomplishes this:

### Reset the modem to place it in a known state
stty -F /dev/ttySAC0 -crtscts
echo "0" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
stty -F /dev/ttySAC0 -echo
echo "1" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on

### Now enable hardware flow control, and transmit the sequence
stty -F /dev/ttySAC0 crtscts
sleep 1
echo -e "AT@POFF\r" >/dev/ttySAC0
sleep 1

### Finally, we disable flow control, and switch back the port
stty -F /dev/ttySAC0 -crtscts
echo "0" >/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on

You probably actually want the GSM modem to turn off automatically when you power down the Neo. Right now, there is no functionality available from the modem while the Neo is powered off, so it's just a waste of power. See GSMPowerDownInitScript.

[edit] Eliminating echo on the non-neo end (far end) of phone calls

Issue appropriate AT%Nxxxx command to enable AEC (Echo Cancellation) in calypso. Has to be done per-call as it's not "sticky" (=after modem-powerup/init and after every call). Recent GSM-handling-daemons (as of Apr 2009) tend to finally implement this function.

This echo issue isn't considered to be fixable for good by modifying mixer-settings, as you always get a tradeoff resulting in either low earpiece volume or poor mic-sensitivity.

[edit] See also

Personal tools

This page is about the Neo1973 GTA01 (and GTA02) GSM Modem, based on the Ti Calypso chipset.

AT command interface

Sending Commands

To send commands to the GSM modem, you may use cu -l /dev/ttySAC0 or use gsmd and libgsmd-tool for a less direct method.

If you connect directly (via cu) you must `chown uucp.uucp /dev/ttySAC0` first since cu is picky about permissions.

libgsmd-tool is less functional than the direct raw connection to the modem.

Note: If you use cu -l /dev/ttySAC0 to enter commands, type "~." to quit

Standard AT commands

The GSM modem follows GSM TS07.05, 07.07 and 07.10 very closely.

FIXME: Describe how those documents can be obtained.

TI proprietary AT commands

there are a few of them, but none of them are really required for regular operation of the device. Due to NDA issues, OpenMoko cannot provide a reference documentation to those commands. Using the standards-compliant AT+CLAC, you will notice that the non-standard commands also show up in the command listing.

You will also notice that those non-standard commands are prefixed with AT% rather than AT+ for the standards-compliant commands.

Thus, we welcome our user and developer community to play with those commands and document them here. Since we never have released any NDA documentation to our community, there is no legal issue.

Note that the syntax and the interpretation of the output of the commands listed here are only educated guesses and should not be relied on. Part of the proprietary command set has identical or similar usage as on other modems in the market, some of which have fully opened specifications and information about these commands can be taken from their datasheets (some known similar modems with open specs: BenQ M22A and M23A, Enfora Enabler-G II/III and SPT 1834).

AT%VER

Prints the firmware component versions.

The modem's response looks like this on an un-updated phase-0 GTA01Bv4 phone:

%VER: aci sean non_clearcase   15:11:24 17/04/07
%VER: cc a086 ** NONE **      10:16:39 28/03/07
%VER: dl a086 ** NONE **      10:17:34 28/03/07
%VER: mm a086 ** NONE **      10:23:09 28/03/07
%VER: rr a086 ** NONE **      10:25:37 28/03/07
%VER: sim a086 ** NONE **      10:26:45 28/03/07
%VER: sms a086 ** NONE **      10:27:21 28/03/07
%VER: ss a086 ** NONE **      10:28:52 28/03/07
%VER: alr a086 ** NONE **      10:15:48 28/03/07
%VER: l2r a086 ** NONE **      10:21:37 28/03/07
%VER: ra a086 ** NONE **      10:25:01 28/03/07
%VER: rlp a086 ** NONE **      10:25:12 28/03/07
%VER: fad a086 ** NONE **      10:18:09 28/03/07
%VER: t30 a086 ** NONE **      10:29:01 28/03/07

For a GTA01Bv4 phase 1 phone, produced start of september:

%VER: aci sean non_clearcase   12:32:56 24/08/07
%VER: cc a086 ** NONE **      14:07:10 08/06/07
%VER: dl a086 ** NONE **      14:07:46 08/06/07
%VER: mm a086 ** NONE **      14:11:52 08/06/07
%VER: rr a086 ** NONE **      14:13:01 08/06/07
%VER: sim a086 ** NONE **      14:13:54 08/06/07
%VER: sms a086 ** NONE **      14:14:20 08/06/07
%VER: ss a086 ** NONE **      14:15:52 08/06/07
%VER: alr a086 ** NONE **      14:06:38 08/06/07
%VER: l2r a086 ** NONE **      14:10:36 08/06/07
%VER: ra a086 ** NONE **      14:12:32 08/06/07
%VER: rlp a086 ** NONE **      14:12:40 08/06/07
%VER: fad a086 ** NONE **      14:08:06 08/06/07

For a GTA01Bv3 phase 0 phone:

%VER: aci sean non_clearcase   10:46:06 29/08/06
%VER: cc a086 non_clearcase   14:53:59 28/08/06
%VER: dl a086 non_clearcase   14:54:40 28/08/06
%VER: mm a086 non_clearcase   14:59:25 28/08/06
%VER: rr a086 non_clearcase   15:00:11 28/08/06
%VER: sim a086 non_clearcase   15:00:57 28/08/06
%VER: sms a086 non_clearcase   15:01:23 28/08/06
%VER: ss a086 non_clearcase   15:02:22 28/08/06
%VER: alr a086 non_clearcase   14:53:19 28/08/06
%VER: l2r a086 non_clearcase   14:58:02 28/08/06
%VER: ra a086 non_clearcase   14:59:50 28/08/06
%VER: rlp a086 non_clearcase   14:59:56 28/08/06
%VER: fad a086 non_clearcase   14:55:04 28/08/06
%VER: t30 a086 non_clearcase   15:02:27 28/08/06

The second column lists firmware component names (e.g. aci = AT Command Interface). The third column is the user name of the engineer who last modified given component. The rightmost column is probably the last time someone worked on it (Please note that the name 'sean' here is not Sean Moss-Pultz :) while a086 is an anonymous TI engineer's nick, meaning that the component has not been modified at FIC).

AT%A

Print values from an ADC.

This command is not listed in AT+CLAC output but it is triggered by any input that starts with AT%A except AT%ALS (Alternative Line Service) and AT%ATR, which are other proprietary AT commands. So for example AT%ABCD,HELLO will also run this commands. On my Neo modem it prints a line containing nine values of the form ADC <number> = <value>:

AT%A
EXT: I
ADC 0 = e19, ADC 1 = 0, ADC 2 = d, ADC 3 = 6ea, ADC 4 = a25, ADC 5 = 9fc, ADC 6 = 96d, ADC 7 = 0, ADC 8 = 6

It would seem there's an ADC (analog-to-digital converter) module in the modem with nine input lines connected to it and the values on these lines are reported by this command in hexadecimal format. The values change over time. Inputs 1 and 7 always show zero on my modem, input 1 value changes slightly (+/- 20), while values on inputs 3, 4, 5, 6 and 8 change seemingly randomly in the range 0x000 - 0xfff (it would seem the chip is 12-bit).

AT%NRG

The AT%NRG (Network registration and service selection) is an expansion of the AT+COPS command. It allows specifying the service state of the registration, in addition to AT+COPS functionality. It doesn't however allow listing all present operators (use AT+COPS for this).

AT%EM

Execution of Engineering Mode commands. Allows viewing the information accessible to the modem but not available through standard GSM AT commands set such as detailed information on the current Serving Cell (the one we're registered with), its neighbouring cells, the GPRS/EDGE availability and SIM card data.

Citing Enfora Inc. Application Note EDG0108TN01: The purpose of Engineering Mode (EM) is to provide means to observe the behavior of the mobile station and the settings of the network as counterpart and therefore defines a lot of possibilities to analyze the network. The EM can be used for observation of a defined data set during functional test and field test.

Warning: The display of certain parameters is dependent on the wireless network sending the correct information in the System Information Packets. There is no guaranty that the information is always forwarded from the network. At times data may not be present to display in the Engineering Mode responses.

Syntax:

AT%EM=<mode>,<command>

Allowed <mode> values:

  • 2 - AT command mode
  • 3 - PCO mode

I only describe the AT mode commands here. Commands are in range 1 to 13:

AT%EM=2,1  Serving Cell Information
AT%EM=2,2  Serving Cell GPRS Information
AT%EM=2,3  Neighbour Cell Information
AT%EM=2,4  Location and Paging Parameters
AT%EM=2,5  PLMN Parameters
AT%EM=2,6  Ciphering, Hopping, DTX Parameters
AT%EM=2,7  Power Parameters
AT%EM=2,8  Identity Parameters
AT%EM=2,9  Firmware components versions
AT%EM=2,10 GMM Information
AT%EM=2,11 GRLC Information
AT%EM=2,12 AMR Configuration Information
AT%EM=2,13 PDP Information
Serving Cell Information (2,1)

Response format:

%EM: <afrcn>,<c1>,<c2>,<rxlev>,<bsic>,<cell_id>,<dsc>,<txlev>,<tn>,<rlt>,<tav>,<rxlev_f>,<rxlev_s>,<rxqual_f>,<rxqual_s>,<lac>,<cba>,<cbq>,<cell_type_ind>,<vocoder>
Parameter no. Name Meaning Remarks
1 arfcn Current Channel Number
2 c1 Path Loss Criterion C1
3 c2 Cell-reselection Criterion C2
4 rxlev Received Field Strength (rxlev/2)+2 gives the AT+CSQ response value
5 bsic Base Station ID Code
6 cell_id Cell Indentifier
7 dsc Downlink Signaling Counter current counter value
8 txlev Transmit Power Level
9 tn Timeslot Number
10 rlt Radio Link Timeout Counter
11 tav Timing Advance
12 rxlev_f Received Field Strength full
13 rxlev_s Received Field Strength sub
14 rxqual_f Received Quality full
15 rxqual_s Received Quality sub
16 lac Location Area Code
17 cba Cell Bar Access
18 cbq Cell Bar Qualifier
19 Cell_type_ind Cell Type Indicator NA/GSM/GPRS
20 vocoder Vocoder Sig/speech/efr/amr/14.4/9.6/4.8/2.4
Serving Cell GPRS Information (2,2)

Response format:

%EM: <nts>,<nmo>,<spgc_ccch_sup>,<priority_access_thr>,<cba>,<rac>,<tav>,<dsc>,<c31>,<c32>,<band_ind>,<pfc_supp_n_w>,<ccn_mode_sts>,<Psi_sts_suppt>,<edge_support>,<epcr_support>,<bep_period>,<bss_paging_coord>
Parameter no. Name Meaning Remarks
1 nts PCCCH_TIMESLOT Number of downlink timeslots
2 nmo Network Mode of Operation
3 spgc_ccch_sup Network Control-spgc_ccch_sup Network support for split paging
4 priority_access_thr Network Control-Priority_Access_Threshold packet access to the NW according to priority level
5 cba Cell Bar Access
6 rac Routing Area Code
7 tav Timing Advance
8 dsc Downlink Signal Counter
9 c31 Cell-reselect Criterion C31
10 c32 Cell-reselect Criterion C32
11 band_ind Band Indicator
12 pfc_supp_n_w PFC Support
13 ccn_mode_sts CCN Mode
14 Psi_sts_suppt PSI Support
15 edge_support EDGE Support
16 epcr_support EPCR Support
17 bep_period BEP Period
18 bss_paging_coord BSS Paging
Neighbour Cell Information (2,3)

The first line of response is of the format %EM: <number of cells listed>, where the maximum seems to be 6, one cell for each channel. The next sixteen lines list the values of each of the parameters for each of the cells.

Parameter no. Short name Meaning Remarks
1 arfcn BCCH channel
2 c1 Path Loss Criterion C1
3 c2 Cell-reselection Criterion C2
4 rxlev Received Field Strength (rxlev/2)+2 gives the AT+CSQ response value
5 bsic Base Station ID Code
6 cell_id Cell Indentity
7 lac Location Area Code
8 frame_offset Frame Offset
9 time_alignmnt Time Alignment
10 cba Cell Bar Access
11 cbq Cell Bar Qualifier
12 cell_type_ind Cell Type Indicator NA/GSM/GPRS
13 rac Routing Area Code
14 cell_resel_offset Cell-reselection Offset
15 temp_offset Temporary Offset
16 rxlev_acc_min Rxlen access min

My Neo1973 reports:

AT%EM=2,3
%EM: 6
763,766,771,778,780,773
20,8,14,18,17,8
20,8,14,18,17,8
73,46,54,51,13,12
6753,10951,3531,0,1933,1924
100,100,300,300,300,100
80229,961995,0,1166923,0,2715553
3504,724,0,3724,4,1112
0,0,0,0,0,0
0,0,0,0,0,0
2,2,2,2,2,2
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
10,10,10,10,10,10

OK
Location and Paging Parameters (2,4)

Response format:

%EM: <bs_pa_mfrms>,<t3212>,<mcc[0]><mcc[1]><mcc[2]>,<mnc[0]><mnc[1]><mnc[2]>,<tmsi>
Parameter no. Name Meaning
1 bs_pa_mfrms BS PA MFRMS paging repeat period
2 t3212 Periodic location updating interval
3 mcc Mobile Country Code
4 mnc Mobile Network Code
5 tmsi Temporary Mobile Subscriber Identity (in binary)

The MCC and MNC values are the same values that are used to form the Mobile Operator names used by the standard AT+COPS and AT+COPN commands in numeric format. The TMSI is the same number that AT%EM=2,8 gives, just in a different format.

PLMN Parameters (2,5)

Response format:

%EM: <no_creq_max>,<reest_flag>,<txpwr_max>,<rxlev_min>,<rel_cs>,<sgsnr_rel>,<mscr_rel>,<net_rel>
Parameter no. Name Meaning
1 no_creq_max Max. number or retries for channel requests
2 reest_flag Re-establishment Flag
3 txpwr_max MS TXPWR MAX CCCH
4 rxlev_min Rxlev_access_min
5 rel_cs Release Cause (only the last release cause is remembered)
6 sgsnr_rel SGSNR Release
7 mscr_rel MSCR Release
8 net_rel Network Release Info
Ciphering, Hopping, DTX Parameters (2,6)
TODO: Fill in (See: To-Do List)
Power Parameters (2,7)

The output consits of two lines, first line containing 12 comma-separated values and the second line 18 comma-separated values, such as:

AT%EM=2,7
%EM: 1,1,0,0,0,1,1,0,0,0,1,0
6,0,0,0,0,1,1,1,4,0,0,0,0,1,0,0,0,0

OK

On the first line (called Classmark 2) we have:

Value no. Meaning Remarks
1 Revision Level
2 Controlled Early Classmark Sending 1 means enabled
3 A5/1 Encryption algorithm 0 means available
4 RF Power capability
5 Pseudo-synchronisation capability 1 means present
6 SS Screening Indicator
7 SMS capability
8 Frequency capability
9 Classmark 3 options 1 means supported
10 CM Service Prompt 1 means supported
11 A5/3 Encryption algorithm 1 means available
12 A5/2 Encryption algorithm 1 means available

On the second line (called Classmark 3) we have:

Value no. Meaning Remarks
1 Multiband support
2 A5/7 Encryption algorithm 1 means available
3 A5/6 Encryption algorithm 1 means available
4 A5/5 Encryption algorithm 1 means available
5 A5/4 Encryption algorithm 1 means available
6 Valid Radio capability 2  ??
7 Associated Radio capability 2
8 Valid Radio capability 1  ??
9 Associated Radio capability 1
10 Valid R Support  ??
11 R Support R-GSM Class
12 Valid Multi-slot Class  ??
13 Multi-slot Class
14 Unicode 2 treatment
15 Extended Measurement capability 1 means supported
16 Valid Switch-measure-value  ??
17 Switch-measure-value
18 Switch-measure-switch-value
Identity Parameters (2,8)

Response format:

%EM: <imeisv>
<imsi>
<tmsi>

OK

The IMEISV line contains 20 numbers separated by commas, the numbers on positions 5 to 18 are the digits of the IMEI number as returned by AT+CGSN. The second line contains another 20 numbers and the numbers on positions 5 to 19 form the digits of your SIM card's IMSI number, as returned by the AT+CIMI command. The last line contains the Temporary Mobile Subscriber Identity number in plain format (ten digits).

Firmware components versions (2,9)

Prints version information for different components of the modem's firmware. The format and the scope of the information presented is identical to that in AT%VER output with the exception that only a subset of all of the components are listed:

AT%EM=2,9
%VER: alr a086 ** NONE **      10:15:48 28/03/07
%VER: dl a086 ** NONE **      10:17:34 28/03/07
%VER: rr a086 ** NONE **      10:25:37 28/03/07
%VER: mm a086 ** NONE **      10:23:09 28/03/07
%VER: cc a086 ** NONE **      10:16:39 28/03/07
%VER: ss a086 ** NONE **      10:28:52 28/03/07
%VER: sim a086 ** NONE **      10:26:45 28/03/07
%VER: sms a086 ** NONE **      10:27:21 28/03/07

OK
GMM Information (2,10)
TODO: Fill in (See: To-Do List)
GRLC Information (2,11)
TODO: Fill in (See: To-Do List)
AMR Configuration Information (2,12)
TODO: Fill in (See: To-Do List)
PDP Information (2,13)
TODO: Fill in (See: To-Do List)

GSM Modem OpenMoko commands

The Ti calypso GSM Modem firmware has been extended by OpenMoko specific AT commands. This page documents those commands.

AT@POFF

Powers off the GSM Modem. No parameters/options.

AT@ST

configure the sidetone level for voice calls generated inside the GSM Modem. This should normally be off, since the sidetone in GTA01/GTA02 is generated inside the the wolfson audio codec.

AT@ST?
+ST: -5
OK
AT@ST=?
@ST: (-26,-23,-20,-17,-14,-11,-8,-5,-2,1)
OK
AT@ST="-26"
OK

-26 means turn off the sidetone totally.

AT@AUL

audio table load.

AT@AUL="0"
OK
AT@AUL=?
@AUL:(0)

This audio table is a collection of audio parameters for GSM calibrated by hardware engineers,

Mode of microphone
Gain of microphone
FM PGA gain setting
Bias setting for microphone
FIR coefficients
ANR parameters
Level of side tone
AEC parameters
Echo suppressor
Mode of speaker
Gain of speaker
Extra gain for AUDIO_SPEAKER_HANDSET and AUDIO_SPEAKER_HANDFREE modes
Enable/Disable filter
Enable/Disable high-pass filter
FIR coefficients
IIR uplink/downlink coefficients
Limiter parameters
Level of speaker
Mode of speaker
State of speaker
Sampling frequency
Level of volume 
AGC parameters
DRC parameters

The audio table will be stored in the flash file system within GSM modem, you can load it through this command.

For now, we only provide one configuration, that is "0".

If AT@AUL="0" responds with ERROR, it means there's no audio table existing and the GSM firmware will use default values.

Wakeup of CPU from GSM Modem

Problem description

For power management reasons, it is absolutely neccessary that only the minimal required parts of the device are powered at any given time. If you carry your Neo in your pocket, then all it should do is stay online with the GSM network, and notify you in case there's an incoming call/sms (like other phones).

During that time, the Neo1973 Application Processor (s3c24xx) is suspended, i.e. not powered at all. The SDRAM is in self-refresh mode.

In this suspend mode (which Samsung calls by the funny name of POWER_OFF), the processor is not able to receive any data from the GSM Modem. Nor is it able to detect incoming characters and wake up the CPU. The only wake up sources are a certain set of external interrupts (EINT).

Thus, the GSM Modem GPIO line IO1 was connected with the Samsung EINT1, and the GSM Modem firmware contains some special logic to generate an interrupt (and thus wake-up event) to the CPU.

Logic for problem solution

Preconditions

  1. The default state of GSM Modem output IO1 is logical LOW.

Anytime the modem has pending data on the MODEM-UART channel, it

  1. checks if CTS_MODEM permits sending of data
    1. if CTS_MODEM permits sending of UART data, go to '4.2'
  2. [implicit: CTS_MODEM does not permit sending of UART data]
    1. set IO1 line to logical HIGH level
    2. buffer modem data [until buffer is full, after which data gets discarded]
  3. wait until CTS_MODEM permits sending of UART data
  4. as soon as CTS_MODEM permits sending of UART data,
    1. set IO1 back to logical LOW level
    2. start sending of UART data
  5. once all data is transmitted, return to idle state. When next data item is to be transmitted, start again from '1'

Software implementation

NOTE: This is the plan, it has not been fully implemented yet


  1. a firmware post may-16-2007 needs to be present in the gsm modem. This is true for all phones bought during phase 1 in the online shop. However, I currently don't really know what firmware version was present in the GTA01Bv4 that we sent to phase 0.
  2. the suspend code probably still needs to correctly configure the RTS/CTS lines (i.e. put them in GPIO mode, and set them to their desired "don't send any more characters" level)

So in this case, any data from the GSM modem will wake up the cpu for processing of that data. The GSM modem has some internal buffer (I don't know how big right now) that should be sufficient for buffering the data until the CPU is alive.

This also means that gsmd will eventually have to re-program the GSM modem to make sure only relevant unsolicited response codes are sent during suspend. You usually don't want a signal level change to cause a CPU wake up, only things like incoming message / call.

Upgrading the modem's firmware is technically possible but no proper software is currently legally available to users outside OpenMoko staff.

Power On, Power Off, and Reset of the GTA01 GSM Modem

GSM Modem Connections

The GTA01 GSM modem communicates via a standard serial port to the host system. The port operates at 115200 baud, 8 bits, no parity, and requires hardware flow control (RTSCTS) to operate. Due to the fact that the host CPU has only a pair of serial ports but there are three devices that wish to use them, the GSM modem port is actually shared with the serial console (the third device is the GPS chip, which has exclusive use of the second serial port).

A GPIO (General Purpose IO) pin controls the switching of the serial port between the console and the GSM modem. Another GPIO is used to turn on the power to the GSM modem. On older versions of the GTA01 a third GPIO could be used to reset the GSM modem; this signal proved to cause difficulties with the modem, and on all the GTA01 units sold this GPIO line is not connected. The driver combines the the switching of the serial port to the GSM modem and the power-on signal to the modem into a single operation; the two cannot be controlled independently from user-space (at the time of this writing).

It is important to note that the GPIO controlling the power-on of the GSM modem can only signal to the modem to turn itself on -- turning this GPIO off does not power off the GSM modem. Instead, the AT@POFF sequence must be sent to the modem in order to perform a power off.

Further complicating power control of the GTA01 GSM modem is the fact that the modem draws power from the battery/charger side of the power management circuitry -- this means that turning off the power to the host CPU on the GTA01 does not turn off the power to the modem. In real-world operation, this means that unless the shutdown procedure for the host cpu's operating system issues the AT@POFF command to power off the GSM modem, the modem will remain turned on, drawing power from the battery even thought the host CPU is completely powered off.

The Power-On Sequence

The sharing of the serial port between the console and the GSM modem results in the need for a very specific power-on and power-off sequence. Two major problems exist that must be avoided: infinite echos, and RTSCTS lockup.

Avoiding Infinite Echos

By default, the serial port is initialized in "echo" mode -- meaning that any characters sent to the serial port from the console will be echoed back to the console. Upon power-up or reset, the GSM modem also echos back characters it receives. So unless action is taken to disable the serial port's echo before the GSM modem is powered on, an infinite echo will result. The modem will print the standard "Interpretor Ready" message, which will be echoed back to it by the serial port driver, the modem will echo that back to the serial port again (adding some error text to the message), the serial port will echo that again, and this continues until buffers in either or both the serial port and the modem fill up, and one of them ceases to transmit.

Once in this situation, it is difficult for software (such as gsmd) to gain synchronization of commands and responses.

The best solution is to avoid the problem to begin with. Simply ensure that the serial port is set to "no-echo" mode before the GSM modem is enabled and powered up. This sequence illustrates how this is normally done:

stty -F /dev/ttySAC0 -echo
echo "1" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on

(Note that the stty command argument syntax is somewhat unusual: "-echo" means "disable echo", while "echo" means "enable echo".)

Avoiding RTSCTS Lockup

Hardware flow control uses additional signals in addition to the serial data in and out signals on the serial port to control the flow of the data. Specifically, when hardware flow control is enabled, a given endpoint is expected to assert its RTS (Request To Send) line when it has data to transmit, and not transit that data until it sees a CTS (Clear TO Send) signal from the other end. In this fashion, buffer overruns and data loss are avoided.

The GSM modem requires that hardware flow control be enabled in order to communicate with the host. However, the console lacks the RTS and CTS signals and thus is unable to communicate if hardware flow control is enabled. But what really makes this problem serious is that if hardware flow control is enabled while the serial port is switched to the console, and the (small) transmit buffer for the port fills (such as a kernel log message), the Linux kernel will lock up, and become completely non-responsive. There is no recovery mechanism for this other than to disconnect the device from its USB port or charger, and remove the battery.

One solution to this is to disable the use of the serial port as a console for the kernel. However, this is greatly inconvenient - the knowledgeable user with a debug board will usually wish to have a console available, and the novice user will probably wish to avoid changing the u-boot variables in order to disable the console. So, a better approach is to avoid this situation by taking great care when powering-up, resetting, or powering-down the modem. The following sequence illustrates how to switch the serial port back to the console mode safely:

stty -F /dev/ttySAC0 -crtscts
echo "0" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on

Resetting the GSM Modem

The GSM modem can be effectively reset by changing the state of the Power-On GPIO from off to on -- in other words, just disable the GSM modem and re-enable it. The safe way to accomplish this is to combine the two sequences above:

stty -F /dev/ttySAC0 -crtscts
echo "0" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
stty -F /dev/ttySAC0 -echo
echo "1" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on

It should be noted that this reset sequence will also power up the modem if it is not enabled and powered up to begin with. For this reason, the reset sequence above should be used for both power-up and reset purposes.

Powering Off the GSM Modem

Powering off the GSM modem on the GTA01 can only be done by issuing the AT@POFF command to the device. In order to issue this command, it is usually necessary to return it to a known state. So the normal mechanism is to issue the reset operation (above), wait for a short period of time (1 second seems to be sufficient), and send the AT@POFF command. This should be followed by an additional short delay (to allow the text to be transmitted), and then the serial port can be switched back to the console. The following script accomplishes this:

### Reset the modem to place it in a known state
stty -F /dev/ttySAC0 -crtscts
echo "0" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on
stty -F /dev/ttySAC0 -echo
echo "1" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on

### Now enable hardware flow control, and transmit the sequence
stty -F /dev/ttySAC0 crtscts
sleep 1
echo -e "AT@POFF\r" >/dev/ttySAC0
sleep 1

### Finally, we disable flow control, and switch back the port
stty -F /dev/ttySAC0 -crtscts
echo "0" >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on

Eliminating echo on the non-neo end of phone calls

Here is the modified /etc/gsmhandset.state that eliminates echo during calls (at least for User:Wurp):

state.neo1973 {
	control.1 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 255'
		iface MIXER
		name 'PCM Volume'
		value.0 230
		value.1 230
	}
	control.2 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 255'
		iface MIXER
		name 'ADC Capture Volume'
		value.0 195
		value.1 195
	}
	control.3 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 127'
		iface MIXER
		name 'Headphone Playback Volume'
		value.0 127
		value.1 127
	}
	control.4 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 127'
		iface MIXER
		name 'Speaker Playback Volume'
		value.0 121
		value.1 121
	}
	control.5 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 127'
		iface MIXER
		name 'Mono Playback Volume'
		value 121
	}
	control.6 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 7'
		iface MIXER
		name 'Bypass Playback Volume'
		value.0 2
		value.1 2
	}
	control.7 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 7'
		iface MIXER
		name 'Sidetone Playback Volume'
		value.0 2
		value.1 2
	}
	control.8 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 7'
		iface MIXER
		name 'Voice Playback Volume'
		value.0 2
		value.1 2
	}
	control.9 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Headphone Playback ZC Switch'
		value.0 false
		value.1 false
	}
	control.10 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Speaker Playback ZC Switch'
		value.0 false
		value.1 false
	}
	control.11 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 7'
		iface MIXER
		name 'Mono Bypass Playback Volume'
		value 2
	}
	control.12 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 7'
		iface MIXER
		name 'Mono Sidetone Playback Volume'
		value 2
	}
	control.13 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 7'
		iface MIXER
		name 'Mono Voice Playback Volume'
		value 2
	}
	control.14 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Mono Playback ZC Switch'
		value false
	}
	control.15 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Linear Control'
		comment.item.1 'Adaptive Boost'
		iface MIXER
		name 'Bass Boost'
		value 'Linear Control'
	}
	control.16 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 '130Hz @ 48kHz'
		comment.item.1 '200Hz @ 48kHz'
		comment.item.2 '100Hz @ 16kHz'
		comment.item.3 '400Hz @ 48kHz'
		comment.item.4 '100Hz @ 8kHz'
		comment.item.5 '200Hz @ 8kHz'
		iface MIXER
		name 'Bass Filter'
		value '130Hz @ 48kHz'
	}
	control.17 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		iface MIXER
		name 'Bass Volume'
		value 0
	}
	control.18 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		iface MIXER
		name 'Treble Volume'
		value 7
	}
	control.19 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 '8kHz'
		comment.item.1 '4kHz'
		iface MIXER
		name 'Treble Cut-off'
		value '8kHz'
	}
	control.20 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 7'
		iface MIXER
		name 'Sidetone Capture Volume'
		value.0 2
		value.1 2
	}
	control.21 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 7'
		iface MIXER
		name 'Voice Sidetone Capture Volume'
		value 2
	}
	control.22 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 63'
		iface MIXER
		name 'Capture Volume'
		value.0 23
		value.1 23
	}
	control.23 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Capture ZC Switch'
		value.0 false
		value.1 false
	}
	control.24 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Capture Switch'
		value.0 false
		value.1 false
	}
	control.25 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 '3.4Hz @ 48kHz'
		comment.item.1 '82Hz @ 16k'
		comment.item.2 '82Hz @ 8kHz'
		comment.item.3 '170Hz @ 8kHz'
		iface MIXER
		name 'Capture Filter Select'
		value '3.4Hz @ 48kHz'
	}
	control.26 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 HiFi
		comment.item.1 Voice
		iface MIXER
		name 'Capture Filter Cut-off'
		value HiFi
	}
	control.27 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Capture Filter Switch'
		value true
	}
	control.28 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 7'
		iface MIXER
		name 'ALC Capture Target Volume'
		value 3
	}
	control.29 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 7'
		iface MIXER
		name 'ALC Capture Max Volume'
		value 7
	}
	control.30 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Off
		comment.item.1 Right
		comment.item.2 Left
		comment.item.3 Stereo
		iface MIXER
		name 'ALC Capture Function'
		value Off
	}
	control.31 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'ALC Capture ZC Switch'
		value false
	}
	control.32 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		iface MIXER
		name 'ALC Capture Hold Time'
		value 15
	}
	control.33 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		iface MIXER
		name 'ALC Capture Decay Time'
		value 12
	}
	control.34 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		iface MIXER
		name 'ALC Capture Attack Time'
		value 2
	}
	control.35 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'ALC Capture NG Threshold'
		value 0
	}
	control.36 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Constant PGA Gain'
		comment.item.1 'Mute ADC Output'
		iface MIXER
		name 'ALC Capture NG Type'
		value 'Constant PGA Gain'
	}
	control.37 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'ALC Capture NG Switch'
		value false
	}
	control.38 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Capture
		comment.item.1 Playback
		iface MIXER
		name '3D Function'
		value Capture
	}
	control.39 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 '2.2kHz'
		comment.item.1 '1.5kHz'
		iface MIXER
		name '3D Upper Cut-off'
		value '2.2kHz'
	}
	control.40 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 '200Hz'
		comment.item.1 '500Hz'
		iface MIXER
		name '3D Lower Cut-off'
		value '200Hz'
	}
	control.41 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		iface MIXER
		name '3D Volume'
		value 0
	}
	control.42 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name '3D Switch'
		value false
	}
	control.43 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Capture 6dB Attenuate'
		value false
	}
	control.44 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Playback 6dB Attenuate'
		value false
	}
	control.45 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 None
		comment.item.1 '32kHz'
		comment.item.2 '44.1kHz'
		comment.item.3 '48kHz'
		iface MIXER
		name De-emphasis
		value None
	}
	control.46 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Stereo
		comment.item.1 Left
		comment.item.2 Right
		comment.item.3 Mono
		iface MIXER
		name 'Playback Mono Mix'
		value Stereo
	}
	control.47 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Non Inverted'
		comment.item.1 Inverted
		iface MIXER
		name 'Playback Phase'
		value 'Non Inverted'
	}
	control.48 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 3'
		iface MIXER
		name 'Mic2 Capture Volume'
		value 0
	}
	control.49 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 3'
		iface MIXER
		name 'Mic1 Capture Volume'
		value 0
	}
	control.50 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'DAI 0'
		comment.item.1 'DAI 1'
		comment.item.2 'DAI 2'
		comment.item.3 'DAI 3'
		iface MIXER
		name 'DAI Mode'
		value 'DAI 0'
	}
	control.51 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Stereo
		comment.item.1 'Left ADC'
		comment.item.2 'Right ADC'
		comment.item.3 'Channel Swap'
		iface MIXER
		name 'ADC Data Select'
		value Stereo
	}
	control.52 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Mic 1'
		comment.item.1 'Mic 2'
		comment.item.2 'Mic 3'
		iface MIXER
		name 'Mic Selection Mux'
		value 'Mic 1'
	}
	control.53 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'RXP - RXN'
		comment.item.1 'RXP + RXN'
		comment.item.2 RXP
		comment.item.3 RXN
		iface MIXER
		name 'Rx Mixer'
		value 'RXP - RXN'
	}
	control.54 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Line 1 + 2'
		comment.item.1 'Line 1 - 2'
		comment.item.2 'Line 1'
		comment.item.3 'Line 2'
		iface MIXER
		name 'Line Mixer'
		value 'Line 1 + 2'
	}
	control.55 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Line Mix'
		comment.item.1 'Rx Mix'
		iface MIXER
		name 'Line Mono Mux'
		value 'Line Mix'
	}
	control.56 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Line 2'
		comment.item.1 'Rx Mix'
		iface MIXER
		name 'Line Right Mux'
		value 'Line 2'
	}
	control.57 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Line 1'
		comment.item.1 'Rx Mix'
		iface MIXER
		name 'Line Left Mux'
		value 'Line 1'
	}
	control.58 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'ALC Mixer Line Capture Switch'
		value false
	}
	control.59 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'ALC Mixer Mic2 Capture Switch'
		value false
	}
	control.60 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'ALC Mixer Mic1 Capture Switch'
		value false
	}
	control.61 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'ALC Mixer Rx Capture Switch'
		value false
	}
	control.62 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Left PGA'
		comment.item.1 'Mic 1'
		comment.item.2 'Mic 2'
		comment.item.3 'Right PGA'
		iface MIXER
		name 'Mic Sidetone Mux'
		value 'Left PGA'
	}
	control.63 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 PGA
		comment.item.1 'Line or RXP-RXN'
		comment.item.2 Sidetone
		iface MIXER
		name 'Capture Right Mux'
		value PGA
	}
	control.64 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 PGA
		comment.item.1 'Line or RXP-RXN'
		comment.item.2 Line
		iface MIXER
		name 'Capture Left Mux'
		value PGA
	}
	control.65 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Stereo
		comment.item.1 'Analogue Mix Left'
		comment.item.2 'Analogue Mix Right'
		comment.item.3 'Digital Mono Mix'
		iface MIXER
		name 'Capture Right Mixer'
		value Stereo
	}
	control.66 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Stereo
		comment.item.1 'Analogue Mix Left'
		comment.item.2 'Analogue Mix Right'
		comment.item.3 'Digital Mono Mix'
		iface MIXER
		name 'Capture Left Mixer'
		value Stereo
	}
	control.67 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Playback Mixer Voice Capture Sw'
		value false
	}
	control.68 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Playback Mixer Left Capture Swi'
		value false
	}
	control.69 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Playback Mixer Right Capture Sw'
		value false
	}
	control.70 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 VREF
		comment.item.1 'Capture ST'
		comment.item.2 LOUT2
		iface MIXER
		name 'Out4 Mux'
		value VREF
	}
	control.71 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 VREF
		comment.item.1 ROUT2
		comment.item.2 'Left + Right'
		iface MIXER
		name 'Out3 Mux'
		value VREF
	}
	control.72 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 'Inverted Mono 1'
		comment.item.1 Left
		comment.item.2 Right
		comment.item.3 'Left + Right'
		iface MIXER
		name 'Mono 2 Mux'
		value 'Inverted Mono 1'
	}
	control.73 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Mono Mixer Left Playback Switch'
		value false
	}
	control.74 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Mono Mixer Right Playback Switc'
		value false
	}
	control.75 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Mono Mixer Voice Playback Switc'
		value false
	}
	control.76 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Mono Mixer Sidetone Playback Sw'
		value false
	}
	control.77 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Mono Mixer Bypass Playback Swit'
		value false
	}
	control.78 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Right Mixer Voice Playback Swit'
		value false
	}
	control.79 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Right Mixer Sidetone Playback S'
		value false
	}
	control.80 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Right Mixer Right Playback Swit'
		value true
	}
	control.81 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Right Mixer Bypass Playback Swi'
		value false
	}
	control.82 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Left Mixer Voice Playback Switc'
		value false
	}
	control.83 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Left Mixer Sidetone Playback Sw'
		value false
	}
	control.84 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Left Mixer Left Playback Switch'
		value true
	}
	control.85 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Left Mixer Bypass Playback Swit'
		value false
	}
	control.86 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'Amp Left Playback Volume'
		value 22
	}
	control.87 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'Amp Right Playback Volume'
		value 22
	}
	control.88 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'Amp Mono Playback Volume'
		value 0
	}
	control.89 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Off
		comment.item.1 'Call Speaker'
		comment.item.2 'Stereo Speakers'
		comment.item.3 'Stereo Speakers + Headphones'
		comment.item.4 Headphones
		iface MIXER
		name 'Amp Mode'
		value 'Stereo Speakers + Headphones'
	}
	control.90 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Off
		comment.item.1 'GSM Handset'
		comment.item.2 'GSM Headset'
		comment.item.3 'GSM Bluetooth'
		comment.item.4 Speakers
		comment.item.5 Headphones
		comment.item.6 'Capture Handset'
		comment.item.7 'Capture Headset'
		comment.item.8 'Capture Bluetooth'
		iface MIXER
		name 'Neo Mode'
		value Headphones
	}
	control.91 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Amp Spk 3D Playback Switch'
		value false
	}
	control.92 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Amp HP 3d Playback Switch'
		value false
	}
	control.93 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Amp Fast Wakeup Playback Switch'
		value false
	}
	control.94 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Amp Earpiece 6dB Playback Switch'
		value false
	}
}