Yun, 3G dongle and yun_3g library

For everyone who has, like me, been struggling for ages to get the Huawei E303 to work on a
Yun, here's how i got it working : attach the dongle to the yun,

use lsusb to see normally this :

Bus 003 Device 008: ID 12d1:1f01 Huawei Technologies Co., Ltd.

root@Arduino:~# /usr/bin/curl -k https://raw.githubusercontent.com/pictux/Yun_3g/master/linino_set3g.sh -o /tmp/linino_set3g.sh
root@Arduino:~# /bin/chmod +x /tmp/linino_set3g.sh
root@Arduino:~# /tmp/linino_set3g.sh -p -a -d /dev/ttyUSB0

every needed file is installed this way , and the network connection is set up.

Create a file /etc/usb_modeswitch.conf and edit with :

#Huawei E303
DefaultVendor = 0x12d1
DefaultProduct = 0x1f01

Edit the file /etc/usb_modeswitch.d/12d1:1f01 :

#Huawei E303
DefaultVendor= 0x12d1
DefaultProduct= 0x1f01
TargetVendor= 0x12d1
RargetProduct= 0x1f01
MessageEndPoint = "0x01"
MessageContent="55534243000000000000000000000011060000000000000000000000000000"
NoDriverLoading=1

Reboot the system. Check with lusb to see this :

Bus 001 Device 009: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem

Your modem should be online if everything is configured ok (APN , PIN if needed etc..)

Hope i could help someone out with this information. I had been searching the net for over a week.