Category Archives: VoCore

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”

VoCore2: Monitor/Sniffer on WiFi

It is pretty simple by using mt7628.ko(or directly use firmware http://vonger.cn/misc/vocore2/20180419V.bin)

First install libpcap.ipk and tcpdump.ipk

Then MonitorMode=2 is MONITOR_MODE_FULL, =1 is MONITOR_MODE_REGULAR_RX, =0 is OFF.

ifconfig mon0 up
iwpriv ra0 set MonitorMode=2
tcpdump -i mon0 -w /tmp/store.cap -vv

or tcpdump -i ra0 -w /tmp/store.cap -vv

The raw data is saved to /tmp/store.cap.
Now we can use wireshark to read store.cap, check the data we get from net. 🙂

PS: CMCC-XXX is everywhere, noise…

VoCore2: Show Multiple SSIDs(up to 16 SSID)

Today when I hack the mt7628 driver, I find this hidden feature( maybe not hidden, but at least no documentation at all )

Example come first, if we want 4 different SSIDs in same VoCore2, need to setting up /etc/wireless/mt7628/mt7628.dat

This is only works for mediatek wifi driver mt7628.ko, not sure if mt76 works.

Modify BssidNum, set it to 4.

BssidNum=4
SSID1=VoCore2
SSID2=VoCore2-GUEST
SSID3=VoCore2-HOST
SSID4=VoCore2-NAS

Then reboot, you will find four raX device in your device list.

ra1       Available private ioctls :
          set              (8BE2) : set 1536 char  & get   0      
          show             (8BF1) : set 1024 char  & get   0      
          get_site_survey  (8BED) : set   0       & get 1024 char 
          set_wsc_oob      (8BF9) : set 1024 char  & get 1024 char 
          get_mac_table    (8BEF) : set 1024 char  & get 1024 char 
          e2p              (8BE7) : set 1024 char  & get 1024 char 
          bbp              (8BE3) : set 1024 char  & get 1024 char 
          mac              (8BE5) : set 1024 char  & get 1024 char 
          rf               (8BF3) : set 1024 char  & get 1024 char 
          get_wsc_profile  (8BF2) : set 1024 char  & get 1024 char 
          get_ba_table     (8BF6) : set 1024 char  & get 1024 char 
          stat             (8BE9) : set 1024 char  & get 1024 char 

br-lan    no private ioctls.

mon0      Available private ioctls :
          set              (8BE2) : set 1536 char  & get   0      
          show             (8BF1) : set 1024 char  & get   0      
          get_site_survey  (8BED) : set   0       & get 1024 char 
          set_wsc_oob      (8BF9) : set 1024 char  & get 1024 char 
          get_mac_table    (8BEF) : set 1024 char  & get 1024 char 
          e2p              (8BE7) : set 1024 char  & get 1024 char 
          bbp              (8BE3) : set 1024 char  & get 1024 char 
          mac              (8BE5) : set 1024 char  & get 1024 char 
          rf               (8BF3) : set 1024 char  & get 1024 char 
          get_wsc_profile  (8BF2) : set 1024 char  & get 1024 char 
          get_ba_table     (8BF6) : set 1024 char  & get 1024 char 
          stat             (8BE9) : set 1024 char  & get 1024 char 

ra2       Available private ioctls :
          set              (8BE2) : set 1536 char  & get   0      
          show             (8BF1) : set 1024 char  & get   0      
          get_site_survey  (8BED) : set   0       & get 1024 char 
          set_wsc_oob      (8BF9) : set 1024 char  & get 1024 char 
          get_mac_table    (8BEF) : set 1024 char  & get 1024 char 
          e2p              (8BE7) : set 1024 char  & get 1024 char 
          bbp              (8BE3) : set 1024 char  & get 1024 char 
          mac              (8BE5) : set 1024 char  & get 1024 char 
          rf               (8BF3) : set 1024 char  & get 1024 char 
          get_wsc_profile  (8BF2) : set 1024 char  & get 1024 char 
          get_ba_table     (8BF6) : set 1024 char  & get 1024 char 
          stat             (8BE9) : set 1024 char  & get 1024 char 

lo        no private ioctls.

eth0.1    no private ioctls.

apcli0    Available private ioctls :
          set              (8BE2) : set 1536 char  & get   0      
          show             (8BF1) : set 1024 char  & get   0      
          get_site_survey  (8BED) : set   0       & get 1024 char 
          set_wsc_oob      (8BF9) : set 1024 char  & get 1024 char 
          get_mac_table    (8BEF) : set 1024 char  & get 1024 char 
          e2p              (8BE7) : set 1024 char  & get 1024 char 
          bbp              (8BE3) : set 1024 char  & get 1024 char 
          mac              (8BE5) : set 1024 char  & get 1024 char 
          rf               (8BF3) : set 1024 char  & get 1024 char 
          get_wsc_profile  (8BF2) : set 1024 char  & get 1024 char 
          get_ba_table     (8BF6) : set 1024 char  & get 1024 char 
          stat             (8BE9) : set 1024 char  & get 1024 char 

ra3       Available private ioctls :
          set              (8BE2) : set 1536 char  & get   0      
          show             (8BF1) : set 1024 char  & get   0      
          get_site_survey  (8BED) : set   0       & get 1024 char 
          set_wsc_oob      (8BF9) : set 1024 char  & get 1024 char 
          get_mac_table    (8BEF) : set 1024 char  & get 1024 char 
          e2p              (8BE7) : set 1024 char  & get 1024 char 
          bbp              (8BE3) : set 1024 char  & get 1024 char 
          mac              (8BE5) : set 1024 char  & get 1024 char 
          rf               (8BF3) : set 1024 char  & get 1024 char 
          get_wsc_profile  (8BF2) : set 1024 char  & get 1024 char 
          get_ba_table     (8BF6) : set 1024 char  & get 1024 char 
          stat             (8BE9) : set 1024 char  & get 1024 char 

ra0       Available private ioctls :
          set              (8BE2) : set 1536 char  & get   0      
          show             (8BF1) : set 1024 char  & get   0      
          get_site_survey  (8BED) : set   0       & get 1024 char 
          set_wsc_oob      (8BF9) : set 1024 char  & get 1024 char 
          get_mac_table    (8BEF) : set 1024 char  & get 1024 char 
          e2p              (8BE7) : set 1024 char  & get 1024 char 
          bbp              (8BE3) : set 1024 char  & get 1024 char 
          mac              (8BE5) : set 1024 char  & get 1024 char 
          rf               (8BF3) : set 1024 char  & get 1024 char 
          get_wsc_profile  (8BF2) : set 1024 char  & get 1024 char 
          get_ba_table     (8BF6) : set 1024 char  & get 1024 char 
          stat             (8BE9) : set 1024 char  & get 1024 char 

eth0      no private ioctls.

eth0.2    no private ioctls.

apcli1    Available private ioctls :
          set              (8BE2) : set 1536 char  & get   0      
          show             (8BF1) : set 1024 char  & get   0      
          get_site_survey  (8BED) : set   0       & get 1024 char 
          set_wsc_oob      (8BF9) : set 1024 char  & get 1024 char 
          get_mac_table    (8BEF) : set 1024 char  & get 1024 char 
          e2p              (8BE7) : set 1024 char  & get 1024 char 
          bbp              (8BE3) : set 1024 char  & get 1024 char 
          mac              (8BE5) : set 1024 char  & get 1024 char 
          rf               (8BF3) : set 1024 char  & get 1024 char 
          get_wsc_profile  (8BF2) : set 1024 char  & get 1024 char 
          get_ba_table     (8BF6) : set 1024 char  & get 1024 char 
          stat             (8BE9) : set 1024 char  & get 1024 char 

Now we can use every ra0, ra1, ra2, ra3 same time by one VoCore2. 🙂
And we can setting network, firewall to use them for guest, nas etc…

PS: it support up to 16 ssids, you need to modify its setting in the same file.

Have fun!

mine is working so well.