Hi Guys,
just got the Shibby Tomato on my router and it works much better than the Ausus Firware and DD-WRT :-) I have just a question regarding the Modem E3276 which works fine with NCM:
Jan 1 01:01:47 unknown kern.info kernel: cdc_ncm: usb0: 150 mbit/s downlink 150 mbit/s uplink
Jan 1 01:01:47 unknown kern.info kernel: cdc_ncm: usb0: network connection: connected
at some stage its gets disconnected but doesnt get connected again.
Jan 12 02:01:29 unknown kern.info kernel: cdc_ncm: usb0: network connection: disconnected
Is there a way to reconnect the modem automatically ? Or I need to write a script to tail the log and if disconnect run the connect script ?
Init-script:
sleep 2
switch3g
sleep 4
PRODUCT=`cat /tmp/3g.detect`
sleep 2
modprobe cdc_ncm
sleep 3
MODE="AT^NDISDUP=1,1,\"eradata\"" gcom -d /dev/ttyUSB0 -s /etc/gcom/setmode.gcom
sleep 3
service wan restart
Wielkie dzięki! :-)
Połączony z 12 January 2015 14:28:41:
fixed it:
2 scripts:
/jffs/reconnect
#!/bin/sh
sleep 10
#tail -F /var/log/messages | grep 'usb0: network connection: disconnected' | while read -r gValue; do /jffs/connect $gValue;done
tail -F /var/log/messages | while read line ; do
echo "$line" | grep "network connection: disconnected"
if [ $? = 0 ]
then
# Actions
sh /jffs/connect &
fi
done
/jffs/connect
#!/bin/sh
MODE="AT^NDISDUP=1,1,\"eradata\"" gcom -d /dev/ttyUSB0 -s /etc/gcom/setmode.gcom &
echo usb0: network connection: connected >> /var/log/messages &
so it searches for the disconnect of the modem and restarts the connection. It should work I guess.......
Edytowany przez speedy120581 dnia 12-01-2015 14:28
|