Thursday, May 7, 2009

Disable frequent hard disk spindown in Ubuntu

By default the hdparm settings in Ubuntu are not hardware friendly so some tuning might be needed to adjust your hard disc parameters. Example for this is the Load_Cycle_Count counter which usually gets increased once in a minute without heavy disc usage. Most of the manufacturers construct their disks with MTBF of 300,000 load cycles, so you might reach it within one year. You don't want to buy a new HDD once a year, don't you? Here is a fix.

Edit /etc/hdparm.conf and add the following section (replace /dev/sda with your actual device):

/dev/sda {
apm=254
spindown_time = 242
read_ahead_sect = 2
keep_settings_over_reset = on
}

Saturday, January 10, 2009

USSD Spec - Stage 2

Digital cellular telecommunications system (Phase 2+);
Unstructured Supplementary Service Data (USSD) - Stage 2

ETSI TS 100 549 V7.0.0 (1999-08)

USSD Spec - Stage 1

3rd Generation Partnership Project;
Technical Specification Group Services and System Aspects;
Unstructured Supplementary Service Data (USSD) - Stage 1
(Release 1999)
22090-310

SMPP protocol spec

SMPP V3.4 Specification - smpp_v3_4_issue1_21

Saturday, December 20, 2008

Globul 3G data connect

If you are staring at the sentence "Supported OS: Windows XP/Vista" on your 3G data device and have no clue how to get it working on Linux then this post might help you.

I got a ZTE MF632 device working under Ubuntu Hardy with KPPP.

  • Create a new file /etc/udev/rules.d/57-zte-net.rules and put the following in it





ACTION!="add", GOTO="ZTE_End"

# Is this the ZeroCD device?
SUBSYSTEM=="usb", SYSFS{idProduct}=="2000",
SYSFS{idVendor}=="19d2", GOTO="ZTE_ZeroCD"

# Is this the actual modem?
SUBSYSTEM=="usb", SYSFS{idProduct}=="0001",
SYSFS{idVendor}=="19d2", GOTO="ZTE_Modem"

LABEL="ZTE_ZeroCD"
# This is the ZeroCD part of the card, remove
# the usb_storage kernel module so
# it does not get treated like a storage device
RUN+="/sbin/rmmod usb_storage"

LABEL="ZTE_Modem"
# This is the Modem part of the card, let's
# load usbserial with the correct vendor
# and product ID's so we get our usb serial devices
RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0001",
# Make users belonging to the dialout group
# able to use the usb serial devices.
MODE="660", GROUP="dialout"

LABEL="ZTE_End"


  • Plug your device in the USB port. This should create three new devices /dev/ttyUSB0, /dev/ttyUSB1 and /dev/ttyUSB2. You now can use the first one to connect to the network.

  • Use your favourite PPP program to configure new connection.  Don't forget to set the following parameters:



Modem initialization string 2 = AT+CGDCONT=1,"IP","globul"
Phone = *99***1#
Username = globul
Password = globul

Friday, September 26, 2008

VMware && USB && Ubuntu ?

To be able to use USB devices with VMware guest OSes under Ubuntu Gutsy you have to uncomment lines 42-45 in /etc/init.d/mountdevsubfs.sh




mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb




Then conect with VM->Removable devices -> USB devices

Thursday, September 25, 2008

OpenSSL commands

Some useful openssl commands.

Check certificate details:



openssl  verify -verbose -issuer_checks server.crt



Generate new sertificate:



openssl req -new -x509 -days 365 -key server.key  -out server.crt



Check the modulus of an SSL certificate and key:



openssl rsa -noout -modulus -in server.key | openssl md5

openssl x509 -noout -modulus -in server.crt | openssl md5