Reliable communication using the Yota Street modem

In a country house, I also want to have high-quality and fast Internet access.

Unfortunately, wired Internet in the country is not always possible due to the lack of wires (telephone and / or network from an Internet provider). And even if there are telephone wires in the house and ADSL equipment installed on the PBX, the state of the “last mile” is such that data transmission using ADSL technology is impossible (or possible at such low speeds that the ADSL provider is completely not interested).

In this situation, wireless Internet access comes to the rescue.

But it is not so simple with him as one would like.

Some time ago, a few kilometers from my country house, Yota installed its base station and, judging by the coverage map, my house was in the "coverage area" of this network.

Attempts to use a Yota USB modem showed an unsatisfactory result: even on the balcony of the third floor facing the base station, the signal level is extremely small, the data exchange rate is 100-200 kilobits per second (i.e. less than 25 kilobytes per second).

Just at that time, Yota began selling its new device - the Yota Street street modem.

Pluses of this device:
  1. Directional antenna - high gain and sensitivity are orders of magnitude superior to a USB modem (in winter, when the foliage on the trees does not get in the way of radio waves, the reception speed is up to 5-6 megabits per second, and the transmission speed is slightly less than that, in the summer it is stable 2 megabits in both directions).
  2. Street performance - that is, it is possible and necessary to take the antenna to the mast high above the roof.
  3. Power “Power Over Ethernet” is just one wire for data and power.
  4. It is connected to the WAN port of any router, the router receives all the necessary information about the external network via DHCP.

It would seem just a fairy tale. Turned on and enjoy. But happiness was short.

As soon as the device went on sale, it was purchased and hoisted on the roof of the house.
The new device did not show its best side: the connection to the Yota network was interrupted periodically and in order to restore it, I had to go into the web interface of the router and click on the “Connect” button until it was frenzied. Sometimes the connection resumed, sometimes not. I had to turn off the power to both the modem and the router for 15-30 minutes.

All calls to Yota technical support ended with a proposal to show the modem to the service. Some owners agreed and sometimes they even changed the device as a whole. However, it later became clear that a completely new device behaves exactly the same.

Then, rumors began to appear that Yota was preparing an update to the Yota Street firmware, however, this never came true. Yota simply turned off sales of Yota Street and the owners of this wonderful device were left alone with their problems.

However, as long as a lot of money was spent on the modem and the unlimited tariff Yota more than suited me, I decided on my own to try to get my modem working.

My experience of using Yota Street and discussions on the YotaTester forum led me to the following 2 conclusions:
  1. It is necessary to periodically, for example once a day, reboot the modem so that it does not form too much uptime as a result of which the device ceases to work adequately.
  2. You need to make the router detect a disconnected connection and try to reconnect (as I did previously using my hands from the router’s web interface).


The first task is solved simply: we buy an electric timer and program it to turn off the power at night from 3-00 to 3-15.
The second task is solved somewhat more complicated. Fortunately, my router was not simple, but Asus Wl-500gp, well known in narrow circles. For some time he worked under the control of "firmware from enthusiasts."

Searches on the Internet showed that in this firmware (however, as in many other alternative firmware), scripts can be connected for a set of events:
  • pre-boot - run before boot
  • post-boot - run after boot
  • … etc...

I just needed the ability to run my script after a complete "normal" start of the router.

It remains to write a script that monitors the connection.

And again, searches on the Internet brought the result: the always_on script from the DD-WRT website turned out to be exactly what I was looking for.
The router pings the default gateway and, in the absence of a response, sends new discovery requests from the DHCP client.

However, I modified the script a bit so that accidental loss of ping packets did not lead to a connection reset: only N consecutive unsuccessful pings lead to reconnection.

The result was very encouraging - Internet access is almost always there, only sometimes the connection disappears in order to recover in a couple of minutes.

Well, since I started writing scripts, I added 2 more simple, but very useful scripts:
  1. The MTU setting is equal to the recommended Yota 1400 bytes. It is difficult to say whether this affected and how much it affected the speed and stability of the work, but I want to believe that it did not get any worse.
  2. Forwarding the Yota-street web interface to the local network. The fact is that this same web interface is initially available when directly connected to the device at a fixed address: 192.168.1.1. At the same time, through the DHCP, the router from the modem receives the address in a completely different subnet (the internal Yota subnet), that is, the modem’s web interface is not available from the local network behind the router. However, iptables can solve this problem.
  3. And to top it off, for my convenience, I designed commands for saving file system changes to internal flash memory as a script.

So, I got 3 "battle" scripts and one service.

For greater flexibility and the ability to further modify the set of running scripts, I implemented a system similar to the usual Linux startup scripts: I put all the scripts to run after loading into the same folder “/ usr / local / sbin”, named them with the “SXX” prefixes and more I run them with one script in ascending order of the index in the prefix.

In short, now setting up the router boils down to the following:
  1. We login to the router via telnet and go to the folder "/ usr / local / sbin"
  2. We put "battle scripts" in the folder "/ usr / local / sbin /": S10setmtu , S20alwayson and S30yotadmin
  3. We put 2 service scripts there: post-boot , which launches “battle scripts”; and flash.sh , with which we save changes to the file system in the flash memory of the router.
  4. Run flash.sh: ./flash.sh
  5. We reboot the router: either with the reboot command in the terminal, or we distort the power.


Voila, the Internet works and pleases users!

Also popular now: