7 A Linux/Unix toolset and driver for Nokia mobile phones.
9 Copyright (C) 2001 Pawe³ Kot <pkot@linuxnews.pl>
11 Released under the terms of the GNU GPL, see file COPYING for more details.
16 Revision 1.1.1.2 2001/12/14 19:48:52 short
17 :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Fri Dec 14 20:46 CET 2001
19 Revision 1.3 2001/12/14 14:37:41 pkot
20 Cleanups. Call divert support for at and 7110 series
22 Revision 1.2 2001/11/08 16:34:19 pkot
23 Updates to work with new libsms
25 Revision 1.1 2001/10/24 22:33:01 pkot
26 Moved error codes to a separate files
31 #include "gsm-error.h"
33 char *print_error(GSM_Error e)
36 case GE_NONE: return "No error.";
37 case GE_DEVICEOPENFAILED: return "Couldn't open specified serial device.";
38 case GE_UNKNOWNMODEL: return "Model specified isn't known/supported.";
39 case GE_NOLINK: return "Couldn't establish link with phone.";
40 case GE_TIMEOUT: return "Command timed out.";
41 case GE_TRYAGAIN: return "Try again.";
42 case GE_INVALIDSECURITYCODE: return "Invalid Security code.";
43 case GE_NOTIMPLEMENTED: return "Called command is not implemented for the used model.";
44 case GE_INVALIDSMSLOCATION: return "Invalid SMS location.";
45 case GE_INVALIDPHBOOKLOCATION: return "Invalid phonebook location.";
46 case GE_INVALIDMEMORYTYPE: return "Invalid type of memory.";
47 case GE_INVALIDSPEEDDIALLOCATION: return "Invalid speed dial location.";
48 case GE_INVALIDCALNOTELOCATION: return "Invalid calendar note location.";
49 case GE_INVALIDDATETIME: return "Invalid date, time or alarm specification.";
50 case GE_EMPTYSMSLOCATION: return "SMS location is empty.";
51 case GE_PHBOOKNAMETOOLONG: return "Phonebook name is too long.";
52 case GE_PHBOOKNUMBERTOOLONG: return "Phonebook number is too long.";
53 case GE_PHBOOKWRITEFAILED: return "Phonebook write failed.";
54 case GE_SMSSENDOK: return "SMS was send correctly.";
55 case GE_SMSSENDFAILED: return "SMS send fail.";
56 case GE_SMSWAITING: return "Waiting for the next part of SMS.";
57 case GE_SMSTOOLONG: return "SMS message too long.";
58 case GE_SMSWRONGFORMAT: return "Wrong format of the SMS message.";
59 case GE_NONEWCBRECEIVED: return "Attempt to read CB when no new CB received";
60 case GE_INTERNALERROR: return "Problem occured internal to model specific code.";
61 case GE_CANTOPENFILE: return "Can't open file with bitmap/ringtone";
62 case GE_WRONGNUMBEROFCOLORS: return "Wrong number of colors in specified bitmap file";
63 case GE_WRONGCOLORS: return "Wrong colors in bitmap file";
64 case GE_INVALIDFILEFORMAT: return "Invalid format of file";
65 case GE_SUBFORMATNOTSUPPORTED: return "Subformat of file not supported";
66 case GE_FILETOOSHORT: return "Too short file to read";
67 case GE_FILETOOLONG: return "Too long file to read";
68 case GE_INVALIDIMAGESIZE: return "Invalid size of bitmap (in file, sms etc.)";
69 case GE_NOTSUPPORTED: return "Function not supported by the phone";
70 case GE_BUSY: return "Command is still being executed.";
71 case GE_USERCANCELED: return "User has cancelled the action.";
72 case GE_UNKNOWN: return "Unknown error - well better than nothing!!";
73 case GE_MEMORYFULL: return "Memory is full";
74 case GE_NOTWAITING: return "Not waiting for a response from the phone";
75 case GE_NOTREADY: return "Device not ready.";
76 case GE_LINEBUSY: return "Outgoing call requested reported line busy";
77 case GE_NOCARRIER: return "No Carrier error during data call setup ?";
78 default: return "Unknown error.";