OpenWRT for VIM2!

OpenWRT Supported Boards:

Thanks:

Big thanks to our forum users who provided valuable feedback in helping to squash bugs related to the VIM1 and VIM2!

Khadas VIM OpenWRT Changelog:

Release 0.31

  • VIM2 ethernet fixed, Hotplug and reinit without bugs! OK

Khadas VIM OpenWRT release 0.3

  • Added support for VIM2 (Wi-Fi Chip AP6356S, VIM2 v14 test mode )
  • Pre-installed samba, mdns, ttyd, thd + many other packages
  • Fixed ethernet for VIM2, however still not possible reinit Ethernet iface
  • Improved startup speed ~ 7 seconds
  • LED indicators - supported
  • Physical button KEY_F - reset wifi
  • Physical button KEY_P - power off
  • Initial optimization for Ethernet USB MMC subsystems
  • Change default hostname to: openwrt-vim, and mdns name to: openwrt-vim.local
  • Many additional improvements

Khadas VIM OpenWRT release 0.2

  • USB 3G/4G modems - OK
  • Improve build scripts
  • Some random changes

Download Images

OpenWRT Access:

LAN IP Resolution to Local OpenWRT Hosts:

172.23.0.1 openwrt-vim.local

mDNS:

  • OpenWrt._ssh._tcp.local
  • OpenWrt._http._tcp.local

Notes:

  • “Blink LED mode” will be activated after OpenWRT successfully boots.
  • Immediately set your root and wifi password after installation!
  • USB network connection enabled by default in bridge mode with LAN.
  • If your VIM is connected via USB cable to your PC, you can access the LAN via USB-net without any extra configuration.

Installation:

  • Just burn the image to an SD card using Rufus, DD or Etcher.

Linux - one-line-command for downloading and writing to SD

# Write VIM2 image
wget -O- https://dl.khadas.com/Firmware/VIM2/OpenWrt/VIM2.OPENWRT.18.06.4.v0.31.sd.img.gz | gzip -dc | sudo dd of=/dev/SD_CARD

# Write VIM2 image
wget -O- https://dl.khadas.com/Firmware/VIM1/OpenWrt/VIM1.OPENWRT.18.06.4.v0.31.sd.img.gz | gzip -dc | sudo dd of=/dev/SD_CARD

Linux - default installation method

wget http://SERVER/IMAGE.sd.zip
unzip -p IMAGE.sd.zip '*.img' | sudo dd bs=1M of=/dev/YOUR_SD_CARD

wget http://SERVER/IMAGE.sd.img.gz
gzip -dc IMAGE.sd.img.gz | sudo dd bs=1M of=/dev/YOUR_SD_CARD

Install OpenWRT to EMMC from SD Card

root@openwrt:/# mmc_install_from_sd

More Information:

4 Likes

diyHue running on OpenWrt Khadas Vim1. tested and running

https://diyhue.readthedocs.io/en/latest/

2 Likes

HI,
Have VIM2 pro 1.4 and wireless is not working

how I enable it?

VIM2 can have different WIFI chips
Check announce topic for validated chips
Sorry but pro version have not supported chip for mainline kernel
But we try change it in next releases

1 Like

Hi @tsangyoujun,

I have managed to install openwrt (latest 0.6 version) on my vim2 max and was testing Ethernet connection speed.

To my surprise the speed is quite low. I get only 2-3 Mbit for download and around 1.5 Mbit for upload.
Vim2 is connected directly to my router and uses DHCP to get IP (it is on the same subnet as my PC).

My PC with Linux mint 19.3 connected to the same router gets around 110 Mbit in download and 13 Mbit in upload speed.

What am I missing? What are your results in speed test?

Best regards,
S.

I can get warranty for openwrt its real 100 Mbit ethernet for both directions for ViM2
And 1000mbit for VIM3 and VIM3L
I have tested it already

If u have another result plz provide mode detail about your testing process

1 Like

Hi @hyphop,

I was wrong, built 0.5 version and installed it to emmc and speed over Ethernet is excellent.

I do have some strange errors in kermit console while booting. Take a look here : Strange errors

My speedtest is this:

Retrieving speedtest.net server list…
Selecting best server based on ping…
Hosted by Terrakom [net + tel + tv] (Zagreb) [5.57 km]: 16.015 ms
Testing download speed…
Download: 137.54 Mbit/s
Testing upload speed…
Upload: 14.44 Mbit/s

So it seems version 0.5 works :wink:

Also on build 0.6 there is no wifi as you wrote on github page (wireless config is empty).

Best regards,
S.

  1. speedtest via web service like speedtest.net its only for internet speed connection - but not for ethernet or wifi :wink:

Also on build 0.6 there is no wifi as you wrote on github page (wireless config is empty).

i think u check this image ?
VIMx.OpenWrt.19.07.0.servers.test.emmc.kresq

! show me wifi_sdio and iwconfig output

Hi @hyphop,

I hope you are chilling and enjoying your vacation :wink:

Will try to flash 19.07.0.servers version. Btw I have build myself openwrt and flashed :slight_smile:

I don’t see any explanation what is the difference between server version and standard version of openwrt? Can you explain what is the difference?

Btw what is the signal strength on openwrt in your testing? I have connected to OpenWrt SSID and my observation is that wifi signal is quite bad but it shouldn’t be because of vim2 hardware spec ?!?!
Will report my findings tonight when I get back home.

One more question, have you heard of this ROOter firmware by http://www.ofmodemsandmen.com/?
They made ROOter firmware especially for work with 3G/LTE modems and it would be nice to have something like that for vims :wink:

Best regards,
S.

COOL :wink: i hope its was very easy :wink:

I don’t see any explanation what is the difference between server version and standard version of openwrt? Can you explain what is the difference?

server variant have some addition packages ( u can get more infoabout them from sources - khadas-openwrt/scripts/post_install_servers at master ¡ hyphop/khadas-openwrt ¡ GitHub )

They made ROOter firmware especially for work with 3G/LTE modems and it would be nice to have something like that for vims

never hear about this FIRMWARE;)

i dont have any problem with modems in openwrt
i u still have problem plz inform me about them !

Yes, I could say for dummies :slight_smile: And lighting fast too.

S.

@hyphop,

I noticed that turning off wifi with wifi.off and then turning it on with wifi.on commands does nothing.
After turning wifi off I can’t turn it on, even after restarting networking with /etc/init.d/network restart?!

Only reboot helps to get back wifi on, very strange.
S.

this wifi chips drivers from broadcom very limited have many problems!!! and need special modification for openwrt

step by step i will make it !!!

U and everybody can help :wink: ( check sources | fork | and improve )

PS: we have cool hardware and have nice openwrt software base - lets improve it together

PSS: i will post more info about WIFI and howto configure WIFI hacks and fixs - next time

2 Likes

My wifi_sdio is:

root@openwrt-vim:/# wifi_sdio
mmc@70000 {
compatible = “amlogic,meson-gx-mmc\0amlogic,meson-gxbb-mmc”;
reg = <0x00 0x70000 0x00 0x800>;
interrupts = <0x00 0xd8 0x01>;
status = “okay”;
clocks = <0x03 0x5e 0x03 0x77 0x03 0x04>;
clock-names = “core\0clkin0\0clkin1”;
resets = <0x1a 0x2c>;
pinctrl-0 = <0x2d>;
pinctrl-1 = <0x2e>;
pinctrl-names = “default\0clk-gate”;
#address-cells = <0x01>;
#size-cells = <0x00>;
bus-width = <0x04>;
max-frequency = <0x5f5e100>;
non-removable;
disable-wp;
mmc-pwrseq = <0x2f>;
vmmc-supply = <0x30>;
vqmmc-supply = <0x31>;

			wifi@1 {
				reg = <0x01>;
				compatible = "brcm,bcm4329-fmac";
			};
		};

cat: can’t open ‘/sys/class/mmc_host/mmc0/mmc*/type’: No such file or directory
/sys/class/mmc_host/mmc2 (mmc2) → SDIO
DRIVER=brcmfmac
OF_NAME=wifi
OF_FULLNAME=/soc/apb@d0000000/mmc@70000/wifi@1
OF_COMPATIBLE_0=brcm,bcm4329-fmac
OF_COMPATIBLE_N=1
SDIO_CLASS=00
SDIO_ID=02D0:4359
MODALIAS=sdio:c00v02D0d4359
/sys/kernel/debug/mmc2/caps:0x40000101
/sys/kernel/debug/mmc2/caps2:0x00040000
/sys/kernel/debug/mmc2/clock:100000000
/sys/kernel/debug/mmc2/ios:clock: 100000000 Hz
/sys/kernel/debug/mmc2/ios:actual clock: 100000000 Hz
/sys/kernel/debug/mmc2/ios:vdd: 21 (3.3 ~ 3.4 V)
/sys/kernel/debug/mmc2/ios:bus mode: 2 (push-pull)
/sys/kernel/debug/mmc2/ios:chip select: 0 (don’t care)
/sys/kernel/debug/mmc2/ios:power mode: 2 (on)
/sys/kernel/debug/mmc2/ios:bus width: 2 (4 bits)
/sys/kernel/debug/mmc2/ios:timing spec: 0 (legacy)
/sys/kernel/debug/mmc2/ios:signal voltage: 1 (1.80 V)
/sys/kernel/debug/mmc2/ios:driver type: 0 (driver type B)
root@openwrt-vim:/Technical Support

and iwconfig:

root@openwrt-vim:/# iwconfig
gretap0 no wireless extensions.

eth1 no wireless extensions.

lo no wireless extensions.

br-lan no wireless extensions.

ifb0 no wireless extensions.

erspan0 no wireless extensions.

usb0 no wireless extensions.

eth0 no wireless extensions.

gre0 no wireless extensions.

ifb1 no wireless extensions.

wlan0 IEEE 802.11 Mode:Master Tx-Power=31 dBm
RTS thr:off Fragment thr:off
Power Management:on

Hi @hyphop,

openwrt for vim2 is definitively a promising firmware but for now is in fat alpha :smiley: unstable and not for daily usage.

Hopefully in time, we will have a mighty firmware.

Enjoy on your vacation, won’t bother you :wink:

S.

yes - agree !!! but all problem is only onboard wifi (i know about this problems ) - i have test day by day : vim2 and vim1 like wifi + vpn router + ethernet extension - in 24x7 mode about 2 month already and i can say ) its usable already !!! ( but need some experience level)

openwrt can provide wide ranges of task - not only as wifi router!!!
every time - my choose is openwrt - like good base for many different projects -
i think its one of the best linux distros

PS: if u need stable openwrt + Aarch64 base - u dont have big choose :wink:

3 Likes