Archive for the ‘English’ Category

SFR Huawei 3G+ USB key with Debian

Wednesday, July 29th, 2009

After Orange GPRS with Nokia 6630 and SFR GPRS with Nokia E65, I use now mainly Huawei 3G+ USB key with SFR (french mobile phone provider).

lsusb info about this Huawei 3G+ USB key:

Bus 003 Device 003: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem

And dmesg info:

[208765.818448] option 3-1:1.0: GSM modem (1-port) converter detected
[208765.818448] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB3
[208765.830451] usb-storage: probe of 3-1:1.1 failed with error -5
[208765.830451] option 3-1:1.1: GSM modem (1-port) converter detected
[208765.830451] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB4
[208765.830502] scsi12 : SCSI emulation for USB Mass Storage devices
[208765.834458] usb 3-1: New USB device found, idVendor=12d1, idProduct=1003
[208765.834458] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[208765.834458] usb 3-1: Product: HUAWEI Mobile
[208765.834458] usb 3-1: Manufacturer: HUAWEI Technologies
[208765.834458] usb-storage: device found at 3
[208765.834458] usb-storage: waiting for device to settle before scanning
[208770.863868] usb-storage: device scan complete
[208770.866850] scsi 12:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[208770.887881] sr0: scsi-1 drive
[208770.887881] sr 12:0:0:0: Attached scsi CD-ROM sr0
[208770.887881] sr 12:0:0:0: Attached scsi generic sg1 type 5

For connecting, I tried an infamous GUI distributed by Vodafone in Debian package. Too buggy, too complex. The best solution is using a PPP chatscript.

Then, plug USB key, sleep 20 and unlock it:

echo 'at+cpin="1234"' > /dev/ttyUSB3

Note: 1234 is PIN code (or not) and /dev/ttyUSB3 is modem device.

Create these 2 files:

/etc/ppp/peers/gprs:

noauth
debug
nodetach
connect "/usr/sbin/chat -v -f /etc/ppp/peers/huawei-e220.chat"
/dev/ttyUSB3
230400
crtscts
defaultroute
noipdefault
user ignored
remotename whatever
ipparam whatever
usepeerdns

/etc/ppp/peers/huawei-e220.chat:

# Chat file for Huawei E220 HSDPA USB modem
ABORT BUSY ABORT 'NO CARRIER' ABORT 'NO ANSWER' ABORT DELAYED
'' AT
OK ATZ
OK 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'
OK 'AT+CGDCONT=1,"IP","websfr"'
OK ATDT*99***1#
CONNECT ""

Finally you can:

pppd call gprs

New GPG key

Monday, May 11th, 2009

With last attacks against SHA-1 digest algo, I create a new GPG key (following instructions from Daniel Kahn Gillmor):

pub   4096R/B8612B5D 2009-05-10
uid                  Gregory Colpart <reg@gcolpart.com>
uid                  Gregory Colpart (Evolix) <reg@evolix.fr>
uid                  Gregory Colpart <reg@debian.org>
sub   4096R/7D40310B 2009-05-11

A good excuse for beer^Wkey exchange next weeks :-)

Migration from GNU Arch to Git for Horde packages

Sunday, May 3rd, 2009

All Horde packages (horde3, imp4, kronolith2…) were in GNU Arch repository. After Lenny release, we decided to migrate to Git. Git has a lot cool features, and I was convinced by Pierre Habouzit talk about Packaging with Git. Technically, I used git-archimport to keep all history of packaging. Each package has a Git repository with some branches: upstream, upstream+patches, upstream+repack (if needed), pristine-tar, debian-sid (imported from GNU Arch) and debian-<release>. The hardest step was to set up a common ancestor for debian-sid and upstream branches: I found git-merge-unrelated-branch script to do it automagically. I write guidelines for packaging Horde with Git on Debian Wiki with some notes about migration from GNU Arch to Git. Comments welcome!

Delete facsimileTelephoneNumber attribute

Wednesday, February 4th, 2009

ldapvi is so wonderful. No Java/Python/PHP for “browsing” LDAP trees and the power of vi for LDAP administration. Nevertheless, today I had difficulty for deleting a facsimileTelephoneNumber attribute:

$ ldapvi
Action? [yYqQvVebB*rsf+?] y
ldap_modify: Inappropriate matching (18)
additional info: modify/delete: facsimileTelephoneNumber: no equality matching rule

Here is the LDIF change tried by ldapvi:

dn: uid=foo,ou=people,dc=evolix,dc=net
changetype: modify
delete: facsimileTelephoneNumber
facsimileTelephoneNumber: 0000

After a little search on the web, I find the reason on openldap-bugs list archives:

Since the schema definition of facsimileTelephoneNumber has no matching rule
defined, the only modifications you can make are Replace or Delete w/ no
values.

facsimileTelephone attribute actually doesn’t have SYNTAX definition. See in core.ldif file:

Number olcAttributeTypes: ( 2.5.4.23 NAME ( 'facsimileTelephoneNumber' 'fax' )
  DESC 'RFC2256: Facsimile (Fax) Telephone Number'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.22 )

By default, ldapvi tries to delete a specific value (even if there is only one value) for an attribute. But according documentation, it’s impossible to delete only one of values for facsimileTelephoneNumber attribute!

Note: for deleting all values of facsimileTelephoneNumber attribute, the LDIF change must be:

dn: uid=foo,ou=people,dc=evolix,dc=net
changetype: modify
delete: facsimileTelephoneNumber

Set up IPv6 in Xen domU with nat-mode

Sunday, January 11th, 2009

I have a Xen dom0 with nat-mode and IPv6 enabled. Set up IPv6 in Xen domU is like a classical IPv6 network: add IPv6 addresses on vif interfaces on dom0 and IPv6 addresses on domU (manually or with radvd on dom0). The only tip is how adding IPv6 addresses on vif interfaces which are dynamically created by Xen. Here is my dirty hack to do it on /etc/xen/scripts/vif-nat file:

        [ "$dhcp" != 'no' ] && dhcp_up
        +# Add IPv6 addresses
        +[ "$vif_ip" = '192.168.0.1' ] && ifconfig "$vif" add 2001:6f8:143d:1::101:1234/64
        +[ "$vif_ip" = '192.168.0.2' ] && ifconfig "$vif" add 2001:6f8:143d:2::101:1234/64
        ;;
    offline)

Where $vif_ip is the IP address from domU configuration : vif=['ip=192.168.0.1].

I think the best solution is adding ipv6 option to domU configuration. I will consider to open a wishlist bug for that.

History of my NM application

Wednesday, September 10th, 2008

I apply (2007-07-26)
I am advocated (2007-07-26)
Mail from FD(myon) (2007-08-12)
I reply (2007-08-15)
FD(myon) says OK (2007-08-17)
AM assigned (2007-12-05)
First mails from my AM(white) (2007-12-06)
ID check done (2007-12-07)
P&P1 check done (2007-12-21)
P&P2 check done (2008-01-17)
T&S1 check done (2008-05-04)
T&S2 check done (2008-05-13)
AM report (2008-05-13)
FD(wouter) check done (2008-07-23)
DAM(myon) approval (2008-09-03)
Account created by DSA(weasel)  (2008-09-08)
Debian Beer/Pastis Party in Marseille (2008-09-15)

Thanks to all Debian people in particular opal, lmamane, white, madcoder, myon, wouter and weasel.

No /dev/net/tun in xen Linux domU

Wednesday, August 20th, 2008

No persistent /dev/net/tun in xen Linux domU… Hacky workaround is adding

mkdir /dev/net && mknod /dev/net/tun c 10 200

while booting (for example in rc.local or in your init.d script which need it).

For example tun device is useful for SSH VPN. Without it, you will have errors like:

channel 0: open failed: administratively prohibited: open failed

SFR GPRS with Debian

Wednesday, August 6th, 2008

I use Nokia E65 phone and SFR (french mobile phone provider). Note there is at least two possibilities for access: wapsfr (for WAP browsing and AFAIK illimited) and websfr (less restricted but with high-cost level). I will only speak about wapsfr here. For connecting, it’s the same method like Orange SFR with Debian excepted you set wapfr instead of orange.fr in /etc/ppp/peers/gprs-wvdial.conf file. Then you are now connected but access seems restricted to 80 and 443 ports via proxy (NetApp/6.0.7 NetCache appliance announced by HTTP headers). For HTTP browsing, you must change your User-Agent to Vodafone/1.0/HTC_Mercury/1.23.163.5/Mozilla/4.0 for HTTP browsing. Of course, no problem for HTTPS browsing. And for SSH (for example SSH tunnel to have a full Internet access), you can use corkscrew and a SSH server reachable on tcp/443 to bypass the proxy. Just “apt-get” it and launch:

ssh -o "ProxyCommand /usr/bin/corkscrew %h %p %h %p" -p 443 login@your_ssh_server

Set charset in XML_RSS

Tuesday, April 22nd, 2008

I wrote a quick hack for setting charset in PEAR/XML_RSS 0.9.2 (so annoying bug)… and I discovered a similar patch in PEAR bug 2782 :-) and also that beta versions (PEAR/XML RSS >= 0.9.9) fixed it. Note that you need this feature to use ISO8859-1 feed with PEAR/XML_RSS on “UTF8 by default” system (like standard installation of Debian Etch for example).

Hack to have share items from Google reader in Wordpress

Monday, April 7th, 2008

I migrate my blog to Wordpress 2.5 and there is a cool feature: widget to have a feed in the sidebar. In the same time, I use now Google reader and I have the possibility to share blog entries with friends: when I find a nice blog entry, I tag it Share and Google reader aggregates all my favorite posts. Unfortunately RSS parser of Wordpress is buggy with this Atom feed from Google reader. You can find a description of the problem in Wordpress forum (titles and links are incorrect because Atom feed could have many tags per item). I write a dirty hack to correct this problem and now you can find “My blogosphere” on the right of my blog.