Facebook   Twitter    e-mail newsletter    YouTube    RSS Feed    Android App    iPhone and iPad App     BlackBerry App    


Page 4 of 6 FirstFirst 1234 56 LastLast
Results 46 to 60 of 83

Thread: MikroTik RouterBoard and USB 3G Modems

  1. #46
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default

    Was looking at a way of scripting USSD commands from the MikroTik RB751U for checking the data balance via the plugged in modem and then emailing that on a scheduled basis. The serial terminal method is not practical in this case.

    Doesn't seem possible to send AT commands to the modem with a script unfortunately and the other crude method of using the modem initialization string to do this might work, but the problem would be to read the USSD balance request response.

    Refer: http://forum.mikrotik.com/viewtopic....52136&p=287273

  2. #47
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default

    .....Just because..... the triple 3G wan...





    ...and then I ran out of USB 2.0 modems...or else quad wan....

    Odd that the E173 does not show its connect speed for some reason.
    But this setup definitely works.
    CCTV system accessible via three different host names.
    Last edited by Base122; 14-04-2012 at 08:16 PM.

  3. #48
    Super Grandmaster ginggs's Avatar
    Join Date
    Jun 2006
    Location
    Good-w00t! Cape Town
    Posts
    7,711

    Default

    Quote Originally Posted by Base122 View Post
    .....Just because..... the triple 3G wan...
    Nice!

  4. #49
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default



    Pity that MikroTik did not include this feature on the RB751u.
    Would have helped a whole lot to solve some of these random router-modem serial communication lock-ups.

    Had a situation where the router-modem data channel serial communications stopped for some reason and not even a router reboot could fix it. Seems like the modem data channel has locked up on the modem itself. Serial communications on the info channel was still working fortunately and I could issue a manual AT+CFUN=4, AT+CFUN=6 modem reset sequence with the serial terminal.

    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.
    Last edited by Base122; 17-04-2012 at 05:41 PM.

  5. #50
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default

    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.
    My solution to this modem data channel serial communications problem, is to disable the problem wan interface, then create two temporary wan interfaces for the same modem usb port, with temp interface1 data channel, set to the modem normal data channel and temp interface2 data channel, set to the modem info channel.

    I then use the modem Init strings to once again force the AT reset sequences over both the modem data and info channels, using these two temporary interfaces, with a delay between each operation.

    Effectively, this is kind of a double reset that is sent to the modem, in the hope that one of the two will at least be able to reset the modem and recover from this locked up state.

    The temporary interfaces are then removed once the full reset operation is complete and the normal wan interface is enabled again allowing it to dial and connect.

    I initially tried manipulating the existing wan interface data channel and Init settings, but during this locked up data channel condition, the router had problems trying to change parameters and gave many timeouts, simply refusing to do as commanded. It refused to even enable or disable the wan interface at one point.

    The two temporary interfaces were a way around this. This seems a bit of a complex approach, but in the absence of a USB power reset option, this appears to resolve the problem. Hopefully this is the last I will see of this annoying problem condition, which was not restricted to any particular modem or network operator.

    The three script approach was necessary, to prevent a possible problem with either the data or info channel reset sequence from "hanging" the whole process. This could happen if either the modem data or info serial channels are in an unresponsive state for some reason.

    Just busy with some final testing and tweaking on the scripts and will post them here once satisfied.
    Last edited by Base122; 20-04-2012 at 10:08 AM.

  6. #51
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default

    Scripts as per previous post:

    Script1: Wan1 Down Modem Reset (Scheduled)
    - Checks wan USB port inactive and reboots router if needed.
    - Pings a known good host and starts scripts 2 and 3 if no reply.
    Code:
    ########################################################
    ## 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";
    Script2: Wan1 Modem Reset DataChan (Started by Script1)
    (This script can also be called independently at any time to issue a modem reset over the data channel)
    Code:
    # 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";
    Script3: Wan1 Modem Reset InfoChan (Started by Script1)
    (This script can also be called independently at any time to issue a modem reset over the info channel)
    Code:
    # 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";
    Last edited by Base122; 20-04-2012 at 10:16 AM.

  7. #52
    Super Grandmaster ginggs's Avatar
    Join Date
    Jun 2006
    Location
    Good-w00t! Cape Town
    Posts
    7,711

    Default

    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.

  8. #53

    Default

    Isn't it a similar feature to some ASUS routers? USB port on the router appears on remote PC like a local port.

    Edit: Not sure Asus, but found a relevant note about AVM FRITZ!Box Fon 7390 (long name and v. expensive).

    Also look here: http://www.incentivespro.com/crossplatform-solution.html
    Last edited by sajunky; 23-04-2012 at 12:07 PM.

  9. #54
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default

    Quote Originally Posted by ginggs View Post
    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.
    Not so after all..... V6.x only.

    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


    http://forum.mikrotik.com/viewtopic....=61279#p313396
    Last edited by Base122; 23-04-2012 at 03:20 PM.

  10. #55
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default






  11. #56
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default

    Just a note regarding RouterOS on the RB751U:

    I had endless trouble with the RB751U not wanting to boot up properly on V5.13 and V5.14 with my configuration.

    I pretty much stuck to V5.12 because of this.

    This erratic RB751U boot failure issue has come up in a few threads on the MikroTik forum.
    Seems that MikroTik have identified it as some compatibility issue with RouterOS and the RB751U.

    This seems to now have been resolved in V5.15

    I have tried this on two of my RB751U's and done many reboots now without any trouble so far.

    I would recommend skipping V5.13 and V5.14 on the RB751U due to this issue.

  12. #57
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default

    Discovered a strange power issue with the RB751U and the powered USB hub in this setup:



    I pulled the RB751U +12V power plug and was quite surprised to see the green lights on the router remain on, but dimmer than usual and then start flickering. Took a while to work out that the router was still being powered by the USB hub +5V power via the router USB connector. The router did not function correctly under this condition, as it would not respond to ping or winbox.

    Now this cannot be a good thing, as +5V is below the minimum RB751U voltage range specification of 8-30V. Fortunately no harm was done to the router and it worked fine after plugging in the normal +12V power again.

    Seems odd that MikroTik did not at least put in a protection diode on the router USB port, to prevent external +5V power from entering the unit. There doesn't seem to be any practical reason for having allowed this. I'm sure the intention was never to allow the router to be powered by +5V on its USB port.

    I suppose this voltage could occur on a battery powered site anyway, where the battery charger has failed and the battery has run near flat. Hopefully such an installation would have a load disconnect mechanism at a certain minimum voltage anyway to prevent any equipment damage due to under voltage.

    Just something to be aware of.
    Last edited by Base122; 08-05-2012 at 07:34 PM.

  13. #58

    Default

    It is not router's fault, but USB hub. Hub should not allow internal voltage to appear on upstream port. I have a cheapo hub, it does similar things. I discovered when PC refused to boot if hub was powered and connected to USB port. A good hub has a MOSFET on each output port controlled by voltage comparator. In my hub power supply voltage +5V is wired to all ports, including upstream port. The same will be in your hub.

    Blocking by diodes is not a good solution, due to the voltage drop on diodes and losing stabilisation parameters.
    Last edited by sajunky; 09-05-2012 at 12:59 AM.

  14. #59
    Super Grandmaster
    Join Date
    Oct 2003
    Location
    Stellenbosch
    Posts
    5,177

    Default

    Quote Originally Posted by Base122 View Post
    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.
    You could lose receiver sensitivity due to PIM (passive intermodulation). Dirty interconnects, dissimilar metals, etc could behave in a non-linear fashion acting as a mixer causing spurious signals out of band. Usually not a problem if you’re not trying to receive weak signals, but PIM is e.g. a big problem in satellite receiver applications.

  15. #60
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    440
    Blog Entries
    1

    Default

    RouterOS v5.16 was released a short while back.

    I have upgraded all my MikroTik RB751U's and they seem quite stable on this version with my particular configuration.

Page 4 of 6 FirstFirst 1234 56 LastLast

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •