MR3420 Openwrt + MF823
Kõigepealt tuleb installida vajalikud pakid:
opkg update
opkg install kmod-usb-net kmod-usb-net-rndis kmod-usb-net-cdc-ether usbutils udev usb-modeswitch
Seejärel seadistada pulga jaoks failid. Kasutasin rc.localis pulgalt korraks voolu tagant võtmise gpio-d, sest ilma ei hakanud tööle. Kindlasti on ka teisi võimalusi nt usb-modeswitch, aga nii toimis.
Faili sisu, et pulk tööle hakkaks
/etc/config/network:
config 'interface' 'wan'
option proto 'dhcp'
option ifname usb0
/etc/rc.local sisu:
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
sleep 5
echo 0 > /sys/devices/virtual/gpio/gpio6/value
sleep 2
echo 1 > /sys/devices/virtual/gpio/gpio6/value
exit 0
/etc/config/network:
config interface 'lan'
option ifname 'eth0'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.100.1'
option gateway '192.168.32.1'
option dns '8.8.8.8'
opkg update
opkg install kmod-usb-net kmod-usb-net-rndis kmod-usb-net-cdc-ether usbutils udev usb-modeswitch
Seejärel seadistada pulga jaoks failid. Kasutasin rc.localis pulgalt korraks voolu tagant võtmise gpio-d, sest ilma ei hakanud tööle. Kindlasti on ka teisi võimalusi nt usb-modeswitch, aga nii toimis.
Faili sisu, et pulk tööle hakkaks
/etc/config/network:
config 'interface' 'wan'
option proto 'dhcp'
option ifname usb0
/etc/rc.local sisu:
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
sleep 5
echo 0 > /sys/devices/virtual/gpio/gpio6/value
sleep 2
echo 1 > /sys/devices/virtual/gpio/gpio6/value
exit 0
/etc/config/network:
config interface 'lan'
option ifname 'eth0'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.100.1'
option gateway '192.168.32.1'
option dns '8.8.8.8'
Comments
Post a Comment