Search This Blog

Saturday, July 31, 2010

Plasma NM, modem Sony MD300 and more...

During the time I implemented ModemManager support in Solid I did the tests with my Sony MD300 modem. For anyone to use this modem in Linux do this as root (or use sudo):

  1. Install networkmanager-0.8 and modemmanager-0.4;
  2. Create the file /etc/udev/rules.d/50-md300modem.rules with the follwing contents:





    1. ACTION!="add", GOTO="3G_End"
    2. SUBSYSTEM=="usb_device", ATTRS{idProduct}=="d0cf", ATTRS{idVendor}=="0fce", PROGRAM+="md300modem.sh %p"
    3. SUBSYSTEM=="usb", ATTRS{idProduct}=="d0cf", ATTRS{idVendor}=="0fce", KERNEL=="ttyACM*", SYMLINK+="modem3G-%n"
    4. LABEL="3G_End"
    
  3. Create the script /lib/udev/md300modem.sh with the following contents:





    1. #!/bin/sh
    2. echo 3 > /sys/$1/device/bConfigurationValue
    3. sleep 3
    4. # enables/activates the modem (turns radio on and registers to operator network).
    5. chat -V -s '' "AT +CFUN=1" 'OK' '' < /dev/ttyACM0 > /dev/ttyACM0
  4. Run: udevadm control --reload-rules;
  5. Click on Plasma NM's system tray icon -> Manage Connections -> Mobile broadband  -> Add -> GSM Connection and use the parameters:





    Number: *99#
    Username: <operator's username>
    Senha: <operator's password>
    APN: <operator's apn>
    Type: Any
    For instance my configuration is as follow:
    Number: *99#
    Nome do usuário: tim
    Senha: tim
    APN: tim.br
    Type: Any
    
    OBS: some cell phones, like my Samsung i8910, only connects if "Type" is set to "Any". The MD300 connects with any of the types listed.
  6. Hook up the modem to the USB port, wait until it powers up and register itself to the operator network (takes about 30 seconds to do both);
  7. In the Plasma NM initial window clicks on the connection you have created.
My modem connects only once in ethernet mode (default mode), to connect again I have to remove it from USB port and hook it up again. I do not know why that happens and one guy told me his MD300 does not behave like that. Oddly enough with wvdial and kppp, which uses ppp mode, it does have this problem.

To make it easier to set up a Mobile Broadband connection I have started to port the nm-applet connection wizard to KDE. It is still in early stage and I am working on it only during weekends. Probably it will be ready for KDE release 4.6 early next year. The initial window is like this:



It takes some time to understand how both nm-applet wizard and Plasma NM kcm modue work and since I can only work on it during weekends do not expected something usefull until September.

2 comments:

Anonymous said...

This is the best thing to happen to Knetworkmanager since networkmanager itself i.e. a port of nm-applet's mobile connection wizard!

Anonymous said...

My God! Well and well!