OpenWrt Forum Archive

Topic: SOLVED: Anyone know when Nexx WT3020H will be added into main?

The content of this topic has been archived between 26 Mar 2018 and 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Yes, it's how I build my devices so they will have all the files I need to install on them, scripts and stuff.
However, most of the files are in files/temp and some lines in /etc/rc.local and none are related to the OS, they are only scripts to do some logging.

So, here is what I have ready to go.

Chaos Calmer 15.05 Image Builder.

A FILES directory with some scripts in files/temp and a few lines of code in /etc/rc.local.

My build command is as follows;
make image PROFILE=MT7620a PACKAGES="libstdcpp ca-certificates libpthread bash curl kmod-ipv6 -dnsmasq -kmod-ath9k -uboot-envtools -wpad-mini -ppp -ppp -mod-pppoe -kmod-ppp -kmod-pppoe -kmod-usb-core -kmod-usb2 -kmod-ledtrig-usbdev -kmod-usb-ohci -kmod-usb-hid" FILES=files/

The files I have in files/etc;
# ls -ls files/etc/config/
8 -rw-r--r-- 1 nobody nogroup 4408 Apr  5 08:46 firewall
4 -rw-r--r-- 1 nobody nogroup  812 Mar 30 16:16 network
4 -rw-r--r-- 1 nobody nogroup  353 Mar 30 12:48 system

In the files/etc/config/system file, I simply change the hostname

# cat files/etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd3f:0c92:79ed::/48'

config interface 'lan'
        option ifname 'eth0.1'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.55'          # Changed to 1.55 so it won't conflict with local router
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option force_link '1'
        option proto 'dhcp'                        # This is set to DHCP so once built, picks up DHCP IP

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 6t'

In the files/etc/config/firewall file, the last time I built, I changed only the ssh section. I made this change after I lost access to the first two devices.

# port redirect of remapped ssh port (22001) on wan
#config redirect
#       option src              wan
#       option src_dport        22001
#       option dest             lan
#       option dest_port        22
#       option proto            tcp

config rule
        option src              wan
        option src_dport        22
        option proto            tcp
        option dest_port        ssh
        option target           ACCEPT

That left no ssh port open so I lost access to the device. So I checked what the difference is on my gl.inet 2-port builds that do work and found it had one extra file.

#ls -la files/etc/config/dropbear

# cat /etc/config/dropbear
config dropbear
        option PasswordAuth 'on'
        option RootPasswordAuth 'on'
        option Port         '22'
#       option BannerFile   '/etc/banner'

So at this point, I surmise that I need to include this file in my nexx builds in order to ensure that the ssh port gets opened.

I could either convert the 3020 to OpenWrt using a pre-built firmware first but have usually always used Image Builder to build and used the factory build to convert it to my own, saving one extra step.

PS: There was one weird thing happening with the other three that I can no longer reach. They would start up, pick up an IP so I would nmap the device and found that each time they restarted, they had a new mac address showing. I cannot explain this one.

(Last edited by projects on 12 Apr 2016, 16:12)

-ppp -ppp -mod-pppoe -kmod-ppp -kmod-pppoe

Typo? 2x -ppp + 1x -mod-pppoe doesn't look right to me.


option dest_port        ssh

Is this correct? I would expect a numerical value instead of 'ssh'.


each time they restarted, they had a new mac address showing. I cannot explain this one.

I can't either, but sounds strange enough to assume that this could be part of your problem.

This is the command I am using. That was a typo.

make image PROFILE=MT7620a PACKAGES="libstdcpp ca-certificates libpthread bash curl kmod-ipv6 -dnsmasq -kmod-ath9k -uboot-envtools -wpad-mini -ppp -ppp-mod-pppoe -kmod-ppp -kmod-pppoe -kmod-usb-core -kmod-usb2 -kmod-ledtrig-usbdev -kmod-usb-ohci -kmod-usb-hid" FILES=files/

I basically just want a DHCP client and in this case, in bridge mode, passing packets from one NIC to the other and nothing more.

In terms of the firewall, what I found different in the other two port devices are that the firewall file is there but that the dropbear file seems to override and allow ssh. That was just something I tried on the last build where I lost the device.

So, I'm ready to try again.

I have only two files in files/etc/config
This configuration works with the two port gl.inet.

# cat files/etc/config/dropbear
config dropbear
        option PasswordAuth 'on'
        option RootPasswordAuth 'on'
        option Port         '22'
#       option BannerFile   '/etc/banner'
# cat files/etc/config/network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option force_link '1'
        option type 'bridge'
        option proto 'dhcp'

config interface 'wan'
        option ifname 'eth0.2'
        option force_link '1'
        option proto 'dhcp'

So, if I build and use the factory firmware, I should be ok no?

(Last edited by projects on 12 Apr 2016, 19:37)

Should I start a new post that is specifically about building now?

@projects
dont use PROFILE=mt7620a, it's a mediatek evaluation board profile, just remove PROFILE option and you will get a special image for wt3020

sta@x360-a8:~/openwrt/buildroot/OpenWrt-ImageBuilder-15.05.1-ramips-mt7620.Linux-x86_64/bin/ramips$ ls -a | grep 3020
openwrt-15.05.1-ramips-mt7620-wt3020-4M-squashfs-factory.bin
openwrt-15.05.1-ramips-mt7620-wt3020-4M-squashfs-sysupgrade.bin
openwrt-15.05.1-ramips-mt7620-wt3020-8M-squashfs-factory.bin
openwrt-15.05.1-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin

and finally get a ttl serial cable to restore yr units

As I've mentioned before, I have a ttl cable, just don't have time to mess with soldering right now so am keeping all the dead units to restore at a later date.

Wait now, the wiki says: System-On-Chip: MediaTek MT7620n
The device is a Nexx WT3020H, 8MB.

https://wiki.openwrt.org/toh/nexx/wt3020

Also, you're saying use the following?

make image PACKAGES="libstdcpp ca-certificates libpthread bash curl kmod-ipv6 -dnsmasq -kmod-ath9k -uboot-envtools -wpad-mini -ppp -ppp-mod-pppoe -kmod-ppp -kmod-pppoe
-kmod-usb-core -kmod-usb2 -kmod-ledtrig-usbdev -kmod-usb-ohci -kmod-usb-hid" FILES=files/



# make info
Current Target: "ramips (MT7620 based boards)"
Default Packages: base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools kmod-leds-gpio kmod-gpio-button-hotplug wpad-mini swconfig kmod-rt2800-pci kmod-rt2800-soc dnsmasq iptables ip6tables ppp ppp-mod-pppoe kmod-nf-nathelper firewall odhcpd odhcp6c
Available Profiles:

Default:
        Default Profile
        Packages: kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
AIBR100:
        Aigale Ai-BR100
        Packages: kmod-usb-ohci kmod-usb2
E1700:
        Linksys E1700
        Packages: swconfig
MT7620a:
        MT7620a EVB
        Packages: kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
MicroWRT:
        Microduino MicroWRT
        Packages: kmod-usb-core kmod-usb2 kmod-usb-ohci
XIAOMI-MIWIFI-MINI:
        Xiaomi MiWiFi Mini
        Packages: kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci kmod-mt76
root@wrt:/clients/cc-15.05-nexx#

projects wrote:

Also, you're saying use the following?

make image PACKAGES="libstdcpp ca-certificates libpthread bash curl kmod-ipv6 -dnsmasq -kmod-ath9k -uboot-envtools -wpad-mini -ppp -ppp-mod-pppoe -kmod-ppp -kmod-pppoe
-kmod-usb-core -kmod-usb2 -kmod-ledtrig-usbdev -kmod-usb-ohci -kmod-usb-hid" FILES=files/

exactly

What about the files I'm going to use in files/etc, are those ok, safe, won't get locked out?
I'm looking to end up with a DHCP client that works in bridge mode, port to port, not much else.

can't find anything wrong in your files, but to be sure i need to compare it with files generated by firstboot with an original wt3020 image

(Last edited by stas2z on 14 Apr 2016, 20:33)

FYI
by removing wpad-mini you are disabling wifi ap functionality at all cuz it contains hostapd binaries

stas2z wrote:

FYI
by removing wpad-mini you are disabling wifi ap functionality at all cuz it contains hostapd binaries

Yes, we don't use wi-fi on these because I don't know how to build a very basic web page that would allow someone to enter the SSID and password for the local wireless hot spot.

stas2z wrote:

can't find anything wrong in your files, but to be sure i need to compare it with files generated by firstboot with an original wt3020 image

I think I know what you mean. You mean, use a known good factory build where I can convert the unit from Chinese to OpenWrt, then look at the files in /etc/config right?

I see the following file in the wiki for this device. Should I use this? (Notice it says mt7620)

https://downloads.openwrt.org/chaos_cal … actory.bin

Once I've compared the files and have a working build, then I don't need this double step right? At that point, I can use my own factory build on new devices I want to convert?

(Last edited by projects on 14 Apr 2016, 23:21)

Ok, I've built one and it's now running openwrt, the build above. The first set of files are the defauls from the factory build I downloaded. I'm assuming no one wants me to upload all of the files in the /etc/config.

Dropbear

config dropbear
    option PasswordAuth 'on'
    option RootPasswordAuth 'on'
    option Port         '22'
#    option BannerFile   '/etc/banner'

Network

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd25:1565:a5e2::/48'

config interface 'lan'
    option ifname 'eth0.1'
    option force_link '1'
    option macaddr '20:28:18:a1:8f:36'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0.2'
    option force_link '1'
    option macaddr '20:28:18:a1:8f:37'
    option proto 'dhcp'

config interface 'wan6'
    option ifname 'eth0.2'
    option proto 'dhcpv6'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '1 2 3 4 6t'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '0 6t'

Seems like wireless should be enabled since there are wireless files in /etc/config but I don't see anything broadcasting.

So, all I need to do is to add my dropbear and network files which contain the following in my files/etc/config right?

# cat files/etc/config/dropbear
config dropbear
        option PasswordAuth 'on'
        option RootPasswordAuth 'on'
        option Port         '22'
#       option BannerFile   '/etc/banner'

# cat files/etc/config/network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option force_link '1'
        option type 'bridge'
        option proto 'dhcp'

config interface 'wan'
        option ifname 'eth0.2'
        option force_link '1'
        option proto 'dhcp'

(Last edited by projects on 14 Apr 2016, 23:39)

I've never understood how you make changes to the config files. It seems that you can leave the whole factory file in place, editing only the changes you'd like but it also seems that you just add the changes you'd like and don't even need the whole file.

For example, my network file. This works on another 2 port device I'm using, I only add the changes I'd like and don't include the rest of the file. The device defaults to anything which is not specifically changed in the config files.

Is this right??

(Last edited by projects on 15 Apr 2016, 16:13)

projects wrote:

I've never understood how you make changes to the config files. It seems that you can leave the whole factory file in place, editing only the changes you'd like but it also seems that you just add the changes you'd like and don't even need the whole file.

For example, my network file. This works on another 2 port device I'm using, I only add the changes I'd like and don't include the rest of the file. The device defaults to anything which is not specifically changed in the config files.

Is this right??

you need to put whole config files into the folder you specify in the FILES option, not only changes

stas2z wrote:

you need to put whole config files into the folder you specify in the FILES option, not only changes

Ah, ok. Strange that my gl.inet builds work then.

I'll post what I'll be using just to be safe before building.

So, I'll include the dropbear file.

Don't really need the wifi stuff in the network file since I'm not installing any wifi stuff. I would like to enable wifi, making the device only a dhcp client however but need a very basic web page on the device to allow someone to enter the SSID/password without any other access.

In the factory network file, the device MAC address is there but since I am using this build with other devices, I could remove this right?

Also, since I only want a pass-through device (bridge), do I really need to put dhcp in both interfaces?
I will be connecting the device to my router, where it will pick up a dhcp IP. Then from the lan side, I'll be able to ssh into the device as needed.

So basically

router(dhcp) -- nexx-wan -- passing packets to lan port -- nexx-lan(connected to lan side)


x# cat files/etc/config/network
config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

#config globals 'globals'      Removed
#option ula_prefix 'fd25:1565:a5e2::/48'      Removed

config interface 'lan'
    option ifname 'eth0.1'
    option force_link '1'
    option type 'bridge'
    option proto 'dhcp'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0.2'
    option force_link '1'
    option proto 'dhcp'

config interface 'wan6'
    option ifname 'eth0.2'
    option proto 'dhcpv6'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '1 2 3 4 6t'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '0 6t'

(Last edited by projects on 15 Apr 2016, 18:41)

if you need a bridge you can put both ports to the first vlan

I don't know what that means.

My gl.inet works fine and here is the config it has.

# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd56:387c:7fca::/48'

config interface 'lan'
        option ifname 'eth0 eth1'
        option type 'bridge'
        option proto 'dhcp'

That's it, there isn't anything else in that file.

(Last edited by projects on 15 Apr 2016, 21:23)

projects wrote:

I don't know what that means.

My gl.inet works fine and here is the config it has.

# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd56:387c:7fca::/48'

config interface 'lan'
        option ifname 'eth0 eth1'
        option type 'bridge'
        option proto 'dhcp'

That's it, there isn't anything else in that file.

You configured a soft bridge, joining both ports into vlan 1 will give you a hardware switch.

your gl.inet can work if wan port is configured (or implemented as a standalone phy) as eth1 by default (and lan as eth0), at uboot stage for example
but it doesn't means all devices configured the same way and have the same hardware.
So the switch config section have to exists anyway for devices with switch hardware (wt3020 uses mt7620 internal switch).

To make a hardware bridge with both ports included you need the following switch section in your /etc/config/network file

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option force_link '1'
    option ifname 'eth0.1'
    option type 'bridge'
    option proto 'dhcp'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0 1 2 3 4 6t'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '6t'

and don't forget to use eth0.1 as a lan interface

(Last edited by stas2z on 15 Apr 2016, 21:43)

To confirm, are you saying I should use the file exactly as you've shown it above? I don't want to lose this device smile

projects wrote:

To confirm, are you saying I should use the file exactly as you've shown it above? I don't want to lose this device smile

yeah, it's whole /etc/config/network you need

you can make following steps instead to be more accurate

get the default network config
remove wan interface
remove 0 (ex wan port) from vlan 2 switch ports section and add it to vlan 1 switch ports section

(Last edited by stas2z on 15 Apr 2016, 22:09)

Alright, have built and will be using the following files;
openwrt-15.05-ramips-mt7620-wt3020-8M-squashfs-factory.bin
openwrt-15.05-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin

Since the device was already converted to OpenWrt, I'll be using the sysupgrade file.

And she works!

Adding the dropbear file gave me ssh access.
It is a DHCP client when connected to LAN port.
I'm assuming if I connect the WAN port to the DHCP/Router, then connect the LAN to the LAN side, it'll be a pass-through (hardware) bridge device now.

I'll need to convert my gl.inet to a hardware bridge I guess.

Help is so very much appreciated on this site. It is a struggle doing this when you are not a programmer.
Now I need to look at why the device is not running the scripts it was supposed to. That is odd, something changed.

# opkg install logger_latest.ipk
Unknown package 'logger'.
Collected errors:
* pkg_hash_fetch_best_installation_candidate: Packages for logger found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package logger.

Probably something in the programming and not openwrt.

(Last edited by projects on 16 Apr 2016, 18:10)

projects wrote:

Packages for logger found, but incompatible with the architectures configured

you need to compile your package for ramips 24kec architecture

The discussion might have continued from here.