08/12/96, 4FAX# 5735 Detail Setup pcmcia Modem Cards SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. +----------------------------------------------------------+ | | | NOTE: The information in this document has NOT been | | verified for AIX 4.1. | | | +----------------------------------------------------------+ ABOUT THIS DOCUMENT The following files are included in this mailing and should be separated upon saving: 1. Readme 2. attr.NEW.IBM 3. attr.NEW.MHz 4. modem28 IMPORTANT NOTE: Make a copy of the following odm database files before running the scripts: /etc/objrepos/PdAt /etc/objrepos/PdCn /etc/objrepos/PdDv THE README FILE ##################################################### "modem 28" script configures IBM or MegaHertz PCMCIA cards. It installs and configures the necessary drivers, creates an entry in ODM. Date Written 3-13-96 IBM PC Compnay HelpCenter 3039 Cornwallis Road RTP, NC 27709 ##################################################### To be able to run this script: 1. Make sure that you have an AIX 4.1.4 CDROM Detail Setup pcmcia Modem Cards 1 08/12/96, 4FAX# 5735 2. Your Operating System is at 4.1.4 3. You have root priviledges on the machine 4. Create a modem directory in your /tmp filesystem mkdir -p /tmp/modem 5. Make sure that you have 3 files in this direcotory. 6. ie: In /tmp/modem you should have the following files: o attr.NEW.IBM o attr.NEW.MHz o modem28 7. ensure that the modem28 file has execute permission chmod 744 modem28 THE ATTR.NEW.IBM FILE PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "bus_io_addr" deflt = "0x3f8" values = "0x2f8,0x3f8,0x2e8,0x3e8" width = "0x08" type = "O" generic = "D" rep = "nl" nls_index = 3 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "modem_type" deflt = "1" values = "1" width = "" type = "R" generic = "" rep = "nl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "bus_intr_lvl" deflt = "9" values = "5,7,9,11" width = "" Detail Setup pcmcia Modem Cards 2 08/12/96, 4FAX# 5735 type = "I" generic = "D" rep = "nl" nls_index = 5 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "intr_priority" deflt = "2" values = "1,2" width = "" type = "P" generic = "D" rep = "nl" nls_index = 6 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "frequency" deflt = "115200" values = "115200" width = "" type = "R" generic = "" rep = "nl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "driver" deflt = "pcrsdd" values = "pcrsdd" width = "" Detail Setup pcmcia Modem Cards 3 08/12/96, 4FAX# 5735 type = "R" generic = "" rep = "sl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "pcmcia_devid" deflt = "2002,0xa4003900" values = "" width = "" type = "R" generic = "" rep = "s" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "pm_dev_att" deflt = "0x00600000" values = "0x00600000" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "pm_dev_itime" deflt = "0" values = "0" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "pm_dev_stime" deflt = "0" values = "0" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "load_module" deflt = "/usr/lib/methods/isaload" Detail Setup pcmcia Modem Cards 4 08/12/96, 4FAX# 5735 values = "/usr/lib/methods/isaload" width = "" type = "E" generic = "" rep = "sl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "rtrig" deflt = "3" values = "0-3,1" width = "" type = "E" generic = "DU" rep = "nr" nls_index = 11 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "tbc16" deflt = "16" values = "1-16,1" width = "" type = "E" generic = "DU" rep = "nr" nls_index = 10 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "speed" deflt = "9600" values = "0,50,75,110,134,150,200,300,600,1200,1800,2400,4800,9600,19200,38400" width = "" type = "E" generic = "DU" rep = "slm" nls_index = 12 PdCn: uniquetype = "adapter/pcmcia/a4003900" connkey = "rs232" connwhere = "s" PdDv: type = "a4003900" class = "adapter" subclass = "pcmcia" prefix = "sa" devid = "" base = 0 has_vpd = 0 detectable = 1 chgstatus = 0 bus_ext = 0 fru = 2 led = 2086 setno = 151 msgno = 2 catalog = "devices.cat" DvDr = "pcmcia/pcrsdd" Define = "/usr/lib/methods/define_rspc" Configure = "/usr/lib/methods/cfgpcasync" Change = "/usr/lib/methods/chggen_rspc" Detail Setup pcmcia Modem Cards 5 08/12/96, 4FAX# 5735 Unconfigure = "/usr/lib/methods/ucfgpcasync" Undefine = "/usr/lib/methods/undefine" Start = "" Stop = "" inventory_only = 0 uniquetype = "adapter/pcmcia/a4003900" THE ATTR.NEW.MHZ FILE PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "bus_io_addr" deflt = "0x3f8" values = "0x2f8,0x3f8,0x2e8,0x3e8" width = "0x08" type = "O" generic = "D" rep = "nl" nls_index = 3 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "modem_type" deflt = "1" values = "1" width = "" type = "R" generic = "" rep = "nl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "bus_intr_lvl" deflt = "9" values = "5,7,9,11" width = "" type = "I" generic = "D" rep = "nl" nls_index = 5 PdAt: uniquetype = "adapter/pcmcia/02010000" Detail Setup pcmcia Modem Cards 6 08/12/96, 4FAX# 5735 attribute = "intr_priority" deflt = "2" values = "1,2" width = "" type = "P" generic = "D" rep = "nl" nls_index = 6 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "frequency" deflt = "115200" values = "115200" width = "" type = "R" generic = "" rep = "nl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "driver" deflt = "pcrsdd" values = "pcrsdd" width = "" type = "R" generic = "" rep = "sl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "pcmcia_devid" deflt = "2002,0x02010000" values = "" width = "" type = "R" generic = "" rep = "s" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "pm_dev_att" deflt = "0x00600000" values = "0x00600000" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "pm_dev_itime" deflt = "0" values = "0" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" Detail Setup pcmcia Modem Cards 7 08/12/96, 4FAX# 5735 attribute = "pm_dev_stime" deflt = "0" values = "0" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "load_module" deflt = "/usr/lib/methods/isaload" values = "/usr/lib/methods/isaload" width = "" type = "E" generic = "" rep = "sl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "rtrig" deflt = "3" values = "0-3,1" width = "" type = "E" generic = "DU" rep = "nr" nls_index = 11 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "tbc16" deflt = "16" values = "1-16,1" width = "" type = "E" generic = "DU" rep = "nr" nls_index = 10 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "speed" deflt = "9600" values = "0,50,75,110,134,150,200,300,600,1200,1800,2400,4800,9600,19200,38400" width = "" type = "E" generic = "DU" rep = "slm" nls_index = 12 PdCn: uniquetype = "adapter/pcmcia/02010000" connkey = "rs232" Detail Setup pcmcia Modem Cards 8 08/12/96, 4FAX# 5735 connwhere = "s" PdDv: type = "02010000" class = "adapter" subclass = "pcmcia" prefix = "sa" devid = "" base = 0 has_vpd = 0 detectable = 1 chgstatus = 0 bus_ext = 0 fru = 2 led = 2086 setno = 151 msgno = 2 catalog = "devices.cat" DvDr = "pcmcia/pcrsdd" Define = "/usr/lib/methods/define_rspc" Configure = "/usr/lib/methods/cfgpcasync" Change = "/usr/lib/methods/chggen_rspc" Unconfigure = "/usr/lib/methods/ucfgpcasync" Undefine = "/usr/lib/methods/undefine" Start = "" Stop = "" inventory_only = 0 uniquetype = "adapter/pcmcia/02010000" THE MODEM28 FILE #!/usr/bin/ksh # ########################################################### # This is script configures an IBM or MegaHertz PCMCIA cards. # Also, this script is specific to ONLY 28.8 Data/Fax cards. # Reason for this is that each PCMCIA card is hardwired with # a unique Manufacturer ID. This script, for the most part, # would install (if already not installed) the device driver # from the AIX 4.1.4 CD. It then attemps to configure the # PCMCIA card. ############################################################# ############################################################# # Requirement to run this script: # 1) HAVE AIX 4.1.4 CDROM # 2) HAVE THE ROOT PRIVILEDGES # 3) Have either IBM or MegaHertz PC card ############################################################# ############################################################# # Script courtesy of the PC Company HelpCeter, RTP, NC # Script Created: March 13, 1996 Detail Setup pcmcia Modem Cards 9 08/12/96, 4FAX# 5735 ############################################################# USER= whoami OS= oslevel ODMSUCCESSFUL=FALSE if [ "$USER" != "root" ] || [ "$OS" != "4.1.4.0" ] then clear echo 'Cannot run this script!!' echo "Either you are NOT logged in as root OR" echo "You are at an earlier level of AIX then 4.1.4" echo "Exiting..." exit 1 fi /usr/bin/clear function header { echo " +=========================================+" echo " | IBM PC COMPANY HELPCENTER |" echo " | This script configures an UNSUPPORTED |" echo " | IBM PCMCIA 28.8(V.34)/14.4 Kbs |" echo " | Data/FAX Modem |" echo " | Part Number: 25H6420 |" echo " | OR |" echo " | MegaHertz 28.8/14.4kbps Data/Fax |" echo " | on AIX 4.1.4.0 |" echo " +=========================================+" }; header echo "======================================================" echo "Please use this script with the following understanding:" echo "IBM WILL NOT BE RESPONSIBLE FOR DAMAGES OF ANY KIND" echo "RESULTING FROM ITS USE. THE USE OF THIS INFORMATION" echo "IS THE SOLE RESPONSIBILITY OF THE CUSTOMER AND DEPENDS" echo "ON THE CUSTOMER'S ABILITY TO EVALUATE AND INTEGRATE" echo "THIS SCRIPT INTO THE CUSTOMER'S OPERATIONAL ENVIRONNMENT" echo "" echo "====================================================" echo "This script has been tested with ONLY IBM & Megahertz" echo "28.8 PCMCIA cards. During the test, configuration of" echo "The above PC cards were successful. This, however, doesn't" echo "imply any implicit or explicit guarentee that the cards" echo "would configure in all the possible environments." echo "" echo "====================================================" echo "Continue with modem config./install. (y/n)? \c" read ANSWER if [ "$ANSWER" = "y" ] || [ "$ANSWER" = "Y" ] then echo "" echo "1) Make sure that AIX 4.1.4 CDROM is in the Drive." echo "2) Make sure that PCMCIA (28.8) Card is in the Slot." echo "Press >>>>CONTROL+C<<<< to exit script if the above" echo "device and the media" Detail Setup pcmcia Modem Cards 10 08/12/96, 4FAX# 5735 echo "is not already in the machine." fi if [ "$ANSWER" = "y" ] || [ "$ANSWER" = "Y" ] then # the following two lines should read as one if [ ! -f /tmp/modem/attr.NEW.IBM ] || [ ! -f /tmp/modem/attr.NEW.MHz ] then echo "Error in finding script library files." echo "Exiting script without any confiuguration." exit 1 fi echo "Enter What Modem Type You are using," echo "IBM or MHz.(ibm/mhz) Modem Type? \c" read MODEMTYPE # the following two lines should appear on one line. if [ "$MODEMTYPE" != "ibm" ] && [ "$MODEMTYPE" != "mhz" ] then echo "Error. Incorrect Modem Type Entered." echo "Exiting..." exit 1 else echo "" echo "MAKE SURE THAT THE " echo "1) MODEM IS IN THE PCMCIA SLOT." echo "2) MODEM IS INSERTED PROPERLY." echo 'PRESS >>>control+C<<< if the card is NOT already' echo "in the slot and then Re-Run this script." echo "Sleeping for 7 seconds..." sleep 7 fi fi if [ "$ANSWER" = "y" ] || [ "$ANSWER" = "Y" ] then clear header echo "" echo "====================================" echo "Check, Verify Device Driver Routine." echo "====================================" if [ -d /usr/lpp/devices.pcmcia.a4001d00 ] then echo "You already have the Needed Modem Driver Installed." echo "Now all we have to do is to configure it." echo "Sleeping for 10 seconds..." sleep 10 else echo "Modem Device Driver NOT installed." echo "Ensure that AIX 4.1.4 CDROM is in the CDROM Drive." Detail Setup pcmcia Modem Cards 11 08/12/96, 4FAX# 5735 echo "Waiting for 10 seconds..." sleep 10 echo "Driver Installation Initiated." /usr/lib/instl/sm_inst installp_cmd -T iems -L -q -a -d # the following two lines should read as one. '/dev/cd0' -o '4.1.3.0 devices.pcmcia.a4001d00 ALL @@devices.pcmcia.a40 01d00' '-c' '-N' '-g' '-X' '-G' sleep 10 if [ $? = 0 ] then echo "Installation Complete and Successful.." echo "Sleeping for 10 secs..." sleep 10 else echo "Installation Encountered a Problem.." echo "Sleeping for 5 seconds..." sleep 5 echo "Aborting..." exit 1 fi fi echo "" clear header echo "" echo "====================================" echo " RETRIEVE Device Attribute Routine. " echo "====================================" echo "" echo "Next, device attribute for a4002900 will be RETRIEVED." echo "" echo "Saving Original Device Attributes to /tmp/attrs.ORIG" echo "" /usr/bin/odmget -q "uniquetype=adapter/pcmcia/a4001d00" PdAt > /tmp/attrs.ORIG /usr/bin/odmget -q "uniquetype=adapter/pcmcia/a4001d00" PdCn >> /tmp/attrs.ORIG /usr/bin/odmget -q "uniquetype=adapter/pcmcia/a4001d00" PdDv >> /tmp/attrs.ORIG DATA=`/usr/bin/du -a /tmp/attrs.ORIG | awk '{print $1}'` if [ "$DATA" = 0 ] then echo "There were no attributes defined in the" echo "ODM for the device." else echo "There were no attributes defined in the" echo "ODM for the device." fi echo "The value of ODM DATA is $DATA " echo "Retrieval Done..." echo "Sleeping for 10 seconds." sleep 10 clear header echo "" echo "====================================" echo " DELETE Device Attribute Routine. " echo "====================================" echo "" echo "Next, device attribute for a4002900 will be DELTED from ODM." echo "" /usr/bin/odmdelete -q "uniquetype=adapter/pcmcia/a4001d00" -o PdAt Detail Setup pcmcia Modem Cards 12 08/12/96, 4FAX# 5735 /usr/bin/odmdelete -q "uniquetype=adapter/pcmcia/a4001d00" -o PdAt /usr/bin/odmdelete -q "uniquetype=adapter/pcmcia/a4001d00" -o PdAt echo "" echo "Done deleting all the attributes from the ODM database." echo "Sleeping for 10 seconds..." sleep 10 clear header echo "" echo "====================================" echo " ReGenerate Device Attribute in ODM " echo "====================================" echo "Earlier you had selected your MODEM TYPE to be: $MODEMTYPE" echo "Now Creating an ODM entry for $MODEMTYPE modem." if [ "$MODEMTYPE" = "ibm" ] then /usr/bin/odmadd /tmp/modem/attr.NEW.IBM if [ $? = 0 ] then echo "ODM Entry Successful." ODMSUCCESSFUL=TRUE sleep 6 else echo "Error in Creating Entry in ODM." echo "Critical Error." if [ "$DATA" != 0 ] then echo "Now restoring back the original odm information.." echo "Please wait..." sleep 7 /usr/bin/odmadd /tmp/attrs.ORIG if [ $? = 0 ] then rm -f /tmp/attrs.ORIG fi sleep fi echo "Aboring script" exit 1 fi fi if [ "$MODEMTYPE" = "mhz" ] then /usr/bin/odmadd /tmp/modem/attr.NEW.MHz if [ $? = 0 ] then echo "Entry Successful." ODMSUCCESSFUL=TRUE sleep 6 Detail Setup pcmcia Modem Cards 13 08/12/96, 4FAX# 5735 else echo "Error in Creating Entry in ODM." echo "Critical Error." echo "Aboring script" exit 1 fi fi echo "" if [ "$ODMSUCCESSFUL" = "TRUE" ] then echo "Since the ODM entry was successful..the script" echo "will now attempt to see if the Operating System Will" echo "recognize the PCMCIA card.." /usr/sbin/cfgmgr if [ $? = 0 ] then CARD=`lscfg|grep -i modem| awk '{print $4,$5,$6,$7,$8}'` echo "" echo "============================================" echo ' Congratulations!!!! ' echo "" echo "Looks like the confiuration was successful." echo "" echo "Card: $CARD." echo "============================================" sleep 5 else echo "AIX, for some odd reason was not able to recognize" echo "you PCMCIA Card." fi fi echo "All done..." echo "Modem driver has been Installed and Configured." echo "" echo "NOTES:" echo "During the initialization and configuration of your modem," echo "some device attributes files were saved to the temporary" echo "directory. In most cases you will NOT need these files," echo "unless you know that you have a specific/known reason to" echo "save them." echo "Do you want to DELETE these files? (y/n)\c" read ANSWER2 if [ "$ANSWER2" = "y" ] || [ "$ANSWER2" = "Y" [ then echo "Deleting Original Configuration files." /usr/bin/rm -f /tmp/attrs.ORIG echo "Deleted files." echo "ALL DONE." fi else echo "You selected NOT to run this configuration for the answer..." echo "Script Aborting...." fi # *********************** END OF SCRIPT *********************** Detail Setup pcmcia Modem Cards 14 08/12/96, 4FAX# 5735 READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: Name: Fax Number: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ END OF DOCUMENT (pcmcia.zap, 4FAX #5735) Detail Setup pcmcia Modem Cards 15