# IrDA support CONFIG_IRDA=y CONFIG_IRLAN=m CONFIG_IRNET=m CONFIG_IRCOMM=m # CONFIG_IRDA_ULTRA is not set CONFIG_IRDA_OPTIONS=y CONFIG_IRDA_CACHE_LAST_LSAP=y # CONFIG_IRDA_FAST_RR is not set CONFIG_IRDA_DEBUG=y # Infrared-port device drivers CONFIG_IRTTY_SIR=m CONFIG_IRPORT_SIR=m # CONFIG_DONGLE is not set # CONFIG_USB_IRDA is not set # CONFIG_NSC_FIR is not set # CONFIG_WINBOND_FIR is not set # CONFIG_TOSHIBA_FIR is not set # CONFIG_SMC_IRCC_FIR is not set # CONFIG_ALI_FIR is not set # CONFIG_VLSI_FIR is not set
Reboot the system and load this modules:
insmod irport insmod ircomm insmod ircomm-tty
I can't find any infrared programs into Slackware's cd, so I download the source: you'd better check up your Linux cd-rom's
then, follow the instructions into INSTALL file and recompile.
To communicate with Motorola IrDA port I have to link the infrared port to a serial device (like ttyS1), so I can use the protocol that use the standard serial modems. Then I have to "attach" the infrared port to the device with "irattach", next I can scroll my cellphone's menu' to turn on the infrared link, and put the Motorola in front of the infrared port of the notebook.
Check if /dev/ircomm[n] exist: if not, let's create it with mknod, and link to the serial port (you must give "irattach" every time you reboot the system):
cd /dev mknod /dev/ircomm0 c 161 0 mknod /dev/ircomm1 c 161 1 irattach /dev/ttyS1You can check the log file by typing "tail /var/log/messages"; the result is like this:
... asus kernel: IrDA: Registered device irda0 asus irattach: Starting device irda0 asus irattach: executing: 'echo asus > /proc/sys/net/irda/devname'Using minicom to "communicate" with my modem...let's type:
minicom -sand into minicom menu...
[Configuration] Filenames and paths File transfer protocols Serial port setup Modem and dialing Screen and keyboard Save setup as dfl Save setup as.. Exit Exit from Minicom...select "Serial port setup" and be sure to set up the parameters like:
A - Serial Device : /dev/ircomm0 B - Lockfile Location : /var/lock C - Callin Program : D - Callout Program : E - Bps/Par/Bits : 38400 8N1 F - Hardware Flow Control : No G - Software Flow Control : No Change which setting?save with "Save setup as dfl", select "Exit from Minicom" and type "minicom", put the cellphone in front of notebook's IrDA port and automagically...you should see "atz": now you can use AT, ATZ, ATDT and connect with your ISP...
The next step is to prepare a simbolic link:
# cd /dev # ln -s /dev/ircomm0 /dev/modem # ls /dev/modem -la lrwxrwxrwx 1 root root 12 Jan 3 13:08 /dev/modem -> /dev/ircomm0
To run pppd:
#!/bin/sh #file: /home/lino/timeport.sh /usr/sbin/pppd /dev/modem 19200 connect "/usr/sbin/chat -v -f /etc/ppp/ti250.chat"
General configuration options:
#file: /etc/ppp/ti250.chat TIMEOUT 60 ABORT ERROR ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIALTONE" "" "ATZ" OK "atdt99999999" -> your ISP number... TIMEOUT 75 CONNECT
IrDA configuration:
#file: /etc/ppp/options.modem lock defaultroute noipdefault 19200 noauth passive bsdcomp 15,15 deflate 15,15 vj-max-slots 15 # il vostro nome utente va inserito qui! user "username" -> your username
Add this to /etc/ppp/pap-secrets: (obviously you have to change "username" and "password"!)
... "username" * "password"
To start a session, run ./timeport.sh; you can type "tail /var/log/messages" to check your "modem's" dialog...to disconnect, you have to find the pppd daemon's pid (with ps aux), and then kill the daemon with kill -9 [pid].
Choose "impostazioni" and add a new account with "Nuovo..."; the number is the ISP's number; normally the authentication is PAP
IP number and DNS is supplied by your Internet Service Provider:
leave any other information; into "dispositivo" section I have to set up the device name (/dev/modem) and the bps:
Now I can try to connect with my ISP and search some web site with Netscape or Mozilla...remember that you can use only 9600bps due to GSM limitations: it's slow but you don't need any telephone cable, so you can send an e-mail while you are having a bath...
The gsmlib packet (www.pxh.de) aim at:
I try the 1.7 version, but it doesn't compile, so I use v. 1.6: to install this pack you have to:
# tar xvfz gsmlib-1.6.tar.gz # cd gsmlib-1.6 # ./configure # make # make installthe programs are:
Next, let's start IrDA connection with Motorola Timeport:
# irattach /dev/ttyS1
That's all: now I can download my SIM's address book into a text file:
# gsmpb -b 19200 -d book.txt -s /dev/modem -p "SM"
you can also download the cellphone address book (see -p option); the fields are separated with "|". With this you can create a list of SMS messages:
# gsmsmsstore -b 19200 -s /dev/modem -t SM -l > messaggi.txt
the file looks like:
... index #x --------------------------------------- Message type: SMS-DELIVER SC address: '33333333333' More messages to send: 1 Reply path: 0 User data header indicator: 0 Status report indication: 0 Originating address: '3333333333' Protocol identifier: 0x0 Data coding scheme: default alphabet SC timestamp: 12/31/01 15:07:04 (+0100) User data length: 21 User data header: 0x User data: 'A STUPID TEXT MESSAGE...' ...
You can also send an SMS message with:
# gsmsendsms -d /dev/modem -b 19200 -C +393359609600 3333333333 "text..."
where the first number is your cell-phone's Service Center and the second one the receiver's number...it's powerful and so simply!!!