📜 ⬆️ ⬇️

Yota router or wimax2wifi in 15 minutes. Option 2.

Since I currently live in a newly built house, I do not have the opportunity to connect to normal high-speed Internet. As a solution to this problem, the Yota modem was purchased, since WiMax is currently free (3G from Beeline is also not bad, but still expensive). And everything would be gorgeous and in shock if not for the presence of 2x laptops and one PDA at home, which were actively used and needed to be connected to the Internet. The option of using one laptop as a router was pretty quickly tired, so it was decided to purchase a WiFi router. Having rummaged on the Internet, I initially chose the Asus wl-500gp v2 model, moreover, at that moment an article was written Yota-router or wimax2wifi in 15 minutes . But after reading the forum wl500g.info , I found a more budget option for myself.


And so we meet the WiFi router D-Link Dir 320 . The beauty of this model is that it is an analogue of the Asus WL-500gP V2 router with a reduced flash memory from 8 MB to 4 MB. The router is based on the BCM5354 processor, the RAM size is 32 MB, flash is 4 megabytes, 1 USB port, 1 internal COM port. At the same time, its price is 2 times less than the price of Asus, with almost the same functionality. In addition, a simple usb-hab and a 512Mb flash drive were purchased (the hub will be connected to the only usb port of the router, and the flash drive is used to expand flash memory).

Stage 1. A bit of magic and dancing with a tambourine to turn D-Link into Asus.
After reading the forum thread wl500g.info, where the method of flashing was written in sufficient detail, I did the following.
')
I downloaded from the site the latest firmware for the WL-500gPv2. I saved it in the C: \ bin folder, renamed firmware.bin.

In the folder C: \ bin created the file install.bat with the following contents
@Echo Off
:BEGIN
ping -n 1 -w 1 192.168.0.1
If errorlevel 1 Goto BEGIN
If errorlevel 0 Goto FLASH
Goto END
:FLASH
Echo *** Start Flashing ****
tftp -i 192.168.0.1 put firmware.bin
:END


Changed the address the address of the computer network interface 192.168.0.2/255.255.255.0 and connected the router's network cable, not including the router power.

Running the command line PUSK-> Run-> cmd and going to the cd folder c: \ bin, executed the batch file install.bat

C: \ bin> install.bat

Turned on the power of the router.

Then we can observe the process of the firmware, which will take just a few seconds and will end in the command line.
192.168.0.1 32 :
.
Ping 192.168.0.1:
: = 1, = 0, = 1 (100% ),
<<< SKIP >>> <<< SKIP >>> <<< SKIP >>> <<< SKIP >>>
192.168.0.1 32 :
192.168.0.1: =32 =4 TTL=100
Ping 192.168.0.1:
: = 1, = 1, = 0 (0% ),
- :
= 4, = 4 , = 4
*** Start Flashing ****
: 3092480 11 s, 281134 /
C:\bin>


Next, wait about 1-2 minutes until the status indicator lights on the router. And we reset the default settings by turning off the power of the router, then pressing the reset button and not releasing it by turning on the power, after 5 seconds releasing the reset button.

In the settings of the network connection on the computer, we set the automatic retrieval of the address and, having entered the telnet (C: \ bin> telnet 192.168.1.1) to the router (the login and password are admin), we enter the following commands:

nvram set vlan2hwname=et0
nvram set wan0_ifnames=vlan2
nvram set wan0_ifname=vlan2
nvram set wan_ifnames=vlan2
nvram set wan_ifname_t=vlan2
nvram set wan_ifname=vlan2
nvram set wandevs=vlan2
nvram commit
reboot


Now our router proudly calls itself Asus Wl500gp. Further firmware updates are performed via the web interface.

For linux owners, flashing is also possible. To do this, you also need to set a static connection address (if NetworkManager is available, disconnect it temporarily, as it establishes a long connection). And execute the following commands:

$ cd /path/to/firmware.bin/directory
$ tftp
tftp> binary
tftp> trace
tftp> rexmt 1
tftp> connect 192.168.0.1
tftp> put firmware.bin


Then turn on the power of the router.

Stage 2. Activation of the yota-modem.

This stage will be completely analogous to the previous article Yota-router or wimax2wifi in 15 minutes except for a couple of moments.

In the absence of a cable with normal Internet, I had to connect a Wimax modem to a laptop, share the Internet and connect this laptop to the Wan port of the router, setting up a connection on the router. The second laptop was connected via ethernet to the router and all commands were executed from it.

Also at this moment we connect a hub to the usb router and insert a USB flash drive into it.

I also changed the script to run on the router to the following:
umount /opt
umount /tmp/mnt/disc0_1
echo -e -nd\n1\nn\np\n1\n512\nw | fdisk /dev/scsi/host0/bus0/target0/lun0/part1 < /tmp/fdisk.cfg
mke2fs -j /dev/scsi/host0/bus0/target0/lun0/part1
mount -o sync,noatime,rw /dev/scsi/host0/bus0/target0/lun0/part1 /opt
cd /tmp
wget lvk.cs.msu.su/~lasaine/madwimax/wl500g/libusb-1.0-mipsel.tgz
wget lvk.cs.msu.su/~lasaine/madwimax/wl500g/madwimax-latest-mipsel.tgz
wget lvk.cs.msu.su/~lasaine/madwimax/wl500g/udhcpc-script.tgz
cd /
tar -xzf /tmp/libusb-1.0-mipsel.tgz
tar -xzf /tmp/madwimax-latest-mipsel.tgz
tar -xzf /tmp/udhcpc-script.tgz
rm /tmp/libusb-1.0-mipsel.tgz /tmp/madwimax-latest-mipsel.tgz /tmp/udhcpc-script.tgz
mkdir -p /usr/local/sbin/
echo "#!/bin/sh" > /usr/local/sbin/post-mount
echo "mount -o sync,noatime,rw /dev/scsi/host0/bus0/target0/lun0/part1 /opt" >> /usr/local/sbin/post-mount
echo "mount -o bind /tmp/mnt/disc0_1 /opt" >> /usr/local/sbin/post-mount
# echo "insmod /lib/modules/tun.o" >> /usr/local/sbin/post-mount
echo "insmod tun" >> /usr/local/sbin/post-mount
echo "(while true; do /opt/sbin/madwimax -qof; sleep 10; done) &" >> /usr/local/sbin/post-mount
chmod +x /usr/local/sbin/post-mount
ipkg.sh update
ipkg.sh install ipkg-opt
flashfs save
flashfs commit
flashfs enable
reboot


After these actions, connecting the WiMax adapter to the Usb router hub, we get the configured Internet.

PS For those who do not want to waste time, but are ready to get the same result, ready-made kits for connecting to Yota Wimax appeared on the market.

D-Link Dir 320 and ASuS WL 500gP v1 / v2 .

Source: https://habr.com/ru/post/54689/


All Articles