As usually, laconic post.
What is chan_dongle? It is driver for asterisk PBX, allowing to use some Huawei 3G USB dongles like voice board to transmit voice, SMS and USSD. Just think about your own self-made GSM gateway.
- Get compatible USB modem;
- To check is modem have voice function and not locked, use DC-Unlocker software;
- Unlock modem if needed (it’s locked to operator and you have SIM card from other operator). Check unlock instructions and resources;
- (optional step) if according to the DC-Unlocker, modem has no voice function, or you had issues with further configuration steps, try to upgrade firmware.
- Download Raspberry-asterisk, flash it to 4GB SD card (instructions on their website, below how I did that on OSX):
mount - find your card (disk1 in my case) diskutil unmountDisk /dev/disk1 sudo dd if=raspbian_wheezy_20120608.img of=/dev/rdisk1 bs=1m
Power on Raspberry Pi, find its ip address, ssh and:
- Upgrade system
- Install necessary software:
apt-get install usbutils unzip autoconf automake # compile USB-modeswitch cd /usr/src/ wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-1.2.5.tar.bz2 wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20121109.tar.bz2 tar -jxvf usb-modeswitch-1.2.5.tar.bz2 tar -jxvf usb-modeswitch-data-20121109.tar.bz2 cd usb-modeswitch-1.2.5 make all make install cd ../usb-modeswitch-data-20121109 make install cd ..
- Now plug (if plugged, eject and plug) Huawei USB stick and check
lsusb | grep Huawei
You should see:
Bus 001 Device 005: ID 12d1:140c Huawei Technologies Co., Ltd.
- Now switch USB-stick to the modem mode. Values foe
-pflags I get from previous step and value for
-Mflag, I get from google search for my brand.
usb_modeswitch -v 0x12d1 -p 0x140c -H -s 5 -M 55534243000000000000000000000011060000000000000000000000000000
- Download and install chan_dongle:
wget https://github.com/jstasiak/asterisk-chan-dongle/archive/asterisk11.zip unzip asterisk11.zip cd asterisk-chan-dongle-asterisk11/ aclocal autoconf automake -a ./configure make all make install cp etc/dongle.conf /etc/asterisk/ cp /etc/extensions.conf /etc/asterisk/extensions-dongle.conf
- Restart Asterisk PBX and check modem status:
asterisk -rx "core restart now" # done, checking devices asterisk -rx "dongle show devices"
You should see something like this:
# *CLI> dongle show devices # ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number # dongle0 0 Free 2 0 0 Yoigo E1762 11.126.13.00.00 xxxx yyy Unknown # *CLI>
Done, next step is configuration of your GSM gateway, I will write another post about this. Still playing with device. Quality is good, better than I get with Portech GSM gateway and price per port is much better, plus can send and receive SMS and USSD.
Some useful links:
- Asterisk CLI commands to control dongle, some instructions;
- Another resource regarding dongle with Raspberry Pi;
- Useful resource about chan_dongle (in Russian language, use google translate);
- How to troubleshoot your Huawei modem.
If you would like to play with my system, download latest image here: j.mp/tinypbx. Standard flashing instructions: gunzip .gz file, insert SD card, flash with Linux DD command… This resource for example, describes flashing procedure quite well.