Execute command before bringing interface up on OpenWRT
1
vote
1
answer
3290
views
I'm making a Wireless-to-3g router with openwrt, and its working pretty well. To bring the 3g-wan interface up, I have to first register the USB modem using the command:
gcom -d /dev/ttyUSB0
If I don't do this,
chat
will fail to establish connection with modem not registered
errors.
**My question**: Is there an option similar to pre-up
on Debian to execute things before bringing an interface up, and only bring this up after successfully reaching this condition? Why? Because putting the gcom
command on /etc/rc.local
seems not to work, and it isn´t elegant.
My current wan
interface configuration:
config interface 'wan'
# === Conexão com a 3G da tim
# option ifname ppp0
option ifname 3g-wan
option username tim
option password tim
option pincode XXXX
option proto 3g
option service umts
option device /dev/ttyUSB0
option dialnumber '*99***1#'
option apn tim.br
This solution must have an out-of-the-box experience because, after configured we deliver those boxes to users to create "remote offices" on distant places.
Asked by user34720
Dec 22, 2015, 04:37 PM
Last activity: Feb 6, 2018, 06:28 PM
Last activity: Feb 6, 2018, 06:28 PM