X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=Docs%2Fdevelopers%2Fother%2FRE%20RE.txt;h=aa251781f794352d832cd504e70aba9ef802dd34;hp=1652e4c5a53224a85f53161ddcf5da55455c7cbe;hb=89539dc60f84e3f8811a470d5c2e0ddb607d744b;hpb=c70d730109945bd20579579213102ae02c764e21 diff --git a/Docs/developers/other/RE RE.txt b/Docs/developers/other/RE RE.txt index 1652e4c..aa25178 100644 --- a/Docs/developers/other/RE RE.txt +++ b/Docs/developers/other/RE RE.txt @@ -1,66 +1,66 @@ -Do: Markus Plail -Temat: RE: RE: - - -Hi, - -> Sorry for the confusion. I wrote the subject (getsms for 6210) in -> the CC field. -No problem :-) - -> So this is what I want to try, in linux btw. U wrote that u can -> give some information on that topic. -OK. Good. - -First of all, you HAVE to understand, how/where are created all phone functions. Look into n7110.c for N7110_Functions. This is our structure for each function - getting SMS, etc. You have pointers to each function sending request. - -Example: N6110_NetMonitor for netmonitor function. - -If each function (let's say N6110_NetMonitor) you send frame for phone: ------------------------------ - unsigned char req[] = { 0x00, 0x01, 0x7e, 0x00 }; - - GSM_Error error; - - error=N6110_EnableExtendedCommands(0x01); - if (error!=GE_NONE) return error; - - CurrentNetmonitor=Screen; - - req[3]=mode; - - return N6110_SendMessageSequence - (20, &CurrentNetmonitorError, 4, 0x40, req); ---------------------------- -In req you prepare it (see 6110.txt/7110.txt for frame for netmonitor and compare it with req). - -First (this is specific for netmonitor and some other) need to send something, we call EnableExtendedCommands - we must send special frame and wait for answer. And ONLY after it phone will answer with 0x40 frames. For SMS in 6210 it's not required. - -After it we set pointer to structure given by user (pointers are declared in gsm-api.c & gsm-api.h): CurrentNetmonitor=Screen; - -Prepare frame send to phone... - -And use N6110_SendMessageSequence -> first is, how long we can wait for phone answer (20), next: what variable is used to see, if phone answered (I will later describe more - variable created in gsm-api.c & gsm-api.h), how many bytes in req, frame type and req. - -That's all here. - -All answers are handled in N7110_DispatchMessage - -In example look for: - - fprintf(stdout, _("Message: Netmonitor menu %d received:\n"), MessageBuffer[3]); - -You copy formatted answer to structure pointed by CurrentNetmonitor (in example) and set CurrentNetmonitorError to GE_NONE (it makes, that N6110_SendMessageSequence returns: NO error). That's all. --------------------- -If you understand, let's start: - -1.need to make new N7110_GetSMSFolders similiar to N6110_GetSMSFolders (send frame - it's described in 7110.txt: "Get folder names", wait for answer and return it) and set N7110_Functions to point on it (in line 127). - -After it we will be able to make "real" getsms... - -Any questions ? - -Pozdrowienia/Best Regards --- -Marcin Wiacek -> mailto:marcinwiacek@topnet.pl http://marcin-wiacek.topnet.pl (http://www.fkn.pl/marcinw) -> netmonitor, firmware, mygnokii (GSM & Nokia) +Do: Markus Plail +Temat: RE: RE: + + +Hi, + +> Sorry for the confusion. I wrote the subject (getsms for 6210) in +> the CC field. +No problem :-) + +> So this is what I want to try, in linux btw. U wrote that u can +> give some information on that topic. +OK. Good. + +First of all, you HAVE to understand, how/where are created all phone functions. Look into n7110.c for N7110_Functions. This is our structure for each function - getting SMS, etc. You have pointers to each function sending request. + +Example: N6110_NetMonitor for netmonitor function. + +If each function (let's say N6110_NetMonitor) you send frame for phone: +----------------------------- + unsigned char req[] = { 0x00, 0x01, 0x7e, 0x00 }; + + GSM_Error error; + + error=N6110_EnableExtendedCommands(0x01); + if (error!=GE_NONE) return error; + + CurrentNetmonitor=Screen; + + req[3]=mode; + + return N6110_SendMessageSequence + (20, &CurrentNetmonitorError, 4, 0x40, req); +--------------------------- +In req you prepare it (see 6110.txt/7110.txt for frame for netmonitor and compare it with req). + +First (this is specific for netmonitor and some other) need to send something, we call EnableExtendedCommands - we must send special frame and wait for answer. And ONLY after it phone will answer with 0x40 frames. For SMS in 6210 it's not required. + +After it we set pointer to structure given by user (pointers are declared in gsm-api.c & gsm-api.h): CurrentNetmonitor=Screen; + +Prepare frame send to phone... + +And use N6110_SendMessageSequence -> first is, how long we can wait for phone answer (20), next: what variable is used to see, if phone answered (I will later describe more - variable created in gsm-api.c & gsm-api.h), how many bytes in req, frame type and req. + +That's all here. + +All answers are handled in N7110_DispatchMessage + +In example look for: + + fprintf(stdout, _("Message: Netmonitor menu %d received:\n"), MessageBuffer[3]); + +You copy formatted answer to structure pointed by CurrentNetmonitor (in example) and set CurrentNetmonitorError to GE_NONE (it makes, that N6110_SendMessageSequence returns: NO error). That's all. +-------------------- +If you understand, let's start: + +1.need to make new N7110_GetSMSFolders similiar to N6110_GetSMSFolders (send frame - it's described in 7110.txt: "Get folder names", wait for answer and return it) and set N7110_Functions to point on it (in line 127). + +After it we will be able to make "real" getsms... + +Any questions ? + +Pozdrowienia/Best Regards +-- +Marcin Wiacek -> mailto:marcinwiacek@topnet.pl http://marcin-wiacek.topnet.pl (http://www.fkn.pl/marcinw) -> netmonitor, firmware, mygnokii (GSM & Nokia) http://www.mds.mdh.se/~cel95eig/mygnokii/ & http://grumble.zereau.com/gnokii/ & http://reinhold.bachrain.de/ -> mygnokii mirrors \ No newline at end of file