Cellular SIMcom modems 01: Difference between revisions
No edit summary |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
* SIM5360 | * SIM5360 | ||
* SIM7100 | * SIM7100 | ||
* Possibly others also. | |||
{{ Note | LTE speeds for SIM7100 will be available only starting RouterOS v7 major release! }} | {{ Note | LTE speeds for SIM7100 will be available only starting RouterOS v7 major release! }} | ||
Line 73: | Line 74: | ||
Flags: X - disabled, R - running | Flags: X - disabled, R - running | ||
0 R name="ppp-out1" max-mtu=1500 max-mru=1500 mrru=disabled port=usb1 | 0 R name="ppp-out1" max-mtu=1500 max-mru=1500 mrru=disabled port=usb1 | ||
data-channel=2 info-channel= | data-channel=2 info-channel= apn="internet.example.com" pin="" user="" | ||
password="" profile=default phone="" dial-command="ATDT" modem-init="" | password="" profile=default phone="" dial-command="ATDT" modem-init="" | ||
null-modem=no dial-on-demand=no add-default-route=yes | null-modem=no dial-on-demand=no add-default-route=yes | ||
Line 84: | Line 85: | ||
<b>/interface ppp-client set 0 dial-on-demand=no use-peer-dns=yes add-default-route=yes \ | <b>/interface ppp-client set 0 dial-on-demand=no use-peer-dns=yes add-default-route=yes \ | ||
data-channel=2 info-channel=3 apn=internet.example.com</b> | data-channel=2 info-channel=3 apn=internet.example.com</b> | ||
{{ Note | Modem samples which were tested both worked with combination channel 2 for data and channel 3 for info. }} | |||
break down of this command: | break down of this command: | ||
Line 138: | Line 141: | ||
[admin@MikroTik] > export | [admin@MikroTik] > export | ||
... | ... | ||
/interface ppp-client | /interface ppp-client | ||
add apn=internet.example.com data-channel=2 dial-on-demand=no disabled=no \ | add apn=internet.example.com data-channel=2 dial-on-demand=no disabled=no \ |
Latest revision as of 06:08, 15 July 2015
Summary
This article will contain example on how to configure SIMcom cellular modems in using PPP interface in RouterOS v6.xx
Article covers following models:
- SIM5360
- SIM7100
- Possibly others also.
Note: LTE speeds for SIM7100 will be available only starting RouterOS v7 major release!
Configuration example / Comments
In this example we will assume that you already have basic router configuration in place (if not consult these articles: accessing router and initial configuration using webfig)
This example will be covered in CLI (command line interface) configuration method. Some additional screenshots will be included so quick view for Winbox would also be there for reference.
1. Prepare modem for use in your Router
- If you are going to be using mini-PCIe version of SIMcom modem then these actions should be performed while router is powered off.
- Insert sim-card in modem usb interface or sim-card slot that is on your router. This part depends on which modem edition you have one as mini-pcie or usb dongle version.
- Add required antennas to modem (if required) and insert it in usb or mini-pcie slot.
- Power on the router.
- Ideally we always recommend to keep router fully updated: HOWTO upgrade RouterOS
2. Check if router sees the added device
Now let's check if router sees the device that you just added and can work with it.
- Check if ROS sees the modem with command: "/interface print"
[admin@MikroTik] > interface print Flags: D - dynamic, X - disabled, R - running, S - slave # NAME TYPE ACTUAL-MTU L2MTU 0 R ether1 ether 1500 1600 1 X wlan1 wlan 1500 1600 2 R ppp-out1 ppp-out 1500
We can see that interface #2 is ppp-out1, it will be the modem that you just added (presuming that it is not ppp interface from some other modem/configuration that you added previously).
Additional info to check (if required/needed).
- Ports, command: "/port print"
[admin@MikroTik] > port print Flags: I - inactive # DEVICE NAME CHANNELS USED-BY BAUD-RATE 0 1:2 usb1 5 PPP <ppp-out1> 9600
- If ROS sees modem as USB device, command: "/system resource usb print"
[admin@MikroTik] > /system resource usb print # DEVICE VENDOR NAME SPEED 0 1:1 Linux 3.3.5 ehci_hcd RB400 EHCI 480 Mbps 1 1:2 SimTech, Incorporated SimTech SIM5360 480 Mbps
3. Configure the modem
Modem configuration part.
- Check ppp-client menu for required interfaces, command: "/interface ppp-client print"
[admin@MikroTik] > /interface ppp-client print Flags: X - disabled, R - running 0 R name="ppp-out1" max-mtu=1500 max-mru=1500 mrru=disabled port=usb1 data-channel=2 info-channel= apn="internet.example.com" pin="" user="" password="" profile=default phone="" dial-command="ATDT" modem-init="" null-modem=no dial-on-demand=no add-default-route=yes default-route-distance=0 use-peer-dns=yes keepalive-timeout=30 allow=pap,chap,mschap1,mschap2
- Configure ppp interface, command example:
/interface ppp-client set 0 dial-on-demand=no use-peer-dns=yes add-default-route=yes \ data-channel=2 info-channel=3 apn=internet.example.com
Note: Modem samples which were tested both worked with combination channel 2 for data and channel 3 for info.
break down of this command:
dial-on-demand=no <--- This option specifies if modem should be active only when someone is trying to use it or all the time. use-peer-dns=yes <--- use DNS servers that are provided by your cellular service provider. add-default-route=yes <--- Should default route be added (YES, if this is going to be the only WAN interface on your router). data-channel=2 <--- Data channel over which you will access your wan connection. info-channel=3 <--- Info channel used for gathering debug info on modem and connection quality. apn=internet.example.com <--- Access point name provided to you by your operator, ... pin <---Pin code if required by sim which you are going to be using.
This part will depend on what you need to configure, first five options will be a requirement. Starting with APN other options like pin, etc configuration becomes dependent on what your cellular ISP requires. to get all available options in console while inputing press tab.
- After executing previous command to check if modem has connected you can run the same: "/interface ppp-client print" command and check if ppp interface have running flag "R". Or run monitor command: "/interface ppp-client monitor 0"
[admin@MikroTik] > /interface ppp-client monitor 0 status: connected uptime: 34m12s encoding: connect-speed: 115200 mtu: 1500 mru: 1500 local-address: x.x.x.x remote-address: 0.0.0.0
And gotten IP address from ISP.
[admin@MikroTik] > /ip address print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK INTERFACE 0 ... 1 D x.x.x.x/32 x.x.x.x ppp-out1 <----
4. Additional configuration
One last configuration piece to allow access from LAN to WAN, command: "/ip firewall nat add chain=srcnat out-interface=ppp-out1 action=masquerade"
Now to confirm that every thing has been configured correctly I suggest to run ping to some web resource from both your router and PC that is connected to lan. As if there is some problems this step might indicate where you should look for the.
[admin@MikroTik] > export ... /interface ppp-client add apn=internet.example.com data-channel=2 dial-on-demand=no disabled=no \ info-channel=3 name=ppp-out1 port=usb1 /ip firewall nat add action=masquerade chain=srcnat out-interface=ppp-out1 ... [admin@MikroTik] >