>First, for solaris 2.4/2.5, you have to set the right options in sendpage.h >and the Makefile. For me, the following context diff shows just those changes >I made to make it compile (for the most part I've taken out the changes I made >to make it work in our directory tree - we needed the db code also, and made a >couple of size changes I'll talk about later). Oh - yes. I quickly discovered >that the dependencies for sendpage's makefile were not all there, so I >immediately added the old '.KEEP_STATE:' pseuodo-target. If you use >solaris or sunos and don't know what .KEEP_STATE does for ya, go read >the man page, its quite useful.... > >Anyway, the context diff: > >diff -c sendpage/Makefile sendpage.7a.rel/Makefile >*** sendpage/Makefile Tue Jun 11 12:41:58 1996 >--- sendpage.7a.rel/Makefile Wed Feb 14 02:51:15 1996 >*************** >*** 1,19 **** > # DEBUG for runtime debug code to be compiled in (for -d flag) > # SYSLOG for syslog style logging > >- .KEEP_STATE: >- > # additional libraries: >! #RFLAGS = -I/usr/local/ar/api/include -L/usr/local/ar/api/lib >! RFLAGS = -I/opt/pager/db.1.85/PORT/sunos.5.2/include > RLIBS = -lnts -lar -larcat > > # Build options for SunOS 4.1.x gcc (Sun3 and Sun4) >! #CC = gcc >! #CFLAGS = -g -DDEBUG -I/usr/local/include -L../kb $(RFLAGS) >! #LIBS = -ldb $(RLIBS) >! ##CFLAGS = -g -DDEBUG -I/usr/local/include >! ##LIBS = -ldb -lefence > > # Build options for BSDI BSD/OS 2.0 -ByB > #CC = gcc >--- 1,16 ---- > # DEBUG for runtime debug code to be compiled in (for -d flag) > # SYSLOG for syslog style logging > > # additional libraries: >! RFLAGS = -I/usr/local/ar/api/include -L/usr/local/ar/api/lib > RLIBS = -lnts -lar -larcat > > # Build options for SunOS 4.1.x gcc (Sun3 and Sun4) >! CC = gcc >! CFLAGS = -g -DDEBUG -I/usr/local/include -L../kb $(RFLAGS) >! LIBS = -ldb $(RLIBS) >! #CFLAGS = -g -DDEBUG -I/usr/local/include >! #LIBS = -ldb -lefence > > # Build options for BSDI BSD/OS 2.0 -ByB > #CC = gcc >*************** >*** 35,46 **** > #LIBS = -L/usr/local/lib -ldb > > # Build options for Solaris with /opt/SUNWspro/bin/cc >! CC = cc > #CFLAGS = -g -DDEBUG -I/usr/local/include >- CFLAGS = -g -DDEBUG -I/opt/pager/db.1.85/PORT/sunos.5.2/include \ >- -I/opt/pager/db.1.85/PORT/sunos.5.2 > #LIBS = -L/usr/local/lib -ldb >- LIBS = -L/opt/pager/db.1.85/PORT/sunos.5.2 -ldb > > # Build options for Linux (untested) > #CC = gcc >--- 32,40 ---- > #LIBS = -L/usr/local/lib -ldb > > # Build options for Solaris with /opt/SUNWspro/bin/cc >! #CC = cc > #CFLAGS = -g -DDEBUG -I/usr/local/include > #LIBS = -L/usr/local/lib -ldb > > # Build options for Linux (untested) > #CC = gcc > >diff -c sendpage/sendpage.h sendpage.7a.rel/sendpage.h >*** sendpage/sendpage.h Tue Jun 11 15:21:21 1996 >--- sendpage.7a.rel/sendpage.h Wed Feb 14 03:46:30 1996 >*************** >*** 15,36 **** > #include > > #ifndef LINUX >! /*#include */ > #endif /* LINUX */ > >! /*#define PATH_SENDPAGE_CONFIG "/etc/sendpage.cf" */ >! /*#define PATH_SENDMAIL "/usr/lib/sendmail" */ >! /*#define PATH_SENDPAGE_PIDFILE "/var/pqueue/sendpage.pid"*/ >! /*#define PATH_QUEUE "/var/pqueue"*/ >! >! #define PATH_SENDPAGE_CONFIG "/opt/pager/sendpage/sendpage.cf" > #define PATH_SENDMAIL "/usr/lib/sendmail" >! #define PATH_SENDPAGE_PIDFILE "/opt/pager/pqueue/sendpage.pid" >! #define PATH_QUEUE "/opt/pager/pqueue" > #define QUEUE_HEAD "sendpageQ" > > /* define this to include the Remedy ARSystem notifier client gateway */ >! /*#define ARSYSTEM_NOTIFIER /**/ > > /* If the paging central server seems to drop carrier if you attempt to > * negotiate a connection too quickly, then define the following. */ >--- 15,31 ---- > #include > > #ifndef LINUX >! #include > #endif /* LINUX */ > >! #define PATH_SENDPAGE_CONFIG "/etc/sendpage.cf" > #define PATH_SENDMAIL "/usr/lib/sendmail" >! #define PATH_SENDPAGE_PIDFILE "/var/pqueue/sendpage.pid" >! #define PATH_QUEUE "/var/pqueue" > #define QUEUE_HEAD "sendpageQ" > > /* define this to include the Remedy ARSystem notifier client gateway */ >! #define ARSYSTEM_NOTIFIER > > /* If the paging central server seems to drop carrier if you attempt to > * negotiate a connection too quickly, then define the following. */ >*************** >*** 37,49 **** > /* #define SLOW_PAGING_CENTRAL /* */ > > /* does your system not include bcopy() in libc? (yes for Solaris) */ >! #define NEED_BCOPY /**/ > > /* does your system not include bzero() in libc? (yes for Solaris) */ >! #define NEED_BZERO /**/ > > /* does your system support SYSV_MALLOC style mallinfo()? */ >! /*#define SYSV_MALLOC /* #define SYSV_MALLOC /* (No for IRIX, no for Solaris, no for Linux) no for BSDI */ > > /* does your system require malloc.h? */ > #define NEED_MALLOC_H /* No for Linux */ >--- 32,44 ---- > /* #define SLOW_PAGING_CENTRAL /* */ > > /* does your system not include bcopy() in libc? (yes for Solaris) */ >! /* #define NEED_BCOPY /**/ > > /* does your system not include bzero() in libc? (yes for Solaris) */ >! /* #define NEED_BZERO /**/ > > /* does your system support SYSV_MALLOC style mallinfo()? */ >! #define SYSV_MALLOC /* #define SYSV_MALLOC /* (No for IRIX, no for Solaris, no for Linux) no for BSDI */ > > /* does your system require malloc.h? */ > #define NEED_MALLOC_H /* No for Linux */ >*************** >*** 136,146 **** > /* Note: Interesting "gotcha": since the modem may be in echo mode when the > following string is sent, and since the code expects "0\r" as the ack, > do NOT end the following string with a "0". */ >- /* #define MODEM_INIT "AT&FE0&C1&D1L2M1Q0V0H0X4" /* GVC 14.4K complete */ >- #define MODEM_INIT "ATE0M1V0Q0S0=0S6=2S7=60S8=2S12=50S11=70" /* USR Sportster Vi */ > /* #define MODEM_INIT "AT&FE0&C1&D1L1M1Q0V0H0X4" /* GVC 14.4K complete */ > /* #define MODEM_INIT "at&F&C1&D1EL3M1QVX4H" /**/ >! /* #define MODEM_INIT "ATEQVX4HS7=120" /* Simple */ > /* #define MODEM_INIT "at&F&C1&D1EL3M1QVX4H" /* MultiModem V32 */ > > /* c_cflag hardware settings... set to 0 for none */ >--- 129,137 ---- > /* Note: Interesting "gotcha": since the modem may be in echo mode when the > following string is sent, and since the code expects "0\r" as the ack, > do NOT end the following string with a "0". */ > /* #define MODEM_INIT "AT&FE0&C1&D1L1M1Q0V0H0X4" /* GVC 14.4K complete */ > /* #define MODEM_INIT "at&F&C1&D1EL3M1QVX4H" /**/ >! #define MODEM_INIT "ATEQVX4HS7=120" /* Simple */ > /* #define MODEM_INIT "at&F&C1&D1EL3M1QVX4H" /* MultiModem V32 */ > > /* c_cflag hardware settings... set to 0 for none */ >*************** >*** 152,158 **** > /* #define C_FLAG CLOCAL | HUPCL /* (AIX) */ > > /* try to get modems attention with DTR toggle? */ >! /*#define TOGGLE_DTR/**/ > > /* > /* >--- 143,149 ---- > /* #define C_FLAG CLOCAL | HUPCL /* (AIX) */ > > /* try to get modems attention with DTR toggle? */ >! #define TOGGLE_DTR > > /* > /* >*************** > > > >As you can see, the only changes I really made were those spoken of in the code >as needing changes. (Other than the fact that we don't use gcc here, sorry!) > >However, I had an awful time getting the thing to work more than once - i.e. it >would send a single page (or group of pages - i.e. it would correctly make the >first dialout attempt (usually)) and then never work again. >(Well, actually it was a little worse than that - sometimes it would work the >first time, sometimes not) > >Weird thing was that it worked fine in the debugger! So, figuring it was >a timing problem I just threw some sleeps in at what seemed like appropriate >places (in truth, I fiddled a bit to make it work reliably on the first dial >attempt - adding a sleep here, a sleep there, removing one here and there, >etc). It MAY be that simply setting "slow central" would have fixed it, because >a few of the sleeps I added were near the "slow central" sleeps. In any case, >it still would only work once. > >I'll cut to the chase - turned out that setting the baud rate to the paging >central to 300 baud (GAG ACK BARF!) fixed it. I've not taken out the sleeps, >(hate to break a working system!) but I've seriously considered it. > >If you are having problems and setting baud rate to 300 does not fix it, >let me know and I'll send you the locations of my sleeps. > >Finally - our pagers can handle up to 200+ characters in a single message (We've got >the Motorola (with an Airtouch label) pagers). However, it turns out that >you cannot send a 200+ character message through sendpage (due to added stuff, >the message size gets above the 256 byte PET limit (I assume its a PET limit, >given what I went through :-)). So, don't set your max pagelen much around >150 bytes (150 worked, 200 did not - so the actual limit is somewhere in between). > >In debugging THAT one, I added a bunch of 'message' calls, which REALLY helped >me see where the problem was. Again, if there is interest I can either post or >email my full context diffs from the release 7a baseline.... > >(at the very least, having a specific 'message(LOG_ERR' and return code for >'message too big' would be a Good Thing (tm :-) ) > >Hope that helps someone! > >rusty > >(And I'll say it REALLY helps to have the following when trying to figure out what's >worng (sic :-) - > > 1) another page sending program that you can try things with (we > had alfie jr for dos). > 2) a 'serial protocol analyzer' ($1 Million name for an RS232 grabber :-) > >You can set the SPA watching the 'good' page sending program (limit, about 200 chars), >see what it does, then try the same thing with sendpage....) > -- mark