BPI-R2 new image: Basic Alpine Router Platform with WIFI AccessPoint on Pantavisor 005 (2018-06-17)

Hi all,

to get this week started, I am sharing another drop of our basic alpine router platform for BPI-R2 community. Hope you like it!

This latest platform comes with out of the box WIFI AccessPoint serving DHCP leases.

The Get-Going is as trivial as it gets:

  1. install the bits on your BPI-R2 board as documented below,
  2. plug your board through WAN port to an outgoing router that serves DHCP leases
  3. boot the board and use it…

Once booted, internal clients can connect through internal LAN ports or (NEW in this image) through WIFI AP (WPA2-PSK on 2.4GhZ):

  • SSID: panta-alpine
  • Passphrase: pantacor

Remember to connect your antenna as signal seems to be pretty weak without it.

SSH credentials are:

  • user: root
  • password: pantacor

Enjoy!


Upgrade Install

If you are running the previous image and have registered with pantahub, you can simply upgrade your device to this new revision using the pvrcommands:

Clone example device:

$ pvr clone https://pvr.pantahub.com/examples/bpi-r2-alpine-router-wifi
*** Login (/type [R] to register) @ https://api.pantahub.com/auth (realm=pantahub services) ***
Username: asacasa
Password: *****
a1e66e8dc8a854b [OK]
1aa4d6f0c7c50f0 [OK]
c998fc6c636e8fd [OK]
61e0ef00072f8c4 [OK]
3aa5f7239334571 [OK]
430257ccaa7afda [OK]
f643d36010b6851 [OK]
fc2714427ff4e98 [OK]

PVR-Clone

Post to device

$ pvr post https://pvr.pantahub.com/asacasa/vocal_parrot
bpi-r2-wifi- [OK]
bpi-root.lxc [OK]
kernel.im [OK]
pantavisor.b [OK]
bpi-config.s [=================================================================================] 1m13s [OK]
bpi-root.squ [=================================================================================] 1m13s [OK]
modules.squa [=================================================================================] 1m13s [OK]
bpi-firmware [=================================================================================] 1m13s [OK]
Posted JSON: {"id":"5b095e90b9aee40009a607cf-2","owner":"prn:::accounts:/59ef9e241e7e6b000d3d2bc7","device":"prn:::devices:/5b095e90b9aee40009a607cf","committer":"","trail-id":"5b095e90b9aee40009a607cf","rev":2,"commit-msg":"","state":{"#spec":"pantavisor-multi-platform@1","bpi-config.squashfs":"430257ccaa7afda914c88142f8453029ee3b30151d7fc1db1308fd4d8556067b","bpi-firmware.squashfs":"f643d36010b6851f011d81534788f2cad11ae2f469c7c2796d9905d126c5a59b","bpi-r2-wifi-firmware.cpio.gz4":"fc2714427ff4e986091776531b2651312795e97dedb6c9ee818e44552e19b1d8","bpi-root.json":{"configs":["bpi-root.lxc.config"],"exec":"/sbin/init","name":"bpi-root","share":["NETWORK","UTS","IPC"],"type":"lxc"},"bpi-root.lxc.config":"a1e66e8dc8a854bd6ffd6da26c27b1ddb0affbe6aca26de2fdf719a7fbbaf1f8","bpi-root.squashfs":"1aa4d6f0c7c50f0343e63f14fab64c0780994ae50c647d1e9124eddf7884345b","kernel.img":"c998fc6c636e8fd5e5432955ec03cf045fe487b5741bc9f7b42bb01590e1ac9d","modules.squashfs":"61e0ef00072f8c426ce5c98ca8a0ca054a017bc4faa8dd5c0334d82311f768ef","pantavisor.bpiwifi.cpio.xz4":"3aa5f7239334571f3831ddfb3ae279c9d52f9e08527eabfe9039c33cc62666ca","pantavisor.json":{"addons":["bpi-r2-wifi-firmware.cpio.gz4"],"firmware":"/volumes/bpi-firmware.squashfs","initrd":"pantavisor.bpiwifi.cpio.xz4","linux":"kernel.img","platforms":["bpi-root"],"volumes":["bpi-root.squashfs","bpi-config.squashfs","bpi-firmware.squashfs","modules.squashfs"]}},"progress":{"progress":0,"status-msg":"","status":"NEW","log":""},"step-time":"2018-06-17T22:04:04.381628938Z","progress-time":"1970-01-01T00:00:00Z"}

PVR-Post

Your device will then upgrade to this image and reboot into the new experience automatically.

BTW, you can monitor log output of your device on pantahub.com LIVE:

PantaHub-DeviceLog

First time install

First time install is done through flashing the image you can download below to your SD card and boot it.

Once device is up it will publish mDNS info about itself in local network and how to associate it with your pantahub account (“to claim the device”).

Discover device in local network

As describe in original announce you can find your device using pvr scan command:

$ pvr scan
Scanning ...
        ID: 5b0cf52979b74d0009a7175e (unclaimed)
        Host: linux.local.
        IPv4: [192.168.178.97]
        IPv6: [2a02:2028:708:3d01:602:a2ff:feb3:d4e8]
        Port: 22
        Claim Cmd: pvr claim -c brightly-immense-bat https://api.pantahub.com:443/devices/5b0cf52979b74d0009a7175e

You can use IP to SSH into your device (user/pass: root/pantacor) or you can use the “Claim” info to associate this device with your pantahub account and bring it under your control.

Claim: Associate device with Pantahub account

To claim you simply run the command shown in pvr scan output above.

$ pvr claim -c brightly-immense-bat https://api.pantahub.com:443/devices/5b0cf52979b74d0009a7175e

On success, your device will be associated with your account and after a couple minutes (it is doing an initial sync of state) you will see it appear on your personal pantahub device list like here:

PantaHub-NewDeviceSynched

Share your own device

Above pvr URL is provided by us, but you can also share your own devices with the community.

To give it a whirl, try changing the pvr clone above and post it to your device.

Once it works you can hit the “publish” button in the UI like below and then post your pvr url to a friends or to this forum.

PantaHub-PublishDevice1 PantaHub-PublishDevice2

Downloads

SD-Card images:

PVR Command Line Tool (download to PATH directory and make executable):

Open Source

Pantahub as well as pantavisor technology are fully open source, e.g.

For your convenience we offer a reference deployment at https://www.pantahub.com; you will give you storage and bandwidth free of charge so you can get going without having to worry with operating your own server infrastructure.

Of course, you can also deploy your own instance …

3 Likes

since LEDE is still not ready for wifi, i will give them a try…

does pantavisor have an local webinterface ? for ex. as luci ? i don’t want to remote control my router over pantahub…

It works really nice and directly…

awesome to hear that the default experience worked :).

For your other question: the current alpine image tries to be good at having defaults that just work ™ for developers that want a quick start (and seems we achieved that goal based on your latest reply). However, there is no Luci Type admin interface for alpine and I don’t think there should be one. (openwrt covers that type of usage quite well and should just make that work on BPI-R2 next :)).

But anyway, would love to hear more about what configs you feel would be nice to have available locally. Maybe there is something where I can do something easy to make you even happier!

  • Alexander

Thanks a lot Alexander, i am right now working on syncthing and it is possible to delete the pandacor integration from alpine ?

The alpine system itself has no pantacor integration. So whatever you do in alpine, will stay in alpine. No data touched, read etc.

Only thing we currently do in relation to pantavisor is publish the avahi info on your local network. That one you can disable probably pretty easily.

The alpine system is build using “make export” in https://gitlab.com/pantacor/pvplatform-alpine-router/ … you can change stuff there (like Dockerfile) create the squashfs and replace what is on disk afterwards or send to your device through:

pvr clone => => pvr commit => pvr post

Hope this helps.

1 Like

Thanks again Alexander, i am not familiar with Docker right now, but it is on my to do list.

Greetings

@asac Not fully evaluated. However, the AP mode and 4 LAN ports are working out of box. Great. The UI (like LUCI) for router configuration is a major feature we missed out.

I have 4G LTE module on R2 board. Can this router firmware will share it’s 4G internet via AP mode to other WIFI clients?. If so, can you share some guidance on how to do it?.

TIA.

How I can configure my R2?

This image works very nicely out of the box, thank you!

I have one question regarding startup: When I start the board after it has been disconnected from power for some time, I have to press the PWR and BOOT button simultaneously, so that the board starts up. If I disconnect it from power and then reconnect within a short time, it boots automatically. Is there any way to configure the board so that it always boots automatically when I apply power to it?

you can refer to below discussion. :grinning: http://forum.banana-pi.org/t/bpi-r2-boot-power-suppy/3647/53

How can I disable DHCP on the eth0 interface and keep it enabled on ap0?

My guess was to remove the /etc/udhcpd.conf, but that only led to it using default values. Then I stopped the service using /etc/init.d/udhcpd stop, but somehow dhcp still seems to be running. I also found out that the status of the serivces udhcpd and udhcpd.ap0 seem to be “crashed” most of the time (while dhcp on both interfaces still seems to be running.

What seems to “work” is to enter a non-existing interface name in /etc/udhcpd.conf. But that feels like the worst possible solution. Any ideas anyone? :slight_smile:

Hi guys I have installed alipne into R2 and want to change wifi ssid and password. Can you give help?

I successfully booted into the system and claimed the device, but the following message keeps showing in my serial console:

 failed to connect to api.pantahub.com:443
  ! mbedtls_net_connect fd=-1

 failed
  ! mbedtls_ssl_write returned -28928

failed
  ! write returned -28928

Is that a problem?

@asac

Great job. Do you plan to update to alpine linux 3.10?

I just started working on BPI-R2 for some project again, so yes, chances are higher that I will get to also update the alpine image at some point :).

No those can be safely ignored. If I spin a new image with latest pantavisor etc all those warnings would be gone also afaik.

Great; any news regarding Alpine linux update? Or tell me how to install Alpine linux on BPI R2. Thanks.

apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev make pip3 install docker-compose

apk update && apk add --no-cache --virtual docker-cli python3 docker-compose-deps python3-dev libffi-dev openssl-dev gcc libc-dev make python3 py3-pip py-pip curl libffi-dev openssl-dev gcc libc-dev rust cargo make pip install docker-compose

apk update && apk add --no-cache --virtual docker-cli python3 .docker-compose-deps python3-dev libffi-dev openssl-dev gcc libc-dev make python3 py3-pip py-pip curl libffi-dev openssl-dev gcc libc-dev rust cargo make

pip install docker-compose

Helo! Congratulations for the work! First I’m sorry for the weak English! I’m new to alpine and banana pi r2. I downloaded the Alpine Pantacor 005 image and pre-purchased the sdcard for the balena etecher, it worked very well. I used ssh to access the banana pi r2.

However I tried to install docker-compese using tutorialhttps: //wiki.alpinelinux.org/wiki/Docker, without success. My goal is to install shinobicctv / shinobi, using tutorial https://www.youtube.com/watch?v=k7_-dSVihhs, but it works.

look at the errors that appear:

1- install shibobi:

 localhost: ~ # docker-compose up -d
-ash: docker-compose: not found

2- install docker-compose: apk add docker-compose

ERROR: unsatisfiable constraints:
  py3-attrs (missing):
    required by: py3-jsonschema-3.2.0-r2 [py3-attrs] py3-jsonschema-3.2.0-r2 [py3-attrs] py3-jsonschema-3.2.0-r2 [py3-attrs]
                 py3-jsonschema-3.2.0-r2 [py3-attrs]
  py3-certifi-2017.7.27.1-r1:
    breaks: docker-compose-1.28.0-r1 [py3-certifi> = 2020.4.5.1]
    satisfies: py3-requests-2.18.4-r0 [py3-certifi]
  py3-idna-2.6-r0:
    breaks: docker-compose-1.28.0-r1 [py3-idna> = 2.8]
    satisfies: py3-cryptography-2.1.4-r0 [py3-idna] py3-requests-2.18.4-r0 [py3-idna]
  py3-requests-2.18.4-r0:
    breaks: docker-compose-1.28.0-r1 [py3-requests> = 2.22.0]
    satisfies: docker-py-5.0.0-r0 [py3-requests]
  py3-paramiko-2.4.2-r0:
    breaks: docker-compose-1.28.0-r1 [py3-paramiko> = 2.7.1]
  py3-yaml-3.12-r1:
    breaks: docker-compose-1.28.0-r1 [py3-yaml> = 5.3]
  py3-setuptools (missing):
    required by: docker-compose-1.28.0-r1 [py3-setuptools] docker-compose-1.28.0-r1 [py3-setuptools]

3: just use shinobicctv / shinobi docker pull: shinobicctv / shinobi docker pull

Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. 

Is the docker daemon running?

my docker seems to have started:

localhost:~# /etc/init.d/docker start
 * WARNING: docker has already been started

can help!

thanks