BPI-R2 New Image Release : Ubuntu 16.04 V1.3 2018-3-30

Sweet. Thank you. I look forward to giving it a go.

Hello,you can download image from google drive now,

https://drive.google.com/file/d/1Ze_YGDT3B1-P57wPcm3gcVFcCMfBLspL/view?usp=sharing

a new quesion: now this image works well, but lsusb cannot display anything about my 4G miniPCIe card. lspci is the same: no information displayed. in other linux embedded system, lsusb works with this card.

so what should I do next? to make a new kernel with BSP? or some steps wrong? thanks

USB D+ and D- pin aren’t connected to mPCIe slot, so card detection fail if you use mPCIe form factor USB 3G/4G card.

Ok, Got it, thanks for your anwser :slight_smile:

Hello Guys,

my ap0 seems to be gone… No change to reload or bring it back, any idea ? Nothing worked, nether the steps from garywang, frank-w

Have you tried

echo 0 >/dev/wmtWifi
echo A >/dev/wmtWifi

?

Blockquote

more than 10 times, nothing seems to bring it back…

@Jackzeng Continuously testing this image. So far so good except the MMC booting process is locked in maintenance mode when the board is NOT properly shutdown. It forced us to use the root password, check the memory error check by manually and reboot the system. This is a crucial step, wont allow the hardware bring back until the mmc error check should be fixed by manually. Is there anyway we can make this step done automatically during the bootup time or skip this step?.

TIA.

I just use “ctrl+D” to ignore this problem when met it before, but maybe we could try to fix it in the next few days.

Hello,Can you post your logs here?I checked wifi and ap,it could be created.

@Jackzeng assume, BPI-R2 is a gateway/router product. It dont have display/keyboard. In such case it is not possible for the user to solve this issue.

if using SD-Card you can remove it, put it in external pc, read logs and check filesystem

if using emmc, booting bpi-r2 with SD-Card, and then read logs via ssh

not for every user…but network-admin should be able to do this :wink:

you are right,I will try to fix this in next few days.

@frank-w,we could find a better and easy way to solve these problem,if R2 stuck in booting progress.

Hi,I succeed to create wifi/AP,and it works fine,could you show me your log?

image

my hostapd.conf

image

I use my PC connect R2 AP to post these messages to you:

image

Hi, good news… I will send you my logs in about 10 hours, when i arriving home.

I have the same issue, i do have the ap0 device but when i launch hostapd, the wifi SSID does not appears, I try with multiple devices.

# bash -x ./wifi.sh 
+ set +e
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/dev/null
+ NAME=wifi
+ DESC='Load MediaTek MT6625L firmware wifi & BT'
+ [[ -x /usr/bin/wmt_loader ]]
+ /usr/bin/wmt_loader
init combo device
Opened combo device
get device id : 30243
set device id : 30243
do module init: 30243
failed to init module 
+ sleep 3
+ [[ -c /dev/stpwmt ]]
+ sleep 5
+ /usr/bin/stp_uart_launcher -p /etc/firmware
open device node succeed.(Node:/dev/stpwmt, fd:3) 
chip id is 0x7623
chiId:0x7623, setting to property((null))
chiId:0x7623
run SOC chip flow
create pwr on thread ok
enter power on connsys flowpatch name pre-fix:ROMv2_lm_patch
fwVersion:0x8a00
/etc/firmware/ROMv2_lm_patch_1_0_hdr.bin
fw Ver in patch: 0x8a00
read patch info:0x22,0x00,0x06,0x00
gpatchnum = [2]
gdwonseq = [2]
/etc/firmware/ROMv2_lm_patch_1_1_hdr.bin
fw Ver in patch: 0x8a00
read patch info:0x21,0x00,0x0e,0xf0
gdwonseq = [1]
cmd(srh_patch) resp(ok)
+ [[ -c /dev/wmtWifi ]]
+ echo 0
+ sleep 5
+ echo A
+ sleep 2
+ ifconfig ap0
ap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::8:22ff:feca:ecfd  prefixlen 64  scopeid 0x20<link>
        ether 02:08:22:ca:ec:fd  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 526 (526.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

+ [[ 0 != \0 ]]
+ echo 'Done, all good, ready to lauch hostapd'
Done, all good, ready to lauch hostapd

Then i run hostapd

# hostapd -dd /etc/hostapd/hostapd.conf 
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=1
nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=6
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: interface ap0 in phy phy1
nl80211: Set mode ifindex 10 iftype 3 (AP)
nl80211: Setup AP(ap0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x570d20 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x570d20 match=
nl80211: Enable Probe Request reporting nl_preq=0x570d80
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x570d80 match=
nl80211: QCA vendor test command returned -95 (Operation not supported)
nl80211: Add own interface ifindex 8
nl80211: if_indices[16]: 8
nl80211: Add own interface ifindex 10
nl80211: if_indices[16]: 8 10
nl80211: Adding interface ap0 into bridge br0
phy: phy1
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=20 dBm
hw vht capab: 0x0, conf vht capab: 0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2437 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2437 MHz, cf2=0 MHz)
  * freq=2437
  * vht_enabled=0
  * ht_enabled=1
  * sec_channel_offset=0
  * channel_type=1
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
hostapd_setup_bss(hapd=0x56e9a0 (ap0), first=1)
ap0: Flushing old station entries
nl80211: flush -> DEL_STATION ap0 (all)
ap0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION ap0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface ap0 with hwaddr 02:08:22:ca:ec:fd and ssid "_test"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     5f 4b 61 59 61                                    _test         
PSK (ASCII passphrase) - hexdump_ascii(len=18): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Cannot read from /dev/random: Resource temporarily unavailable
random: Got 0/20 bytes from /dev/random
random: Only 0/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=56): 80 00 00 00 ff ff ff ff ff ff 02 08 22 ca ec fd 02 08 22 ca ec fd 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 05 5f 4b 61 59 61 01 08 82 84 8b 96 0c 12 18 24 03 01 06
nl80211: Beacon tail - hexdump(len=115): 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 2d 1a 0c 00 03 ff 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 3d 16 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 00 02 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=10
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=5):
     5f 4b 61 59 61                                    _test           
  * beacon_int=100
nl80211: hidden SSID not in use
nl80211: privacy=1
nl80211: auth_algs=0x1
nl80211: wpa_version=0x2
nl80211: key_mgmt_suites=0x2
nl80211: pairwise_ciphers=0x18
nl80211: group_cipher=0x10
nl80211: SMPS mode - off
nl80211: beacon_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: proberesp_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: assocresp_ies - hexdump(len=6): 7f 04 00 00 00 02
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=3 addr=0x521f2c key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   broadcast key
nl80211: Set ap0 operstate 0->1 (UP)
netlink: Operstate: ifindex=10 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
ap0: interface state UNINITIALIZED->ENABLED
ap0: AP-ENABLED 
ap0: Setup of interface done.
ctrl_iface not configured!
RTM_NEWLINK: ifi_index=10 ifname=ap0 operstate=6 linkmode=0 master=8 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK: ifi_index=10 ifname=ap0 operstate=6 linkmode=0 master=8 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK: ifi_index=10 ifname=ap0 master=8 operstate=6 ifi_family=7 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 8 for bridge br0
nl80211: Add own interface ifindex 8
nl80211: ifindex 8 already in the list
RTM_NEWLINK: ifi_index=10 ifname=ap0 master=8 operstate=6 ifi_family=7 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 8 for bridge br0
nl80211: Add own interface ifindex 8
nl80211: ifindex 8 already in the list
RTM_NEWLINK: ifi_index=10 ifname=ap0 master=8 operstate=6 ifi_family=7 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 8 for bridge br0
nl80211: Add own interface ifindex 8
nl80211: ifindex 8 already in the list
RTM_NEWLINK: ifi_index=8 ifname=br0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
ap0: Event INTERFACE_STATUS (5) received
Unknown event 5
RTM_NEWLINK: ifi_index=10 ifname=ap0 master=8 operstate=6 ifi_family=7 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 8 for bridge br0
nl80211: Add own interface ifindex 8
nl80211: ifindex 8 already in the list
VLAN: RTM_NEWLINK: ifi_index=10 ifname=ap0 ifi_family=7 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: vlan_newlink(ap0)

Seems like problem with random-device

Confirmed the issue was the entropy for WPA, as the system is doing nothing. I am still working to make all hardware.

random: Cannot read from /dev/random: Resource temporarily unavailable
random: Got 0/20 bytes from /dev/random
random: Only 0/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects

entropy_avail should be higher than 100

# cat /proc/sys/kernel/random/entropy_avail
3318

Install rng (Random Number Generator) to gain enough entropy for WPA,SSL,GPG key generation

apt-get install rng-tools
echo 'HRNGDEVICE=/dev/urandom' >> /etc/default/rng-tools
1 Like
docker0   Link encap:Ethernet  HWaddr 02:42:71:11:c3:47  
          inet addr:172.17.0.1  Bcast:172.17.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr ee:c8:85:f9:0a:59  
          inet addr:192.168.1.8  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ecc8:85ff:fef9:a59/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1139 errors:0 dropped:10 overruns:0 frame:0
          TX packets:734 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:153706 (153.7 KB)  TX bytes:105033 (105.0 KB)
          Interrupt:71 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:99 errors:0 dropped:0 overruns:0 frame:0
          TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:9877 (9.8 KB)  TX bytes:9877 (9.8 KB)