User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:public:ltemodem-alcatel-ik40 [2017/11/09 00:30] (current)
pepe created
Line 1: Line 1:
 +======How to configure and setup Alcatel Link Key IK40======
  
 +__What do you need to have?__
 +
 +  * LTE USB modem - **Alcatel Link Key IK40**
 +  * micro SIM card
 +  * access to the ''​[[en:​howto:​ssh|SSH]]''​
 +
 +In this article I will show you how to configure USB modem **Alcatel Link Key IK40**.\\
 +Also I will also show you how to have mobile broandband as backup connection (failover).
 +
 +Information about used LTE USB modem (which you can find by using [[en:​howto:​ssh|SSH]]):​
 +<​code>​
 +root@turris:​~#​ lsusb
 +Bus 001 Device 005: ID 1bbb:0195 T & A Mobile Phones
 +</​code>​
 +
 +===== Required packages ====
 +
 +In PuTTY or Terminal log into your router to SSH and install these packages:
 +
 +<​code>​
 +opkg install kmod-usb-net-rndis usb-modeswitch
 +</​code>​
 +
 +===== Adding interface w/o using LuCI ====
 +
 +Protocol ''​RNDIS''​ isn't supported in the advanced configuration interface called **LuCI**. \\
 +
 +**You have 3 options. ** \\
 +1. In Windows you can use program ​ [[https://​winscp.net/​eng/​download.php|WinSCP]].\\
 +2. You can use ''​vim''​\\
 +3. UCI.\\
 +
 +Before you will continue you would need to know APN. Your's mobile operator should tell you, what needs to be there. Usually it is something like ''​internet''​.
 +
 +<WRAP center round important 90%>
 +USB modem, which use RNDIS (Remote Network Driver Interface specification) creates their own NATted IP subnet. \\
 +So you're forced to change LAN IP address of your router. \\
 +In this article I will show you how to have both interfaces (Foris and LuCI) on address 10.10.10.1 instead of 192.168.1.1. Because on this address (192.168.1.1) you will have administration of your LTE USB modem. ​
 +</​WRAP>​
 +
 +
 +==== Opening and editing files ====
 +
 +Open a file ''/​etc/​config/​network''​ and now you will need to change **ipaddr** to 10.10.10.1
 +
 +It should looks like this (**but remember this article was made on Turris 1.x and ifname could be different!**)
 +<​code>​
 +config interface '​lan'​
 + option ifname 'eth0 eth1'
 + option force_link '​1'​
 + option type '​bridge'​
 + option proto '​static'​
 + option netmask '​255.255.255.0'​
 + option ip6assign '​60'​
 + option ipaddr '​10.10.10.1'​
 +</​code>​
 +
 +And to the end of this file you will need to add
 +
 +<​code>​
 +config interface '​lte'​
 + option ifname '​usb0'​
 + option proto '​dhcp'​
 + option apn '​internet'​
 +</​code>​
 +
 +Save it.
 +
 +==== UCI ====
 +
 +In PuTTY or Terminal log into your router to SSH and copy&​paste these rows:
 +
 +<​code>​
 +uci set network.lte=interface
 +uci set network.lte.ifname='​usb0'​
 +uci set network.lte.proto='​dhcp'​
 +uci set network.lte.apn='​internet'​
 +uci commit
 +</​code>​
 +
 +<WRAP center round tip 60%>
 +If your SIM card has PIN, you will need to fill it in administration interface of your USB modem.
 +Which should be on this IP address [[http://​192.168.1.1]].
 +</​WRAP>​
 +
 +
 +====== Assign LTE interface to the firewall ======
 +
 +==== LuCI ====
 +
 +Go to ''​LuCI''​ interface (by default should be located on http://​192.168.1.1/​cgi-bin/​luci ) → ''​Network''​ → ''​Firewal''​
 +
 +{{ :​cs:​public:​firewall-upravit.jpg?​700 |}}
 +
 +Edit 2nd zone (should be wan) and check there //lte// interface.
 +
 +{{ :​cs:​public:​firewall-pridani-lte.jpg?​700 |}}
 +
 +Click **Save & Apply**
 +
 +Now you should see how KB moves in RX and TX. You can also check it by disconnecting WAN cable.
 +
 +==== Opening and editing files ====
 +
 +Open file ''/​etc/​config/​firewall''​ and locate ''​config zone'',​ where under it should be: **option name '​wan'​**
 +
 +If there isn't **option network** then copy&​paste like it is below.
 +If there is **option network** ​ then you would need to add there interface ''​lte''​ as it is below.
 +
 +**config zone** should be same like this one
 +
 +<​code>​
 +config zone
 + option name '​wan'​
 + option input '​REJECT'​
 + option output '​ACCEPT'​
 + option forward '​REJECT'​
 + option masq '​1'​
 + option mtu_fix '​1'​
 + option network 'lte wan wan6'
 +</​code>​
 +
 +**When connection doesn'​t work you need to restart router.**
 +
 +<WRAP center round important 60%>
 +Now if everything went well all your traffic between the router and the Internet should go through the LTE interface. That means that the connection through the WAN interface will not work.
 +In the next step I will show you how to configure LTE as a backup connection.
 +</​WRAP> ​
 +
 +====== Administration interface of your's modem ======
 +
 +Can be found on this address [[http://​192.168.1.1]]
 +
 +{{ :​cs:​public:​alcatel_ik40_pin.png?​direct&​700 |}}
 +{{ :​cs:​public:​alcatel_ik40_pripojeno.png?​direct&​700 |}}
 +{{ :​cs:​public:​alcatel_ik40_vyuziti.png?​direct&​700 |}}
 +
 +
 +===== LTE as backup connection =====
 +
 +Please go here, where it is explained: https://​www.turris.cz/​doc/​en/​howto/​multiwan
 +
 +===== microSD card =====
 +
 +<WRAP center round tip 60%>
 +Tested only on Turris 1.x. Should be similar on Turris Omnia.
 +</​WRAP>​
 +
 +
 +When you have inserted microSD card to LTE modem, which is connected to the Turris router, you will need to check if router sees microSD card in LTE modem.
 +
 +I will use [[cs:​howto:​ssh|SSH]]:​
 +
 +<​code>​
 +blkid
 +</​code>​
 +
 +You should see similar output as I do.
 +
 +<​code>​
 +root@turris:​~#​ blkid
 +/​dev/​mtdblock3:​ TYPE="​squashfs"​
 +/​dev/​mmcblk0:​ PTUUID="​3fee9afa"​ PTTYPE="​dos"​
 +/​dev/​mmcblk0p1:​ SEC_TYPE="​msdos"​ UUID="​3462-1AE5"​ TYPE="​vfat"​ PARTUUID="​3fee9afa-01"​
 +/​dev/​mmcblk0p2:​ UUID="​1acf499c-1067-4fe1-b1b7-af7dc884f7ae"​ UUID_SUB="​fd211a80-da78-49fc-a7c2-f2ed2b840301"​ TYPE="​btrfs"​ PARTUUID="​3fee9afa-02"​
 +/dev/sda1: UUID="​ED37-A894"​ TYPE="​exfat"​
 +</​code>​
 +
 +Now we can see that microSD mounted is detected as ''​dev/​sda''​ and their type is: ''​exfat''​
 +
 +By this command you can format it to ext4 file system
 +
 +<​code>​
 +mkfs.ext4 /dev/sda1
 +</​code>​
 +
 +You can also use ''​LuCI''​ to **add new mount point** in ''​System''​ tab.
 +
 +(Turris 1.x owners can't add it through LuCI and will need to mount it manually)
 +
 +or you can mount it manually
 +
 +If you would like to have microSD card in folder ''​sd'',​ which will be located in ''/​mnt''​
 +First you will need to create folder ''​sd''​ in ''/​mnt''​
 +
 +<​code>​
 +mkdir /mnt/sd
 +</​code>​
 +
 +<​code>​
 +mount /dev/sda1 /mnt/sd
 +</​code>​
 +
 +Now I will show you how to verify, if sd card is mounted, how we wanted.
 +<​code>​
 +root@turris:​~#​ df -h
 +</​code>​
 +
 +<​code>​
 +Filesystem ​               Size      Used Available Use% Mounted on
 +/​dev/​mmcblk0p2 ​         119.1G ​   136.5M ​   118.0G ​  0% /
 +tmpfs                  1011.5M ​     1.7M   ​1009.8M ​  0% /tmp
 +tmpfs                   ​512.0K ​     4.0K    508.0K ​  1% /dev
 +/​dev/​sda1 ​              ​116.8G ​    ​60.0M ​   110.8G ​  0% /mnt/sd
 +</​code>​
 +
 + --- //​[[pepe@bloodkings.eu|Josef Schlehofer]] 2017/11/09 00:30//