$(IPKG_COMGT):
install -d -m0755 $(IDIR_COMGT)/usr/bin
install -m0755 $(PKG_BUILD_DIR)/gcom $(IDIR_COMGT)/usr/bin/
+ install -d -m0755 $(IDIR_COMGT)/etc/ppp
+ install -m0755 ./files/wwan.connect $(IDIR_COMGT)/etc/ppp/wwan.connect
install -d -m0755 $(IDIR_COMGT)/etc/chatscripts
install -m0644 ./files/wwan.chat $(IDIR_COMGT)/etc/chatscripts/wwan.chat
install -d -m0755 $(IDIR_COMGT)/etc/gcom
install -m0644 ./files/getstrength.gcom $(IDIR_COMGT)/etc/gcom/getstrength.gcom
install -d -m0755 $(IDIR_COMGT)/sbin
install -m0755 ./files/ifup.wwan $(IDIR_COMGT)/sbin/
+ install -m0755 ./files/ifdown.wwan $(IDIR_COMGT)/sbin/
+ install -d -m0755 $(IDIR_COMGT)/etc/hotplug.d/iface
+ install -m0644 ./files/wwan.iface $(IDIR_COMGT)/etc/hotplug.d/iface/05-wwan
+ install -d -m0755 $(IDIR_COMGT)/etc/hotplug.d/button
+ install -m0644 ./files/wwan.button $(IDIR_COMGT)/etc/hotplug.d/button/01-wwan
$(RSTRIP) $(IDIR_COMGT)
$(IPKG_BUILD) $(IDIR_COMGT) $(PACKAGE_DIR)
--- /dev/null
+#!/bin/sh
+echo 0 > /proc/diag/led/3g_green
+echo 0 > /proc/diag/led/3g_blue
+echo 0 > /proc/diag/led/3g_blink
+killall pppd
MTU=$(nvram get wwan_mtu)
+ echo 0 > /proc/diag/led/3g_blue
+ echo 1 > /proc/diag/led/3g_green
+ echo 1 > /proc/diag/led/3g_blink
if PINCODE=$(nvram get wwan_pincode) gcom -d $wwan_device -s /etc/gcom/setpin.gcom; then
MODE="$MODE" gcom -d $wwan_device -s /etc/gcom/setmode.gcom
+ echo 0 > /proc/diag/led/3g_blink
/usr/sbin/pppd nodetach \
noaccomp \
nopcomp \
novj \
nobsdcomp \
noauth \
- connect /bin/true \
usepeerdns \
defaultroute \
replacedefaultroute \
$KEEPALIVE \
lock \
crtscts \
- connect "WWAN_APN=\"$APN\" /usr/sbin/chat -V -E -f /etc/chatscripts/wwan.chat" \
+ connect "WWAN_APN=\"$APN\" /etc/ppp/wwan.connect" \
460800 "$wwan_device"
else
echo "Wrong Pincode."
--- /dev/null
+[ "$ACTION" = "released" -a "$BUTTON" = "3g" ] && {
+ (echo /bin/true > /proc/sys/kernel/hotplug)
+
+ # use led for keeping track of the state
+ case "$(cat /proc/diag/led/3g_green)" in
+ 1)
+ ifdown wwan
+ ifup wan
+ ;;
+ 0)
+ ifdown wan
+ ifup wwan
+ ;;
+ esac
+ sleep 1
+
+ (echo /sbin/hotplug > /proc/sys/kernel/hotplug)
+}
--- /dev/null
+#!/bin/sh
+echo 1 > /proc/diag/led/3g_blue
+echo 1 > /proc/diag/led/3g_blink
+/usr/sbin/chat -V -E -f /etc/chatscripts/wwan.chat
--- /dev/null
+[ "$INTERFACE" = "wwan" ] && {
+ case "$ACTION" in
+ ifup)
+ echo 0 > /proc/diag/led/3g_blink
+ ;;
+ ifdown)
+ echo 0 > /proc/diag/led/3g_blue
+ echo 0 > /proc/diag/led/3g_green
+ echo 0 > /proc/diag/led/3g_blink
+ ;;
+ esac
+}