Phoneserver
From linux-on-sx1
IMPORTANT: Howto develop gsm apps on host using real gsm modem: Turning-the-neo1973-into-an-expensive-external-gsm-modem
configuring usbnet on host - USB_Networking, uncomment the line starting nc in /etc/init.d/rcS in the root filesystem (on MMC)
The base for this server should be Gsmd. Some specific features should be added to it:
- SX1 machine plugin (and siemens vendor plugin) - done,needs testing
- IPC interface to send notifications when information changes - in progress
- Storing current parameters to the SharedMem segment. - in progress
Functions
- Get phone, network, subscriber and battery information
- Get line and call information
- Send notifications, when information changes
- User programs interface is provided with TBUS and libgsmd
IPC
Service - PhoneServer
- For security reasons only two applications - Phone and Messages should have access to control the phoneserver (make calls and send SMS). Current status should be available for all programs.
- GPRS connection start should have a notification to user (or confirmation?).
| Methods | Args fmt | Args | return fmt | Method_return | AT comm | Description |
| Connect | none | Register the application to the gsmd | ||||
| VoiceCall methods | ||||||
| VoiceCall/Dial | "s" | number string | "" | none | ATD | Dial a number |
| VoiceCall/HangUp | "" | "" | ATH | HangUp a call | ||
| VoiceCall/Answer | "" | "" | ATA | Answer an incoming call | ||
| VoiceCall/DTMF | "s" | DTMF characters (0..9, A-F,*,#) | "" | AT+VTS | Send DTMF | |
| VoiceCall/GetStatus | "" | "TODO" | AT+CLCC | List Current Calls | ||
| VoiceCall/Control | "ii" | operataion, call number (id) | "" | CHLD | Call HOLD | |
| VoiceCall/ForwardControl | "iii" | reason, mode, number | "" | CCFC | Call forward control (except mode=2) | |
| VoiceCall/ForwardStatus | "i" | reason | "TODO" | CCFC | mode=2 | |
| PIN methods | ||||||
| PIN/Input | "ss" | oldpin, newpin | "i" | response or error | CPIN= | PIN enter |
| PIN/GetStatus | "" | "i" | pin status or type (enum gsmd_pin_type) | CPIN? | Get PIN status | |
| Phone methods | ||||||
| Phone/PowerUp | "" | CFUN=1 | Powerup | |||
| Phone/PowerDown | "" | CFUN=0 | power down | |||
| Phone/PowerStatus | "" | "s" | CFUN? | get power status | ||
| Phone/GetIMSI | "" | "s" | ||||
| Phone/GetManufacturer | "" | "s" | AT+CGMI | |||
| Phone/GetModel | "" | "s" | AT+CGMM | |||
| Phone/GetRevision | "" | "s" | AT+CGMR | |||
| Phone/GetSerialNum | "" | "s" | AT+CGSN | |||
| Phone/GetBattery | "" | "ii" | enum gsmd_bat_conn_status, battery charge level | CBC | ||
| Phone/VibratorOn | AT+CVIB=1 | |||||
| Phone/VibratorOff | AT+CVIB=0 | |||||
| Network methods | ||||||
| Network/RegisterAuto | "" | "" | AT+COPS=0 | |||
| Network/RegisterManual | "s" | operator in numeric form, if "" - Auto select | "" | AT+COPS=1 | Network operator select | |
| Network/DeRegister | "" | "" | AT+COPS=2 | |||
| Network/QueryRegistration | "" | "i" | enum gsmd_netreg_state state | AT+CREG? | ||
| Network/VoiceMailGet | "" | "isi" | enable, number, number type | CSVM | ||
| Network/VoiceMailSet | "si" | number, type | "" | CSVM= | ||
| Network/SignalGet | "" | "ii" | rssi, ber | CSQ | ||
| Network/OperatorGet | "" | "s" | operator name | COPS | ||
| Network/OperatorGetNum | "" | "s" | operator in numeric form | COPS | ||
| Network/OperatorList | TODO | |||||
| Network/PreferredList | TODO | |||||
| Network/PreferredDel | ||||||
| Network/PreferredAdd | ||||||
| Network/PreferredSpace | ||||||
| Network/GetOwnNum | CNUM | |||||
| Modem | ||||||
| Modem/Power | "i" | enum gsmd_msg_modem | Modem power control | |||
| Modem/Init | "" | "" | Init modem | |||
| SMS | ||||||
| SMS/List | "i" | enum gsmd_msg_sms_type | "TODO" | CMGL | List messages from current store | |
| SMS/Read | "i" | message index | "TODO" | CMGR | Read message with index | |
| SMS/Send | "TODO" | "TODO" |
Current status is in SharedMem area.
| Signals | fmt string | fmt description | Description |
| IncomingCall | "i" | enum gsmd_call_type | Incoming call event |
| IncomingSMS | |||
| IncomingGPRS | |||
| IncomingCLIP | "s" | number | calling line identification presentation |
| NetworkReg | "iii" | enum gsmd_netreg_state state, lac, ci | Network (un)registration event |
| Signal | "i" | Network signal level 0-not detectable ... 5-good | |
| PINneeded | "i" | enum gsmd_pin_type | |
| CallProgress | "ii" | enum gsmd_call_progress, int call_id | Call progress indication (CIEV) |
| OutgoingCOLP | "s" | number | |
| CallWaiting | "siisi" | number, type, classx, alpha, cli | Call Waiting event |
| TimezoneChange | "i" | new timezone in quarters of hours +/- GMT (-48...+48) | |
| CipheringInfo | |||
| IncomingCBM | |||
| SMSDeliveryStatus | |||
| CMECMSError | "ii" | cme or cms error | |
| SX1 specific | |||
| BatteryCharge | "i" | Battery charge level - 0..5 | |
| ServiceAvailable | "i" | service 1-available, 0-not available | |
| CallInProgess | "i" | 1 - call in progress, 0 - call not in progress | |
| GPRScoverage | "i" | 1 - GPRS coverage available, 0 - no GPRS |
Some examples
mkphone
