I do own an UMTS mobile internet access stick. I got it to work using FreeBSD and ppp. I am currently train-travelling a lot, and the connection isn't always as stable as desirable. Unfortunately the LED on the stick is rather subtle in its messaging, so I turned my Thinkpad's ThinkLight (marketing name for yet another LED) into a classic flickers-on-data-transmission LED.

My UMTS Stick features a single led as user interface. It allows me to distinguish some states, but unfortunately it's very restricted as it does not allow for an estimation of the amount of data currently transferred.
Fortunately, the UMTS stick is used as one would do with a serial port, i.e., it is present as /dev/cuaU0.0 to my FreeBSD which is then used by ppp to connect. This virtual device can be used to get easy access on exchanged data: The FreeBSD "watch" command enables root to soop terminal lines. The command

# watch /dev/cuaU0.0
leads to every byte sent or received from the UMTS modem to be echoed to stdout. Now a light to flash is needed. I do still use my old IBM Thinkpad T60, featuring a LED mounted above the keyboard (early predecessor of keyboard backlight), called a "ThinkLight" by the PR folks. However, I can trigger it in software, using the acpi_ibm driver:
# kldload acpi_ibm
# sysctl dev.acpi_ibm.0.thinklight=1
# sysctl dev.acpi_ibm.0.thinklight=0
These three lines will initially load the acpi_ibm driver, then switch the light on, then switch it off. Next thing it needs is a coupling to a stdin, which makes the LED blink for every, say, 255, exchanged bytes:
sudo kldload acpi_ibm
while [ true ]
do
        read -n 255 abc
        sudo sysctl dev.acpi_ibm.0.thinklight=1>/dev/null ;  sudo sysctl dev.acpi_ibm.0.thinklight=0>/dev/null
done
The read command will read 255 chars from stdin, then return (after exporting them to the never used environment variable abc). Please note that the -n switch is only supported for the bash-builtin read, not the sh-builtin read. Next line however will make the LED flash. Final step is feeding this little script with the output of the watch cmd:
# sudo watch /dev/cuaU0.0 | bash ledflasherscript.sh

Stichworte:


Impressum