| The tested card is a Novatel Wireless Merlin U530 (model NRM-U530). (I have tested an OEM version, known as Orange Mobile PC Card 3G ; support) |
This pcmcia card provides a serial port (module serial_cs) to communicate with the UMTS modem. The main difference with a regular modem is that you first have to type-in your pin code !
Actually, the card seems to provide two serial interfaces. I didn't tried to use the second one, as i don't need it (who would ?).
The easy way:
ls -d /sys/bus/pcmcia/devices/*/tty*
/sys/bus/pcmcia/devices/0.0/tty:ttyS0
Alternatively, you can use :
for x in $(hal-find-by-property --key 'info.category' --string 'serial'); do lshal -l -u $x ; done
udi = '/org/freedesktop/Hal/devices/pcmcia__1__1_0_serial_platform_0'
info.capabilities = {'serial'} (string list)
info.category = 'serial' (string)
info.parent = '/org/freedesktop/Hal/devices/pcmcia__1__1_0' (string)
info.product = 'Merlin UMTS Modem' (string)
info.udi = '/org/freedesktop/Hal/devices/pcmcia__1__1_0_serial_platform_0' (string)
linux.device_file = '/dev/ttyS0' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'tty' (string)
linux.sysfs_path = '/sys/class/tty/ttyS0' (string)
serial.device = '/dev/ttyS0' (string)
serial.originating_device = '/org/freedesktop/Hal/devices/pcmcia__1__1_0' (string)
serial.physical_device = '/org/freedesktop/Hal/devices/pcmcia__1__1_0' (string)
serial.port = 0 (0x0) (int)
serial.type = 'platform' (string)
It should be possible to implement a persistent naming (using udev, like it's done for cdrom, network interfaces, partitions...). i haven't tried though.
Before you can use this card, you need to type your SIM card's PIN. There are (at least) three ways, but remeber:
A red LED is blinking (quickly) until you type-in your PIN.
Install the package minicom, then run "minicom -s", then adjust the setting to pick the correct ttyS* port.
Then type the command "AT+CPIN=0000" (where 0000 is your PIN code).
Install the gcom package, then run
gcom -d /dev/ttyS0
Enter PIN number: 0000 Waiting for Registration..(120 sec max)...... Registered on Home network: Failed to register
Don't worry if it says "Failed to register" as long as the LED turns to blue.
If you re-run the above command, you should get something like :
SIM ready Waiting for Registration..(120 sec max) Registered on Home network: "Orange F",3 Signal Quality: 27,99
Again, don't worry if it "fails", it might actually be running fine (check with minicom if you want to be sure).
Even though it is possible to insert "AT+CPIN=0000" in ppp's chat script, i wouldn't recommend it : If you change your pin code later, you would lock you chip at the third connection attempt.
I won't explain how to setup the actual connection, since many websites explains it, like :
FYI, my /etc/ppp/peers/gprs
noauth connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs" debug /dev/ttyS0 460800 defaultroute noipdefault usepeerdns
and my /etc/chatscripts/gprs file.
# ispauth chat # abortstring ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED # modeminit '' ATZ #Add gprs specific stuffs. # Check SIM pin should return ready OK-AT-OK "AT+CPIN?" # Select APN OK ATE1 OK 'AT+cgdcont=1,"IP","orange"' # ispnumber OK-AT-OK "ATDT*99***1#" # ispconnect CONNECT '' # prelogin # end of pppconfig stuff
I have quickly tested different tools, which seemed to work :
...That it would be nice to have...
pccardctl ident
Socket 0: product info: "Novatel Wireless", "Merlin UMTS Modem", "NRM6831", "" manfid: 0x00a4, 0x1aaf function: 2 (serial)
pccardctl status
Socket 0: 5.0V 16-bit PC Card Subdevice 0 (function 0) bound to driver "serial_cs" Subdevice 1 (function 1) [unbound]
pccardctl ls
Socket 0 Bridge: [yenta_cardbus] (bus ID: 0000:15:00.0) Socket 0 Device 0: [serial_cs] (bus ID: 0.0) Socket 0 Device 1: [-- no driver --] (bus ID: 0.1)
pccardctl info
PRODID_1="Novatel Wireless" PRODID_2="Merlin UMTS Modem" PRODID_3="NRM6831" PRODID_4="" MANFID=00a4,1aaf FUNCID=2
lspcmcia -vv
Socket 0 Bridge: [yenta_cardbus] (bus ID: 0000:15:00.0) Configuration: state: on ready: yes Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V Available IRQs: 3, 4, 5, 6, 7, 10, 11 Available ioports: 0x00000100 - 0x000003af 0x000003e0 - 0x000004cf 0x000004d8 - 0x000004ff 0x00000820 - 0x000008ff 0x00000a00 - 0x00000aff 0x00000c00 - 0x00000cf7 0x00009000 - 0x0000cfff Available iomem: 0x000c0000 - 0x000fffff 0xe46d0000 - 0xe4e6ffff 0xe5240000 - 0xe5daffff 0xe6180000 - 0xe6ceffff 0xe70c0000 - 0xe7ffffff Socket 0 Device 0: [serial_cs] (bus ID: 0.0) Configuration: state: on Product Name: Novatel Wireless Merlin UMTS Modem NRM6831 Identification: manf_id: 0x00a4 card_id: 0x1aaf function: 2 (serial) prod_id(1): "Novatel Wireless" (0x32607776) prod_id(2): "Merlin UMTS Modem" (0xd9e73b13) prod_id(3): "NRM6831" (0xaf9c4d7f) prod_id(4): --- (---) Socket 0 Device 1: [-- no driver --] (bus ID: 0.1) Configuration: state: on Product Name: Novatel Wireless Merlin UMTS Modem NRM6831 Identification: manf_id: 0x00a4 card_id: 0x1aaf function: 2 (serial) prod_id(1): "Novatel Wireless" (0x32607776) prod_id(2): "Merlin UMTS Modem" (0xd9e73b13) prod_id(3): "NRM6831" (0xaf9c4d7f) prod_id(4): --- (---)
on insertion:
kernel: pccard: PCMCIA card inserted into slot 0 kernel: pcmcia: registering new device pcmcia0.0 kernel: pcmcia: registering new device pcmcia0.1 kernel: pcmcia: request for exclusive IRQ could not be fulfilled. kernel: pcmcia: the driver needs updating to supported shared IRQ lines. kernel: 0.0: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A kernel: pcmcia: bus_rescan_devices failed after allowing func_id matches NetworkManager: <debug> [1191150261.251115] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/pcmcia__1__1'). NetworkManager: <debug> [1191150261.253433] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/pcmcia__1__1_0'). NetworkManager: <debug> [1191150261.263719] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/pcmcia__1__1_serial_platform_0').
on ejection (removal)
kernel: pccard: card ejected from slot 0 NetworkManager: <debug> [1191147890.074154] nm_hal_device_removed(): Device removed (hal udi is '/org/freedesktop/Hal/devices/pcmcia__1__1'). NetworkManager: <debug> [1191147890.075927] nm_hal_device_removed(): Device removed (hal udi is '/org/freedesktop/Hal/devices/pcmcia__1__1_0'). NetworkManager: <debug> [1191147890.077720] nm_hal_device_removed(): Device removed (hal udi is '/org/freedesktop/Hal/devices/pcmcia__1__1_0_serial_platform_0').
If you have an error message like :
gcom -d /dev/ttyS0 gcom 15:40:35 -> -- Error Report -- gcom 15:40:35 -> ----> ^ gcom 15:40:35 -> Error @6, line 1, Can't control /dev/ttyS0, please try again.
Make sure the ttyS* port you try to use is the right one.
some
AT I Manufacturer: Novatel Wireless Incorporated Model: Merlin U530 (HW REV 1) Revision: 41.0-41.0 [2005-01-12 16:09:16] IMEI: 000000000000000 +GCAP: +CGSM,+ES AT +CGMI Novatel Wireless Incorporated OK AT +CGMM Merlin U530 (HW REV 1) OK AT +CGMR 41.0-41.0 [2005-01-12 16:09:16] OK AT+CIMI 123456789012345 AT+CPAS +CPAS: 0 OK AT+CPAS=? +CPAS: (0,3,4) AT+COPS? +COPS: 0,0,"Orange F",3
google for more "AT commands"... or wikipedia