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.3 2002/04/03 00:08:02 short
17 Found in "gnokii-working" directory, some November-patches version
19 Revision 1.2 2001/11/08 16:34:19 pkot
20 Updates to work with new libsms
22 Revision 1.1 2001/10/24 22:33:01 pkot
23 Moved error codes to a separate files
28 #include "gsm-error.h"
30 char *print_error(GSM_Error e)
33 case GE_NONE: return "No error.";
34 case GE_DEVICEOPENFAILED: return "Couldn't open specified serial device.";
35 case GE_UNKNOWNMODEL: return "Model specified isn't known/supported.";
36 case GE_NOLINK: return "Couldn't establish link with phone.";
37 case GE_TIMEOUT: return "Command timed out.";
38 case GE_TRYAGAIN: return "Try again.";
39 case GE_INVALIDSECURITYCODE: return "Invalid Security code.";
40 case GE_NOTIMPLEMENTED: return "Command called isn't implemented in model.";
41 case GE_INVALIDSMSLOCATION: return "Invalid SMS location.";
42 case GE_INVALIDPHBOOKLOCATION: return "Invalid phonebook location.";
43 case GE_INVALIDMEMORYTYPE: return "Invalid type of memory.";
44 case GE_INVALIDSPEEDDIALLOCATION: return "Invalid speed dial location.";
45 case GE_INVALIDCALNOTELOCATION: return "Invalid calendar note location.";
46 case GE_INVALIDDATETIME: return "Invalid date, time or alarm specification.";
47 case GE_EMPTYSMSLOCATION: return "SMS location is empty.";
48 case GE_PHBOOKNAMETOOLONG: return "Phonebook name is too long.";
49 case GE_PHBOOKNUMBERTOOLONG: return "Phonebook number is too long.";
50 case GE_PHBOOKWRITEFAILED: return "Phonebook write failed.";
51 case GE_SMSSENDOK: return "SMS was send correctly.";
52 case GE_SMSSENDFAILED: return "SMS send fail.";
53 case GE_SMSWAITING: return "Waiting for the next part of SMS.";
54 case GE_SMSTOOLONG: return "SMS message too long.";
55 case GE_SMSWRONGFORMAT: return "Wrong format of the SMS message.";
56 case GE_NONEWCBRECEIVED: return "Attempt to read CB when no new CB received";
57 case GE_INTERNALERROR: return "Problem occured internal to model specific code.";
58 case GE_CANTOPENFILE: return "Can't open file with bitmap/ringtone";
59 case GE_WRONGNUMBEROFCOLORS: return "Wrong number of colors in specified bitmap file";
60 case GE_WRONGCOLORS: return "Wrong colors in bitmap file";
61 case GE_INVALIDFILEFORMAT: return "Invalid format of file";
62 case GE_SUBFORMATNOTSUPPORTED: return "Subformat of file not supported";
63 case GE_FILETOOSHORT: return "Too short file to read";
64 case GE_FILETOOLONG: return "Too long file to read";
65 case GE_INVALIDIMAGESIZE: return "Invalid size of bitmap (in file, sms etc.)";
66 case GE_NOTSUPPORTED: return "Function not supported by the phone";
67 case GE_BUSY: return "Command is still being executed.";
68 case GE_USERCANCELED: return "User has cancelled the action.";
69 case GE_UNKNOWN: return "Unknown error - well better than nothing!!";
70 case GE_MEMORYFULL: return "Memory is full";
71 case GE_NOTWAITING: return "Not waiting for a response from the phone";
72 case GE_NOTREADY: return "Device not ready.";
73 case GE_LINEBUSY: return "Outgoing call requested reported line busy";
74 case GE_NOCARRIER: return "No Carrier error during data call setup ?";
75 default: return "Unknown error.";