VoCore2 Screen: new firmware

After many weeks struggle, finally I finish the new firmware for the screen, this new firmware mainly improve the boot up speed of the screen, old one takes six seconds, new ones less than one. Also add control function to modify backlight strength and support 8bit/16bit/24bit pixel format.

Based on this firmware, now we can have:

1. Linux text console which is based on frame buffer 16bit or 32bit, old firmware only support 24bit.

2. super smooth games from GBA, NES, GEONEO. We support 8bit mode, now we have more CPU for game logic but not for screen data transfer.

3. smooth games from DOS. DOS games such as DOOM will be faster, such game 12fps is playable, new firmware will make it at least 15fps.

4. control rotate the screen, backlight.

The main optimize is for VoCore2 or other embed device with USB port but no display port such as HDMI. This solution will greatly save cost. For example, a chip with display port normally is over 5USD, it is not included DDR and flash yet, full solution with wifi, ethernet should be around 35USD, a screen with HDMI is around 25USD. So mass production is 60USD/pcs 10K unit.

For VoCore2 solution, only 33.99 + 17.99 = 52USD, this is just sample price! 🙂 mass production(1K unit) normally have 40% discount, totally cost should be around 30USD, only half!

What you will get for 30USD? 580MHz Linux based computer + 5 x 100Mbps ethernet + 150Mbps wifi + smooth UI display. It is fit for the control system, education toy solution for kids, also a good replace STM32 or RaspberryPi.

Linux console driver will be released in next week, need more hard work, I am enjoying it 🙂

VoCore2: alsa driver patch 1

Finally I recover from the fever, so happy back to work 🙂

Combine VoCore2 Ultimate firmware to latest openwrt is always one of my dream. Today I start first step.

VoCore2 ultimate has one driver is different than the single board version, it is ES8388 codec driver, but limited to my patch skill, it is so hard for me to patch it to openwrt system. After port mediatek wireless driver, I understand some of the secret now, so I can push the first version of es8388 driver to github/vonger/vocore2.

Compose

this patch has four files, 810,811 used to patch linux kernel, put it into openwrt/target/linux/ramips/patch 4.14/ then it should work. 811 is used to fix pinctrl driver, because refclk this name has used in many places, if we do not change the name, it will conflict with function named refclk. This patch I will try to submit to openwrt later, it is a bug. 🙂

rest is dts, VOCORE2.dtsi I change refclk pinmux from gpio to gpio refclk, so gpio0 pin will work as 12MHz clock.

PS: gpio0 is not real GPIO 0, it is actually GPIO 11 in register, nobody knows why ralink engineer named it gpio0, you can check its datasheet, really mess :p

How to use?

after patch everything and use the new dts then compile and flash to V2U(a lot of work), you can now try it.

But as I said, this is not a stable driver…es8388 driver is acting weird because I am a noob of alsa. I have to left some back door for hack. 🙂

in /sys/devices/platform/i2c-gpio/i2c-0/0-0010/ there are two file node named i2cread and i2cwrite, used to directly write to es8388 i2c driver and control the codec directly.

Before you use aplay xxx.wav play some sound, please run this command:

echo enable left mixer.
echo 2780 > /sys/devices/platform/i2c-gpio/i2c-0/0-0010/i2cwrite
echo enable right mixer.
echo 2a80 > /sys/devices/platform/i2c-gpio/i2c-0/0-0010/i2cwrite

echo 1a00 > /sys/devices/platform/i2c-gpio/i2c-0/0-0010/i2cwrite
echo 1b00 > /sys/devices/platform/i2c-gpio/i2c-0/0-0010/i2cwrite
echo 2e1e > /sys/devices/platform/i2c-gpio/i2c-0/0-0010/i2cwrite
echo 2f1e > /sys/devices/platform/i2c-gpio/i2c-0/0-0010/i2cwrite

first four lines are used to fix the wired bug, maybe my dts sound path setting is not correct cause this problem…(but everything looks correct for me)
second four lines are used to set the volume of left channel/right channel to max, careful your ear! 🙂

PSS: second four lines because I can not find a way to raise volume in aplay, in madplay volume works normal, if you use madplay, ignore those four lines.

My compiled firmware, just for test: http://vonger.cn/misc/vocore2/20181010-AUDIOTEST.bin

PSSS: recently github transfer speed is really fast, normally only 100KB/s, have to wait almost two hours…lol, should we thanks to Microsoft?

 

VoCore2: ethernet without transformer

note: Recently my team and myself are all sick… some packages shipping are delay. We will handle them in this week.

Some people on forum ask about this, this is my working solution to connect ethernet with VoCore2 P0 port. I have tried my best to make it simple, but only this way works.

It require at least eight 100nF cap at 50V(depends on your usage), also eight 49.9ohm resistor.

Currently I have done a new version of VoCore2, it has a USB to ethernet and one microSD slot. just want to make it thiner and easy to use.


PS:new version of VoCore2 now is using 0201 instead of 0402 for RF part. Its signal is better.

UBOOT: fix brick by UART + Ethernet

It is very slow to upload firmware by “0: Load system code then write to Flash via SERIAL.”

I find another way, “8: Start Web Server to load system code.”, only take few seconds(40~60s).

Here is its log 🙂 Anyway we do not need to care about it, only need to press 8 at start up.


After press 8, we can connect to VoCore uboot web page from remote computer now. Make sure your computer and VoCore are connected by ethernet cable.

Your computer side: need to setup your computer ip address to 192.168.1.100, mask 255.255.255.0 and default gateway to 192.168.1.123, remember disable DHCP and setup manually.

(Here miss some pictures, clever reader please help yourself)

Then open browser to address 192.168.1.123, you will see the upgrade page, choose upgrade file(normally VoCore2 upgrade firmware named YYYYmmdd(V).bin) then click on “Upload”(on VoCore2 part it will show Loading … and its progress), around 1minute, load done and VoCore will reboot automatically.

(Here also miss some pictures … it is late here, sweet bed … )

Good Luck :’)

 

PS: the original web upgrade page is ugly, I will try to make it better ( for me, at least )

Patch LuCI for VoCore2

Firmware link: http://vonger.cn/misc/vocore2/20180723V.bin

1. Click on “Scan”, it will show nearby access point, this mode is STA only, better to setting up in Point 2 to enable AP + STA.

2. Click Point 2, go to wireless setting.

In “General Setup” page, input your AP SSID.

Then in “Wireless Security”, setup your password, currently only WPA2 supported.

3. After that, click “Save & Apply”, then enable STA mode, wait around 10 seconds, setting up completed, now your VoCore can access internet.

mt76 or mt7628?

Currently openwrt has an opensource driver mt76, I have a study about it, every line of its code is very clear and beautiful, so it should be easy to replace official mt7628 with this one, unfortunately, I find it is very hard to understand its registers(mtk did not document any of that registers) so I can not setting up its interfaces unless do some hack 🙂

There is another way, enable cfg80211 in mt7628, I find it has some code about cfg80211, but I enable it in makefile, it can not work at all 🙂 guess it is not well tested…

VoCore2: LuCI

Setting STA mode by LuCI is always my target.

Spend some time learn about LuCI.

First fix is about the encryption:
Currently the encrypt do not have WPA/WPA2, it is because in /usr/lib/lua/luci/model/cbi/admin_network/wifi.lua:663, we should add hwtype=ralink to enable the encrypt ways.

Note: it only have hwtype == mac80211 or hwtype == broadcom, but no ralink, so we can not find WPA/WPA2 encryption and can not setup its password. I have submitted this patch to github/openwrt/luci, hope this can be fixed.

Second fix is about the scan:

This needs to rewrite iwinfo_wext_scan.c in libiwinfo.
Anyway, we can not use that “Join Network” button, because LuCI action/design is very weird, it will remove exists AP setting…and no way set it to “apcli0”.
There is an easy way to connect to STA, directly setting up client and it will be done.

My home router name is KOKO, so ESSID is KOKO, BSSID empty. Network already in setting, then select “Wireless Security” input your password.

VoCore2: WiFi modes(ADHOC) 2

AdHoc can not directly work that ways…
Find in source code, it must have CONFIG_STA_SUPPORT then you can enable that “NetworkType” setting.
But this driver do not support that mode I guess.
Have to check the source code again. There should be a way to enable it. :p

VoCore2: WiFi modes(ADHOC)

Just find some instruction to use the mt7628 driver by iwpriv, this still need work to make it work with uci system, but at least if you are using latest vocore2 wifi driver, you can start adhoc mode by iwpriv. 🙂

a> Config STA to link with AP which is OPEN/NONE(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=OPEN
3. iwpriv ra0 set EncrypType=NONE
4. iwpriv ra0 set SSID=”AP’s SSID”

b> Config STA to link with AP which is SHARED/WEP(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=SHARED
3. iwpriv ra0 set EncrypType=WEP
4. iwpriv ra0 set DefaultKeyID=1
5. iwpriv ra0 set Key1=”AP’s wep key”
6. iwpriv ra0 set SSID=”AP’s SSID”

c> Config STA to link with AP which is WPAPSK/TKIP(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=WPAPSK
3. iwpriv ra0 set EncrypType=TKIP
4. iwpriv ra0 set SSID=”AP’s SSID”
5. iwpriv ra0 set WPAPSK=”AP’s wpa-preshared key”
6. iwpriv ra0 set SSID=”AP’s SSID”

d> Config STA to link with AP which is WPAPSK/AES(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=WPAPSK
3. iwpriv ra0 set EncrypType=AES
4. iwpriv ra0 set SSID=”AP’s SSID”
5. iwpriv ra0 set WPAPSK=”AP’s wpa-preshared key”
6. iwpriv ra0 set SSID=”AP’s SSID”

e> Config STA to link with AP which is WPA2PSK/TKIP(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=WPA2PSK
3. iwpriv ra0 set EncrypType=TKIP
4. iwpriv ra0 set SSID=”AP’s SSID”
5. iwpriv ra0 set WPAPSK=12345678
6. iwpriv ra0 set SSID=”AP’s SSID”

f> Config STA to create/link as adhoc mode, which is OPEN/NONE(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Adhoc
2. iwpriv ra0 set AuthMode=OPEN
3. iwpriv ra0 set EncrypType=NONE
4. iwpriv ra0 set SSID=”Adhoc’s SSID”

g> Config STA to create/link as adhoc mode, which is WPANONE/TKIP(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Adhoc
2. iwpriv ra0 set AuthMode=WPANONE
3. iwpriv ra0 set EncrypType=TKIP
4. iwpriv ra0 set SSID=”AP’s SSID”
5. iwpriv ra0 set WPAPSK=12345678
6. iwpriv ra0 set SSID=”AP’s SSID”