2 a simple network api for (my)gnokii
4 (have also a look at demo-prg:
7 You need latest mygnokii-tarball, look at:
8 Marcin Wiacek -> mailto:marcin-wiacek@topnet.pl
9 http://marcin-wiacek.topnet.pl (http://marcin-wiacek.fkn.pl/) -> netmonitor,
10 firmware, mygnokii (GSM & Nokia)
11 http://www.mds.mdh.se/~cel95eig/mygnokii/ &
12 http://grumble.zereau.com/gnokii/ & http://reinhold.bachrain.de/ -> mygnokii
16 - customize .gnokii.rc (at least gnokii --identify should run)
17 - run udp network daeon with: mgnetd <password>
19 --------------------------------------------------------------------------------
25 All functions return a negative value if there is an error.
27 --------------------------------------------------------------------------------
29 int mg_init(char *hostname, char *passwd);
30 char *hostname - Hostname or IP-Address of Server with running mygnokii server.
31 (could be 'localhost' if mygnokii runs on same machine)
32 char *passwd - password of running mygnokii server
34 This function MUST be called first in your program.
36 --------------------------------------------------------------------------------
40 Kill the running mygnokii server
42 --------------------------------------------------------------------------------
44 int mg_version(MG_rq_version *version);
50 Get versioninformation from running mygnokii server
52 --------------------------------------------------------------------------------
54 int mg_identify(MG_rq_identify *ident);
61 Get imei, model and revision from phone connected to mygnokii server
63 --------------------------------------------------------------------------------
65 int mg_memorystatus(MG_rq_memorystatus *stats);
67 char memtype[3]; -> ME for internal phonememory, SM for SIM-Card
68 int used; -> free entrys within selected memory
69 int free; -> used entrys within selected memory
72 Get memory status from phone connected to mygnokii server
74 --------------------------------------------------------------------------------
76 int mg_get_memory_location(MG_rq_phonebook_location *rph);
78 char memtype[3]; -> ME for internal phonememory, SM for SIM-Card
79 int location; -> location of entry within selected memory
90 } MG_rq_phonebook_location;
92 Get phonebook entry at location-number from phone connected to mygnokii server
94 --------------------------------------------------------------------------------
96 int mg_write_phonebook_location(MG_rq_phonebook_location *wph);
98 char memtype[3]; -> ME for internal phonememory, SM for SIM-Card
99 int location; -> location of entry within selected memory
110 } MG_rq_phonebook_location;
112 Write phonebook entry to location-number from phone connected to mygnokii server
114 --------------------------------------------------------------------------------
116 int mg_delete_phonebook_location(int location)
117 int location - Location of phonebookentry to delete
119 Delete phonebook entry at location-number from phone connected to mygnokii server
121 --------------------------------------------------------------------------------
123 int mg_send_sms(MG_rq_send_sms *sms);
125 char destination[12]; /* destination */
126 char message[161]; /* the message */
127 char SMSCNumber[100]; /* SMSC number (could be NULL)*/
128 int SMSCenter; /* SMSC number index in phone memory */
129 int SMSValidity; /* validity of sms eg: 4320 -> 3 days !*/
130 char longsms; /* long messages, NOT USED ! */
131 char enablevoice; /* SMS enables voice indicator TRUE/FALSE*/
132 char disablevoice; /* SMS disables voice indicator TRUE/FALSE*/
133 char enableemail; /* SMS enables email indicator TRUE/FALSE*/
134 char disableemail; /* SMS disables email indicator TRUE/FALSE*/
135 char enablefax; /* SMS enables fax indicator TRUE/FALSE*/
136 char disablefax; /* SMS disables fax indicator TRUE/FALSE*/
137 char unicode; /* SMS coding type TRUE/FALSE*/
138 char delivery; /* we want delivery report TRUE/FALSE*/
140 Send sms message 'message' to destination at 'destination' via phone connected to mygnokii server
142 --------------------------------------------------------------------------------