Skip to content

Instantly share code, notes, and snippets.

@ignisf
Last active February 16, 2019 06:44
Show Gist options
  • Save ignisf/9901826 to your computer and use it in GitHub Desktop.
Save ignisf/9901826 to your computer and use it in GitHub Desktop.
FreeBSD MPD5 Configuration for Mtel HUAWEI 3g Modem
startup:
# configure mpd users
set user foo bar admin
set user foo1 bar1
# configure the console
set console self 127.0.0.1 5005
set console open
# configure the web server
set web self 0.0.0.0 5006
set web open
#
# Default configuration is "dialup"
default:
load mtel
mtel:
create bundle static mtel
set bundle links B-Link
set bundle enable ipcp
set bundle enable ipv6cp
set bundle enable compression
set bundle enable encryption
set ipcp ranges 0.0.0.0/0 10.0.0.1/0
set iface route default
set iface enable nat
create link static B-Link modem
set link action bundle mtel
set modem device /dev/cuaU0.0
set modem speed 921600
set modem script dial-mtel
set auth authname mtel
set auth password mtel
set link keep-alive 6 60
set link max-redial 0
open
dial-mtel:
print 'AT+CGDCONT=1,"IP","inet-gprs.mtel.bg"\r\n'
match OK
print "ATDT*99#\r\n"
match CONNECTED
success
print 'AT'
match OK
print 'ATZ'
match OK
print 'AT+CPIN=0000'
match OK
print 'AT+CFUN=1'
match OK
print 'AT+CMEE=2'
match OK
print 'AT+CSQ'
match OK
print 'AT+CGDCONT=1,\\\"IP\\\",\\\"inet-gprs.mtel.bg\\\"'
match OK
print 'AT+CGACT?'
match OK
print 'AT+CGATT?'
match OK
print 'AT+CGCLASS?'
match OK
print 'AT+COPS?'
match OK
print 'ATD*99#'
match OK Connected
failure
Connected:
success
@ignisf
Copy link
Author

ignisf commented Mar 31, 2014

usb_modeswitch -v 0x12d1 -p 0x14fe -V 0x12d1 -P 0x1506 -s 20 -M "55534243123456780000000000000a11062000000000000100000000000000"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment