Thursday, April 30, 2020

A simpler alternative for an offgrid emergency cyberdeck using "Internet in a Box "on Raspberry Pi

For alot of newbies, setting up the various software for offgrid access can be alot of stress and frustrations, especially testing it out, and troubleshooting, are very time consuming process. If you messed up during the installation for any of the various software, and you have to re-start the whole process again..... that is going to be another bummer. Imagine spending alot of hours.....

One good and simpler alternative is to use "Internet in a Box" .

Installation is simple, it has most of the stuff you will need, check out the FAQ. You have 3 choices to select when you run the install script: Min, Med, or Big. Checkout the software in each bundle here. You need to scroll down. A screenshot of the list is below:


You can load up contents using USB thumbdrive or harddisk. 

The entire world map can be downloaded from Openstreetmap from the admin console, you can select the region to download to save space. The entire world map is about 150Gb. Here is the rendering from the downloaded file for North America:


Here are various screenshots from Admin page and the various software:








After you had installed your Raspberry Pi with either Full or Lite(headless server mode), you need to run the following:

curl d.iiab.io/install.txt | sudo bash

Here is the link to the site, as of this writing, the latest version is 7.1. 

Here is the script from install.txt:

#!/bin/bash
# Copied from: https://github.com/iiab/iiab-factory/blob/master/install.txt

# To install Internet-in-a-Box (IIAB) 7.1 / pre-release onto Raspbian Buster,
# Ubuntu 18.04 or Debian 10, run this 1-line installer:
#
#                 curl d.iiab.io/install.txt | sudo bash

# 1. WARNING: NOOBS IS *NOT* SUPPORTED, as its partitioning is very different.
#    On a Raspberry Pi, you need to INSTALL THE LATEST VERSION OF RASPBIAN:
#    https://www.raspberrypi.org/documentation/installation/installing-images/README.md
#    To attempt IIAB 7.1 on another Linux see the full/manual instructions:
#    https://github.com/iiab/iiab/wiki/IIAB-Installation#do-everything-from-scratch

# 2. An Ethernet cable is HIGHLY RECOMMENDED during installation, as this is
#    more reliable than Wi-Fi (and faster!)  But if you must install IIAB using
#    Wi-Fi not Ethernet, remember to run 'iiab-hotspot-on' AT THE VERY END, TO
#    ACTIVATE RPi's INTERNAL WI-FI HOTSPOT, as this kills Internet over Wi-Fi!

# 3. Run 'sudo raspi-config' on RPi, to set LOCALISATION OPTIONS

# 4. OPTIONAL: if you have slow/pricey Internet, pre-position KA Lite's
#    mandatory 0.9 GB English Pack (en.zip) within /tmp -- you can grab a copy
#    from http://pantry.learningequality.org/downloads/ka-lite/0.17/content/contentpacks/en.zip

# 5. WHEN YOU RUN 1-LINE INSTALLER 'curl d.iiab.io/install.txt | sudo bash'
#    YOU THEN NEED TO TYPE IN YOUR PASSWORD IF ON UBUNTU/DEBIAN/ETC (for sudo)
#    ^^^ ^^^^ ^^^^ ^^ ^^^^ ^^ ^^^^ ^^^^^^^^

# 6. Follow on-screen instructions (TYPE 'sudo iiab' TO RESUME IF EVER NECESS!)

# 7. About 1-2 hours later, it will announce that INTERNET-IN-A-BOX (IIAB)
#    SOFTWARE INSTALL IS COMPLETE, prompting you to reboot...TO ADD CONTENT!

# Thanks   For   Building   Your   Own   Library   To   Serve   One   &   All
#
# DRAFT IIAB 7.1 Release Notes:
# https://github.com/iiab/iiab/wiki/IIAB-7.1-Release-Notes
#
# Write to bugs @ iiab.io if you find issues, Thank You!  Special Thanks to the
# countries+communities+volunteers who worked non-stop to bring about IIAB 7.1!
#
# IIAB Development Team
# http://FAQ.IIAB.IO

set -e                                   # Exit on error (avoids snowballing)
export DEBIAN_FRONTEND=noninteractive    # Bypass (most!) interactive questions

# Save script to /usr/sbin/iiab (easy resume/continue mnemonic 'sudo iiab')
mv /usr/sbin/iiab /usr/sbin/iiab.old || true    # Overrides 'set -e'
curl https://raw.githubusercontent.com/iiab/iiab-factory/master/iiab > /usr/sbin/iiab
chmod 0744 /usr/sbin/iiab

# Run install script!
/usr/sbin/iiab

An Ethernet cable is HIGHLY RECOMMENDED during installation, as this is more
reliable than Wi-Fi (and faster too!)  If however you must install over Wi-Fi,
remember to run "iiab-hotspot-on" after IIAB installation, TO ACTIVATE YOUR
RASPBERRY PI's INTERNAL WIFI HOTSPOT (thereby killing Internet connectivity!)

If you want to do everything from scratch, check this link on GitHub.

For more detail on installation, check out: https://github.com/iiab

Have fun with your exploration!


Tuesday, April 28, 2020

Testing out my new UPS board I got from the other day.

Did a quick test with the new UPS board. I loaded the board with 12 x 18650 batteries. The batteries are made by Samsung and each battery has a capacity of 3500mAh. Took a couple of hours to charge them up, the batteries were around 3.55v before I charge them to 4.2v, it was drawing about 2.2A of current using the lightning connector.

The board has circuit protection to prevent overcharging and discharge. You must use batteries without circuit protection.

The charging connectors are non-standard, and there are 3 different inputs:

1. Lightning connector
2. USB 3.0 Micro B (The ones you plug into an external HDD case)
3. MicroUSB through the USB 3.0 Micro B.

I guess the company or guy is using alot of leftover components. The UPS board is cheap, around USD18.00 before shipping. My board comes with a 4 battery holders. If you choose the 2 battery holders, it will be slightly cheaper.

I tested it with 2 x Raspberry Pi 4, and it manage to start both of them. One of the Rpi is running off a Msata SSD.

Here are photos of the board with the battery holders.

The board says CH1 + CH2 = 2.2A Max. Not sure if it is a misprint, as I was running 2 Rpi4 with 1 attached Msata SSD.

The weird selection of charging ports. I was drawing about 2.2A through the lightning, and for the other around 2.0A.

Here are the rest of the photos:






 Stay safe.

Started a layout of my Cyberdeck on CAD

Very much in progress. Here is what I have done. First some quick notes and partial material lists.

Note:
1. Dimension in the sketches are internal sizes

2. This is still very much work in progress
3. I plan to use the Rpi Zero W as a Wifi Client and Wifi AP, and it will probably connect to a 5 port
ethernet hub. The Rpi Zero W will be the DHCP server. Using Log2RAM to extend the life of the microSD
4. 2 Rpi 4 will be in the case, ClusterFS will be used to sync them. There will be 1 Primary and the other the slaves. It will be a re
5. Physical switches will be on the front panel to control power to the various modules, probably will add some e-paper
to display some basic info, etc.
6. Modules will be powered by 18650 batteries in UPS board. AC to DC suppy to charge the UPS will need to fit inside the case
7. Will have to determine the best location for all the air vents
8. Unit will need to be able to splash proof, at least won't get mess up when caught in the rain outdoor.
9. Many things to do and thing about.


Material Lists:
1. Water Proof Case - Model 3035H, Outer Dimension 385x358x175mm
2. LCD IPS - 2560x1600, display area 216.96x15.6mm, 2 x Mini HDMI, 1 x microUSB, 1 x DC Input. The microUSB is for DEX connection like from Samsung.
3. Keyboard - Model KU-1255, Thinkpad USB with trackpoint. The blacklight does not work on Rpi


 Here are the photos of the KU-1255:




Here are some sketches I have done so far:





The display area for the LCD is smaller. I use the entire dimension of the LCD for my planning.



Keyboard will be recess in as in the above sketch.

That's all for now.


Update on the IIAB RPi4 server and Odroid C2 SBC

I am done with the setup of the RPi 4, which will be running Internet-in-a-box (IIAB in short). The downloading of wiki's zim files, all...