SMSLink 0.55b Project news ========================== For those of you already playing with the experimental 0.55b tree, I decided to post here a short news bulletin detailing the current status of the work on that front. What's new: ----------- - 06-08/09/03: Update Changelog in preparation for official release. - 03/08/03: Plenty of runtime tests. Corrected bug in packed8toascii7() [./server/pdu.c] where the returned textlen value wasn't properly adjusted when a trailing '@' sign was chopped off. Corrected a bug in mbparsePDU() [./server/mbchecker.c] where some trailing junk could be passed to decode_pdu(). Made sure to chop it off. Re-designed the inbox processing routine in mailbox_run() [./server/gw_stuff.c] so that it can now handle multi-line inbox entries (both as mail and as non-mail entries). Corrected a silly bug causing an empty mail to be sent in bounce_message() [./server/mbchecker.c]: forgot to insert body line in email struct. Incremented sms2mailgw version number, update sms_serv release date. A worthy release candidate at last. - 01/08/03: Created new global variable "progname" + new function "l_basename()" (in ./server/stuff.c). Altered syserr() to make use of progname and replaced program name in all calls to syserr() in both server modules and all PDU tools by the name of the local function. Allows for better program identification in modules that are shared among serveral programs (e.g. stuff.c, pdu.c or smtp.c). - 31/07/03: Minor correction in the gsmcaps RMU entry. Hid the PIN & PUK code display in the interactive interface "dl l" command: let's wait until we're able to provide an "enable" mode for the administrator before displaying this. - 29/07/03: Doc update (comments, man pages) + start website update. CVS commit and website upload. - 28/07/03: Adapted Makefiles in ./, ./client, ./server and ./pdu-tools to generate HTML doc based on man pages. Created the doc target, and adapted the clean target accordingly. Integrated call to send_mail() into mbchecker.c. Wrote bounce_message(). No CVS export yet. - 26/07/03: Further work on smtp.[ch]. Started integrating mail features into sms_serv. Warning: for coherence between both server modules, I changed some short option letters in the sms2mailgs (-r -> -M; -D -> -F). - 25/07/03: Further work on smtp.[ch]. - 16/07/03: Replaced outdated use of sys_errlist[] and sys_nerr by calls to strerror(). Thanks to Greg May () for reporting the bug (spotted on RH 9.0). - 30/06/03: Further work on smtp.[ch]. Remember to handle the error cases in the smtp.c functions conditionnally: whether called from sms_serv or sms2mailgw. - 27/06/03: Further work on smtp.[ch]. - 26/06/03: When a queued message can't be delivered and reaches its MAXQRUNS limit, we need to warn the "postmaster" about it (as would be the case for an email). So, I started to modularize the send_mail() and related functions from gw_stuff.c. I created 2 new files (smtp.[ch]) and copied a few functions over there (is_dotted_quad(), resolve(), slurp_n_catch()). Those will in time be removed from gw_stuff.c. I also added a few functions to handle the new struct email_txt. *** WARNING*** the latest export changes the underlying MySQL database *** schema. If you're already using that feature, please have a look *** at ./varia/database.sql and adapt accordingly (or drop your tables *** and recreate them based on the new script if acceptable). - 23/06/03: Completed work on the database schema check. Committed the whole bunch into CVS. Prepared export. - 21/06/03: Further work on MAXQRUNS limits (DB queueing method). No CVS export yet. Implementation is complete and can be tested. Started implementation of a mechanism that will ensure that the DB schema is in line with the version of the server module. Added the "schema" table and populated it. Modified ./varia/database.sql accordingly. Added a global define with the expected schema version (SMS_SERV_EXP_SCHEMA). - 20/06/03: Further work on MAXQRUNS limits (DB queueing method). No CVS export yet. Altered outbox table layout to add "qruns" field. Modified ./varia/database.sql accordingly. - 17/06/03: Further work on MAXQRUNS limits (file queueing method). No CVS export yet. - 15/06/03: Further work on MAXQRUNS limits (file queueing method). No CVS export yet. - 13/06/03: Started implementation of the MAXQRUNS limits (removal of undeliverable queue items after so many queue runs to avoid queue congestion where a per-queue-run item processing limit is set [OBCHKLIMIT]). Implemented global MAXQRUNS support (define and command-line parameter) and started adapting the file queueing method. No CVS export yet. - 11/06/03: Added support for FreeBSD 5.0 platform into both client and server modules (contributed by Greg May ). - 10/06/03: Fixed query string initialization bug in dumptodb(). Found by Greg May . Added "driver" for Falcom Twist to gsmcaps (thanks to Brian Silberbauer for his feedback). Fixed a bug in the MySQL inbox insert query (missing timestamp "stored" field). Renamed stpcpy() local re-implementation into l_stpcpy() (to avoid a clash with the original where the function definition vary). - 06/06/03: Added display of resulting effective parameter in ./pdu-tools/gsmts0338 when encoding strings. Adapted HTML server installation procedure to account for the new features in 0.55b. Added a blurb in the FAQ regarding the "+CMS ERROR: 515" error message and the PINpause parameter. Updated the gateway module installation instructions. - 04/06/03: Fixed broken support for FreeBSD 4.8 with the help of Greg May . Added the GNU getopt code in the (new) ./libs directory. Created a Makefile there. Integrated the ./libs directory in the global "clean" target. Heavily modified ./server/Makefile: conditional compile of the getopt objects when FREEBSD is chosen as platform, static link of those within the sms_serv and sms2mailgw modules (required by the getopt_long() function). Altered the layout of the top half of the Makefile to make it more apparent what part should be customized by the user. Added two variables "IEXTRA" and "LEXTRA" that make it easier for the user to specify extra include and library paths when needed. Removed 2 useless libs from the link line of the sms2mailgw module (-lnsl & -lresolv). - 03/06/03: Adapted gsmts0338 man page to include documentation for the -l command-line parameter. - 28/05/03: Finalized the implementation of the new end-of-string detection strategy in packed8toascii7(): added a parameter, moved the "trailing '@'" check within packed8toascii7(). Modified the gsmts0338 PDU tool: the parameter value can be set by the user through the '-l' command-line option. Added missing initialization code for struct mbox_item in the decode_pdu PDU tool. - 20/03/03: Adapted the OK string / line separator characters in the FA2D3 gsmcaps entry according to feedback from Benjamin Zöller . - 09/03/03: Improved error checking and reporting in packed8toascii7() (./server/pdu.c). Also improved the handling of the end-of-string condition in same, which should resolve (at least partly) the trailing '@' sign problem. But upon testing, it now appears there may be a related issue in the ascii7topacked8() function, where an extra '00' hex pair is added at the end of the string. This surfaced through testing the newly improved function with the gsmts0338 utility. - 08/03/03: Fixed a bug in ./pdu-tools/decode_pdu where the 'fromgsm' field in the struct mbox_item wasn't properly initialized. - 21/02/03: Adapted the RMU Ultralite entry in gsmcaps according to Troy's feedback. In ./server/sms2mailgw.c, added a call to dequalify() on localhost to prevent the domain to appear twice in the from: address when gethostname() returns the FQDN (brought sms2mailgw to version 0.14b). In send_mail() (./server/gw_stuff.c), included a line skip between the last header row and the message body. Suggested by Denny Prasetya to fix a problem with squirrelmail. - 03/02/03: Committed previous 2 set of changes to CVS. Added support for the RMU Ultralite CX module (gsmcaps entry contributed by Troy Stevens ). Sorted all entries in gsmcaps file for easier reference. - 09/12/02: Worked on solving a weakness in mbparse() (in ./server/mbchecker.c), where only the first line of a multi-line message would be saved (due to an earlier, misguided, design decision). The parsing code should now allow for multiple [] characters in the text of the message. Those will then be trimmed out to be replaced by spaces (in order for the incoming messages to be saved on a single line in the inbox file). Problem resolution contributed by Marcel P. . - 07/11/02: Started work on solving Victor Tan's problem (parallel access to multiple devices when all of them are in "dd" mode). Also made some generic improvements to dd_spawn() (memory allocation and cleanup for struct symbols, error reporting). Also found out that, as it is currently implemented, the "dd" mode will only support the send command (what about "post" and "queue" ?). Added the dd_busy field in the struct gsms_def - modified gsmdevcpy() accordingly. - 05/11/02: Added formal support for the Falcom A2D3 model (as FA2D3). Temporarily copied on the WMOD2B entry -- we'll see whether we need to refine it further in the future. Contributed by Benjamin Zoeller and Joachim Wickman . - 23/10/02: Fixed -hopefully- a bug affecting DB access from child processes working in "dd" mode (bug identified by Victor Tan ). The DB credentials were read from file after the "dd" child processe(s) were spawned -- meaning that the needed global variables were still set to null in their environment. - 22/10/02: Implemented further checks on fields validity in DB-based outbox check + bug fix (wrong row number for mode field). Contributed by Andrea. - 03/10/02: Implemented a check on the "mode" field validity in db_outboxcheck(). - 02/10/02: Started dealing with bugs reports and suggestions sent by Andrea. Implemented mandatory fields ("NOT NULL") and default values in the outbox table (updated the creation SQL script). - 01/10/02: On Andrea's advice, added a new command-line option to control a variable limit on the number of queue messages allowed to be processed per queue run (-l / --obchklimit). Implemented it in both "DB" and "FILE" method. ................................................................... - 27/09/02: Pre-release of 0.55b announced on the mailing list. Call for beta-testers. ................................................................... - 25/09/02: Fixed the bug that caused file_outboxcheck() to die. Tested a "loaded" queue run, but without GSM device attached. Works as expected. More "live" tests needed ASAP. More live tests indeed: a "loaded" queue run in file method now yields the correct counter values. The "post" command has been shown to work as expected when the device is busy. The file method outbox check now works as expected, and the counters for it are updated as they should. Messages containing french accented characters are handled correctly through the file method as well. All in all, this looks good enough for a pre-release. - 24/09/02: Did the same for file_outboxcheck(). Added some free() calls in the main() to de-allocate the structs symbols before child exits. Also added some debug traces at the child exits. Tested the re-designed outbox checks through a few empty queue runs. No obvious problems, all counters left at 0. - 23/09/02: Modified db_outboxcheck() to reverse the loop logic as explained in one of logs below (in the entry dated 18/09/02). The function now first loops on queued messages and locks and unlocks the GSM instance for each processed queue item. The update of the device-level counters were incorrectly placed in the previous version anyway, which could explain the incorrect handling. Those counters would have been updated even during an empty queue run. - 22/09/02: Tested remote access to a MySQL DB instance (sms_serv running on joshua, MySQL on kermit). Works fine. Initial connectivity test OK, "queue", "qstat" and "qdel" work as expected. Great ! Tested outbox check processing through the DB method. Works fine -- the messages are sent OK, the only glitch is that the "sent OK" device-level counter is incremented twice. Tested sending a message containing french accented characters after queueing it in the DB. All characters were transmitted OK. Tested the "post" command with a free device: successfull send. Tested outbox check processing through the FILE method. The OBC child dies (silently) just after converting the message to PDU (allocation error ?). This leaves the queue item locked and the modem allocated. ####### ( 18/09/02 ) ####### ( Feature freeze for 0.55b ) ####### - 18/09/02: Completed the first implementation of the file queue processing method in the outbox check. In this case, the file method is a simple adaptation of the DB method proposed by Andrea. The problem with this approach (in turn inherited from the inbox check, I'm sure), is that the modem, once acquired, will remained locked for as long as there are messages to be sent in the queue. In the DB processing loop, a limit of 5 per outbox check has been set. In my opinion, it would have been better to lock and release the modem after the processing of each queue item. This way, the outbox check will have to compete for a modem at each sending attempt. For a server that only queues, the impact on availability is null. For a server that is used for both queueing and immediate sending, this garanties higher modem availability for the sending clients (at the risk of starving the outbox child process -- but then those messages will be kept and just wait for the next turn). This was the last feature I wanted to include in 0.55b before releasing it. I'll now go to feature-freeze and test those new features. Once the basic testing is ok, I'll release a preview version through the mailing list, update the doc and fix the bugs that will appear. If all goes as planned, the final release should happen a few weeks after that. - 16/09/02: Started work on outboxcheck() file method. - 15/09/02: Implemented the "qdel" back-end for the file method. - 09-12/09/02: Improved "file" queueing method implementation by correcting the way queue files are locked (control files). Started implementing the "file"-based "qstat" server-side command (now works). - 07-08/09/02: Implemented the "file" queueing method (the storage functions only at this time). Added preliminary support for Ericsson DI27 device (an IR plug-in modem module for the T10 and T18). Contributed by Frank Weis . - 05/09/02: Implemented the server-side "qstat" and "qdel" commands (for the DB queueing method only, at this stage). "qstat" displays the current queueing mechanism status, then lists the contents of the queue. "qdel" allows any queued item to be removed, obviously (one item at a time, at this stage). - 04/09/02: Modified the client program (sendsms) to support all currently implemented server-side action commands (send, post and queue). Improved client-side reporting to allow the caller to determine the eventual outcome of the action. Updated the sendsms man page accordingly. - 03/09/02: Added support for the "Siemens TC35 Terminal" device (contributed by François Delpierre ) [a new entry in the gsmcaps file was enough]. Added support for the post command in the interactive interface (post = send + queue: attempts an immediate send, and queues the message when the sending fails). Altered the feedback message of the queue command to match the one of the send command as closely as possible (to make it easier on the client side). - 02/09/02: Implemented own version of stpcpy() function (not part of the POSIX API, so we can't rely on it being available on all Unix / Linux platforms -- said to be a influence coming from DOS). Corrected a bug in the sms_queue_db() function. - 09/08/02: Implemented the "queue" command in the interactive interface, including its help screens. Implemented the sms_queue_db() method. Improved PDU handling in all DB related functions. Modified the inbox and outbox DB table layout slightly. Tested the upload of a message through the "queue" command and it works ! - 08/08/02: Added queueing method definition and selection support in preparation for outbox check modularization. Modularized outbox check. - 07/08/02: Merged in 0.55b the changes introduced in 0.54b-9 (that version was never officially released). Those added preliminary support for the Ericsson T65 (contributed by Ritesh Shah ). Sending is supposed to be working, but reception is reportedly still problematic. Also corrected a mistake introduced in the previous changes where all AT+CNMI commands were replaced by a call to set_cnmi(). Some (most) turn notification off, other turn it on. I now have 2 functions: set_cnmi_on() and set_cnmi_off(). WARNING: /etc/gsmdevices format changed. - 07/08/02: Replaced the static 20 secs. pause for PIN post-processing (i.e. network logon) with a device-level parameter. After switching the SIM card on my development system to a new provider, I noticed a huge increase in the required pause time (from 20 secs to between 1 and 2 minutes), so I feel this parameter is more linked to the network or operator than to the GSM hardware. For this reason, I put this new "PINpause" parameter straight in the gsmdevices file -- it will be up to the user to tune it to his/her setup: setting too low a value will result in a "+CMS ERROR: 515" when issuing the next "AT+" command. Adapted the man page accordingly (including a section on the "init" mode as well). Fixed a silly bug in the parameter order to the mysql_real_connect() calls. The server now loads with MySQL support enabled and connects to the local instance on my laptop. - 06/08/02: Implemented the "initialized" mode as contributed by Andrea Vettori (but as a device-level option instead of a global one). Moved the gsmdevcpy() function from serv_stuff.c to gsmdevices.c (makes more sense that way). - 04/08/02: Finished moving the last modem dialog items to separate functions in serv_stuff.c (AT+CSDH, AT+CREG). Removed corresponding code from the other three files. - 02/08/02: Moved the AT+CMGF dialog to a seperate function in serv_stuff.c. Removed that code from server.y, dd.c and mbchecker.c. - 01/08/02: Moved the AT+CPIN and AT+CSCA modem dialog to single functions (checkset_cpin() & checkset_csca() in serv_stuff.c). Removed corresponding code from server.y, mbchecker.c and dd.c. - 04/07/02: Expanded the #defined "PUKLEN" value to 16 chars (in ./server/sms_serv.h), as a user reported using a 15-char long PUK string. - 28/05/02: Altered "CFLAGS" handling in the Makefiles. Makes it possible to get a debug build by first exporting CFLAGS="-g" and then running make. - 14/03/02: Included another GUI-based Win32 VB client contributed by Alex Cooper (). Created a directory called SMS-VB below ./contrib to keep the sources and the README file. - 04/03/02: Created man pages for encode_pdu and decode_pdu. Updated man page for gsmts0338 to take into account its new support for charsets. Updated "install" target in ./pdu-tools/Makefile to handle installing the 2 new utilities and their man pages. - 02/03/02: Fixed a compilation problem in mbchecker.c when MySQL support was turned off. Added a debug statement when the message string to send is received by the server. Corrected error messages in encode-pdu.c and decode-pdu.c. Added support for real GSM model emulation in decode-pdu (model now selectable through the "-m" command-line option). Corrected a bug in translatemodname() (in gsmdevices.c) where a 0 return value was sent even when the requested model name was not found. - 30/01-08/02/02: Uploaded the SMSLink project in a local CVS repository (not on SourceForge... yet). Tagged 0.54b-8 (initial release in CVS) and created branch for 0.55b development. Modified the top-level makefile to handle a directory rename based on the 'VERSION' file, to help in preparing a distribution archive after a "cvs export" call. Added more PDU examples in the resource file in ./pdu-tools directory. - 29/01/02: Adapted all "PDU tools" utilities so they can set the charset to be used through the command-line (-z option). - 28/01/02: Fixed a bug in sms2mailgw where the send_mail() function would violate RFC 822bis section 2.3 by sending raw LF's. Now sends CR/LF as requested. - 24/01/02: Fixed a (really silly) bug in the encoding function (ascii7topacked8()). Further testing. Now yields coherent results for Latin1 input when encoding and decoding through gsmts0338. Ready to be tested "on the hardware". - 23/01/02: Implemented charsetdeftable[], listsupportedcharsets() and getcharsetID(). Implemented transcode feature in the PDU decode functions. Adapted all calls accordingly, both in the server module, and in the PDU tools. Started testing. Encoding failure. - 21/01/02: Implemented the hooks to transcode() in packed8toascii7() (adapted decode_pdu() as well). Adapted the gsmts0338 and decode_pdu tools accordingly, then used them for a first test. Looks like working. Good :-) - 20/01/02: Implemented transcode() and the "default_alphabet" global variable. Set to some define right now, but will be settable through command-line option when the machanism will be shown to be working. - 15-18/01/02: Started work on "default GSM alphabet" support. - 14/01/02: Added support for #C8 in ./server/pdu.c. - 13/01/02: Created the "encode_pdu" utility in the ./pdu-tools directory (same purpose as stated below). Adapted the Makefile accordingly. - 12/01/02: Created the "decode_pdu" utility in the ./pdu-tools directory, as a direct interface to the decode_pdu() function in the server. Adapted the Makefile accordingly. Added support for #C1 in ./server/pdu.c. - 08/01/02: Fixed a silly bug in the new "stats" interactive command where the "sent" and "received" counters display were swapped. - 07/01/02: Adapted sms2mailgw(1) man page to include the 2 new command-line options. Added more install info in ./server/Makefile. - 06/01/02: Replaced the old domain determination strategy that relied on the NIS domain by a more technically correct approach. The default domain is now automatically queried from the system provided the server name resolves through DNS. I also added a command-line option ("--defaultdomain=") for easy override of that value (usefull in an M$ AD environment where the internal DNS domain doesn't match the SMTP mail domain -- yes, I've seen one !). Adapted the Makefile to link sms2mailgw against libnsl and libresolv. I also added a "--smtprelay=" option that allows for an easy override of the compiled-in SMTP relay name (by default, "localhost"). - 05-06/01/02: Started to simplify the various modem dialog procedures (in server.y, mbchecker.c and dd.c) by moving part of it to generic functions in serv_stuff.c. Added a new context for "dedicated daemon" child process, to better handle those generic functions. Replaced the calls to strmov() (a macro defined in ) by the function that this macro actually called (stpcpy()). Temporary fix, cause this one isn't ANSI/POSIX, but compiles better on more recent distros (such as SuSE 7.3 ;-). - 01/01/02: Adapted the sms_serv(1) man page to cover the newly added options ("--port=" and "--filesuffix="). - 30/12/01: Improved DB credentials handling (provided either through CLI or the DB access file) and their default values where appropriate. Improved error handling and reporting in case of missing credential. Added a credentials validation function (the provided credentials are verified at startup time, not when the connection to the DB would be used for the first time). Added a DEBUG_DBACCESS level for isolating DB interaction debugging. Improved debugging info in dumptodb() function. Implemented the "--filesuffix=" option. - 23/12/01: Improved error reporting on missing DB creds file. - 21/12/01: Integrated the "--port=" feature. - 18/12/01: Modified client Makefile to add support for gcc compiler on the HP-UX platform. Tested the build at work, and it still works both with the HP Ansi/C compiler and the GNU gcc. - 13/12/01: Last upload of the day ;-). Integration of 0.54b-7+8 features now finished. Release 0.55b still incomplete w/r to the planned features, but everything compiles fine. Hopefully, I'll be able to go ahead and work on the last missing features for this release now (working outbox, init mode, etc.). - 13/12/01: Second upload. The integration isn't finished yet, but 0.55b at least does compile cleanly now. - 13/12/01: After being forced to put 0.55b on the back burner for a long time (much too long, actually) due to maintenance work on the 0.54b series, I'm now starting to bring it to the fore again. I'm currently working on integrating into the 0.55b server the last changes I brought to the 0.54b series over the last few months. Since this is work in progress, the currently available package won't even compile (so don't play with it unless you mean business ;-).