CrispinKay
Well-Known Member
Hey people of MyBB. Where can I buy a licence to upgrade a MikroTik board from V2 to V5?
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
The K3805-Z has an Icera chipset and uses a different AT command set to all the other ZTE modems.
I don't know anything about the K3772-Z.
It means it is going to take Mikrotik longer to add support for it than it did for the Huawei E372/Vodafone K4605 mentioned at the beginning of this thread.Does that mean it won't work or Mikrotik has to add support for it?
# Modem serial port is usb1 in this example #
:local usbPortName "usb1"
:log info "Starting USB port $usbPortName Inactive Check";
:if ([/port get [find name=$usbPortName] inactive]) do={
:log info "USB Port $usbPortName detected as inactive - System Rebooting";
/system reboot;
} else={
:log info "USB Port $usbPortName is Active";
}
:log info "USB port $usbPortName Inactive Check complete";
# Script to forward SMS from GSM Modem Inbox to Email #
# Note: The SMS is removed from the inbox after being sent to Email, #
# even if the Email fails to be sent #
# Remember to set up /Tools/SMS with the USB port of your #
# Modem and the info channel. Put anything in secret and #
# make sure Receive Enabled is ticked #
# Tested on Rb751U RouterOS v5.12 with Huawei E367 #
# Peter James 2012-04-04 #
:local EmailAddress "your_email_address";
:local smsPhone;
:local smsTimeStamp;
:local smsMessage;
:local smsContent;
# Get System Identity #
:local SystemID [/system identity get name];
:log info "SMS to Email script started";
# Set Receive Enabled, in case it was cleared by a router reboot #
/tool sms set receive-enabled=yes;
delay 2;
# loop through all the messages in the inbox #
:foreach i in=[/tool sms inbox find] do={
:set smsPhone [/tool sms inbox get $i phone];
:set smsTimeStamp [/tool sms inbox get $i timestamp];
:set smsMessage [/tool sms inbox get $i message];
:set smsContent "Router ID: $SystemID\nSMS Received from: $smsPhone\nDate&Time: $smsTimeStamp\nMessage: $smsMessage";
:log info $smsContent;
/tool e-mail send tls=yes subject="$SystemID GSM Modem SMS Received" to=$EmailAddress body="$smsContent";
# Now remove the SMS from the inbox #
/tool sms inbox remove $i;
delay 10;
}
# clear Receive Enabled, so info channel can be used by other scripts #
/tool sms set receive-enabled=no;
:log info "SMS to Email script complete";
Nice!.....Just because..... the triple 3G wan...![]()
Busy working on a solution which would automatically be able to force a modem reset sequence over both the data and info channels, in case one or the other had locked up.
########################################################
## Modem reset script for 3G PPP Wan links with Email reporting ##
## based on ping reply to a known good host. ##.
## The google dns server at 8.8.4.4 is used ##
## in this example, but you can use any known good host to ping. ##
## take note of your wan interface name! ##
#
### NB NB!! This script runs two other scripts which perform the ###
### actual modem reset sequences: ###
### "Wan1 Modem Reset DataChan" ###
### "Wan1 Modem Reset InfoChan" ###
#
## Schedule this script at whatever checking interval you require. ##
## Remember to set up Tools - Email settings ##
## Peter James 2012-04-20 ##
########################################################
# Delay for first time run after boot #
:delay 15;
# Set the 3G wan name #
:local WanName "wan1";
# get the usb port for this interface #
:local usbPortName [/interface ppp-client get [/interface ppp-client find name=$WanName] port];
:log info "Starting $WanName 3G Down Check";
:local i 0;
:local result 0;
### Define the email address to receive 3G modem reset report ###
:local emailAddressToNotify "your_email_address_here"
## Define host to check ###
:local testhost "8.8.4.4";
## Define number of pings to check ##
:local PingCount 10;
### Get System Identity ###
:local SystemID [/system identity get name]
## If the usb port is inactive, reboot the router to attempt to fix this ##
#:log info "Checking USB Port: $usbPortName Status";#
:if ([/port get [find name=$usbPortName] inactive]) do={
:log info "USB Port: $usbPortName detected as inactive - System Rebooting";
/system reboot;
}
## Skip the ping check if the wan interface is not running ##
:if ([/interface get [find name="$WanName"] running]=true) do={
:do {
:set i ($i + 1);
:if ([/ping $testhost interface="$WanName" interval=3 count=1]=1) do={
:set result ($result+1);
}
} while=($i < $PingCount)
}
# ping has failed PingCount times or ping check was skipped #
:if ($result=0) do={
:log info "Starting $WanName 3G Modem Reset Sequence";
# get its ID number #
:local WanID [/interface ppp-client find name=$WanName];
# Disable the interface to stop dial attempts #
/interface ppp-client disable $WanID;
# Run the reset scripts #
execute "/system script run \"Wan1 Modem Reset DataChan\"";
execute "/system script run \"Wan1 Modem Reset InfoChan\"";
# Wait for all reset sequences to complete #
delay 60;
# Enable the interface once again #
/interface ppp-client enable $WanID;
# Modem should now redial and connect #
:log info "waiting to send email 30 seconds";
## wait before trying to send email ##
delay 30;
# Check if interface is now running #
:if ([/interface get [find name="$WanName"] running]=true) do={
/tool e-mail send tls=yes subject="$SystemID $WanName 3G Modem Was Reset" to=$emailAddressToNotify body="$WanName 3G Modem Was Reset"
:log info "Email sent $WanName 3G Modem Was Reset";
:log info "$WanName Modem Reset Sequence Complete";
} else={
:log info "$WanName Interface Not Running - Modem Reset Sequence Failed";
}
}
:log info "$WanName 3G Down Check Complete";
# Reset the PPP Interface 3G Modem using Data Channel #
###################################################################
## Script uses PPP Modem Init to send AT command to serial port ##
## Commands are simply fired "blind" at the modem ##
## Example sends the AT+CFUN=4, AT+CFUN=6 command sequence ##
## ZTE MF-190 requires AT+CFUN=4, AT+CFUN=1 sequence or AT+ZRST ##
## Sierra Wireless: AT!RESET ##
## ZTE: AT+ZRST ##
## Huawei: AT+CFUN=4, AT+CFUN=6 sequence ##
## This script can be used with Netwatch or sheduled to run on startup ##
## after a watchdog reboot. ##
## You can adjust the delays and AT commands as needed ##
### Peter James 2012-04-20 ###
###################################################################
:local pppName "wan1";
:log info "$pppName Modem Data Channel Reset Started";
delay 20;
:local ModemPort [/interface ppp-client get [/interface ppp-client find name=$pppName] port];
:local DataChan [/interface ppp-client get [/interface ppp-client find name=$pppName] data-channel];
:if ([:len [/interface find name="ResetData1"]] = 0 ) do={
:log info "creating temporary reset ppp interface DataChan";
# Create temporary ppp interface for the specified USB port #
/interface ppp-client add add-default-route=no comment="ResetData1" dial-on-demand=no disabled=yes data-channel=$DataChan name=ResetData1 port=$ModemPort;
}
# Set Interface ID number #
:local ResetData1id [/interface ppp-client find name="ResetData1"];
## Send modem reset sequence ##
# Send first part of reset sequence #
/interface ppp-client set modem-init="AT+CFUN=4" $ResetData1id;
#/interface ppp-client set modem-init="AT+ZRST" $ResetData1id;#
/interface ppp-client enable $ResetData1id;
# Allow time for Init command to be sent #
delay 5;
# disable again to stop any possible dial attempts #
/interface ppp-client disable $ResetData1id;
# Wait for tx and rx RF circuits to switch off #
delay 5;
# Send second part of reset sequence #
/interface ppp-client set modem-init="AT+CFUN=6" $ResetData1id;
/interface ppp-client enable $ResetData1id;
delay 5;
/interface ppp-client set modem-init="" $ResetData1id;
/interface ppp-client disable $ResetData1id;
delay 2;
# Remove temporary interface #
/interface ppp-client remove $ResetData1id;
:log info "$pppName Modem Data Channel Reset Completed";
# Reset the PPP Interface 3G Modem using Info Channel #
###################################################################
## Script uses PPP Modem Init to send AT command to serial port ##
## Commands are simply fired "blind" at the modem ##
## Example sends the AT+CFUN=4, AT+CFUN=6 command sequence ##
## ZTE MF-190 requires AT+CFUN=4, AT+CFUN=1 sequence or AT+ZRST ##
## Sierra Wireless: AT!RESET ##
## ZTE: AT+ZRST ##
## Huawei: AT+CFUN=4, AT+CFUN=6 sequence ##
## This script can be used with Netwatch or sheduled to run on startup ##
## after a watchdog reboot. ##
## You can adjust the delays and AT commands as needed ##
## Peter James 2012-04-20 ##
###################################################################
:local pppName "wan1";
:log info "$pppName Modem Info Channel Reset Started";
#delay 20;#
:local ModemPort [/interface ppp-client get [/interface ppp-client find name=$pppName] port];
:local InfoChan [/interface ppp-client get [/interface ppp-client find name=$pppName] info-channel];
:if ([:len [/interface find name="ResetInfo1"]] = 0 ) do={
:log info "creating temporary reset ppp interface InfoChan";
# Create temporary ppp interface for the specified USB port #
/interface ppp-client add add-default-route=no comment="ResetInfo1" dial-on-demand=no disabled=yes data-channel=$InfoChan name=ResetInfo1 port=$ModemPort;
}
# Set Interface ID number #
:local ResetInfo1id [/interface ppp-client find name="ResetInfo1"];
## Send modem reset sequence ##
# Send first part of reset sequence #
/interface ppp-client set modem-init="AT+CFUN=4" $ResetInfo1id;
#/interface ppp-client set modem-init="AT+ZRST" $ResetInfo1id;#
/interface ppp-client enable $ResetInfo1id;
# Allow time for Init command to be sent #
delay 5;
# disable again to stop any possible dial attempts #
/interface ppp-client disable $ResetInfo1id;
# Wait for tx and rx RF circuits to switch off #
delay 5;
# Send second part of reset sequence #
/interface ppp-client set modem-init="AT+CFUN=6" $ResetInfo1id;
/interface ppp-client enable $ResetInfo1id;
delay 5;
/interface ppp-client set modem-init="" $ResetInfo1id;
/interface ppp-client disable $ResetInfo1id;
delay 2;
# Remove temporary interface #
/interface ppp-client remove $ResetInfo1id;
:log info "$pppName Modem Info Channel Reset Completed";
*) added support for usb forwarding over tcp;
RouterOS v5.15 was released on April 20.
From the change log:
*) added support for usb forwarding over tcp;
I haven't been able to find any details about this feature, but it sounds intriguing.
NAB, jandafields, you can attach USB device to RouterBOARD USB port and operate it by Windows computer.
However, this option is added to v6.x only, changelog entry was added by mistake, this option applies for v6.x
Then again there is probably a proximity question between a modem possibly on 2100mhz and the router's own built-in radio on 2400mhz, applicable to most 3G routers.