Category Archives: C.H.I.P

Install netdata on C.H.I.P (or a raspberry PI)

 
Netdata details: https://github.com/firehol/netdata/wiki

Requirements:
C.H.I.P: http://anonit.blogspot.com.au/2016/08/installing-chip-headless.html; or
Raspberry PI:  http://anonit.blogspot.com.au/2016/05/headless-install-of-raspbian-jessie.html

Logon to the device using SSH.
Check if CURL is installed by using the command
which curl
if it is not installed then install using sudo apt-get install curl.
Install the full install packages for netdata:
curl -Ss ‘https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh’ >/tmp/kickstart.sh && bash /tmp/kickstart.sh -i netdata-all
(There is a minimum install package that can be used if necessary: curl -Ss ‘https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh’ >/tmp/kickstart.sh && bash /tmp/kickstart.sh -i netdata)
Download the netdata installer:
git clone https://github.com/firehol/netdata.git –depth=1
go into the netdata folder:
cd netdata
install netdata:
sudo ./netdata-installer.sh
Once installed, you can access the website on %IPADDRESS%:19999
to update, go into the netdata folder:
cd netdata
and run the updater:
sudo ./netdata-updater.sh
references:  https://github.com/firehol/netdata/wiki/Installation

Installing Pi-hole on a C.H.I.P

Requirements: C.H.I.P configured as: http://anonit.blogspot.com.au/2016/08/installing-chip-headless.html, with a static IP address

Type the command
sudo cp /etc/resolv.conf resolv.conf.bak
sudo nano /etc/resolv.conf

Edit the nameserver to have the DNS forwader settings of your choice.

Save and Exit Nano.

Install curl using the command

sudo apt-get –y install curl

Download and install pi-hole:
wget –O basic-install.sh https://install.pi-hole.net
chmod +x basic-install.sh
./basic-install.sh

Press OK

You should donate (I did!).  Press OK

Chose wlan0 and press OK (wlan1 is bluetooth)

Choose IPv4, IPv6 or both and press OK

If the IP address is correct, select YES

If the IP address you have assigned the CHIP is within the DHCP range of your DHCP Server or router, you may need to exclude this IP address, or modify the range.
Click OK

Select the DNS servers to use as forwarders.  If you are not sure, choose Google, and select OK.

Once the install is complete, press OK

You can add additional block lists by doing the following:
sudo cp /etc/pihole/adlists.default /etc/pihole/adlists.list
sudo nano /etc/pihole/adlists.list

Add the bottom to the file (or add your own)

##############
# Additional #
##############
#easylist
https://easylist.to/easylist/easylist.txt
https://easylist-downloads.adblockplus.org/easyprivacy.txt
#malwaredomains
http://www.malwaredomainlist.com/hostslist/hosts.txt
http://mirror1.malwaredomains.com/files/justdomains
#Peter Lowes Ad Server List
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext
#Ublock Filters
https://github.com/gorhill/uBlock/blob/master/assets/ublock/filters.txt
https://github.com/gorhill/uBlock/blob/master/assets/ublock/badware.txt
https://github.com/gorhill/uBlock/blob/master/assets/ublock/privacy.txt
https://github.com/gorhill/uBlock/blob/master/assets/ublock/unbreak.txt
Reboot the chip with
sudo reboot

Change the DNS on your computer / or router to point to the IP address of the chip.  In a Window DNS environment, change the DNS forwarders

You can check the status and modify the blocklist / whitelist by navigating to:
http://nnn.nnn.nnn.nnn/admin/

References:
https://github.com/pi-hole/pi-hole
http://jacobsalmela.com/network-wide-hardware-ad-blocking-9-chip-hole/

Installing C.H.I.P headless

Requirements:  miniUSB cable; C.H.I.P, computer running linux, wireless network.
Optional – Powered USB hub, additional miniUSB cable, computer running Windows.

I recieved my C.H.I.P, but had no spare keyboard, mouse, or monitor.  To get the device configured I did the following:
Download and install Chrome https://www.google.com/chrome/
In chrome, navigate to http://flash.getchip.com/

I chose Headless 4.4.

If you are on a windows computer, click Install the Driver.  Download and run the installer.

Next


And click Finish.

Click Next

Connect a paperclip, or a 1/2 stripped twist tie to FEL and GND

Connect the C.H.I.P to the computer using a USB cable.



If the flashing fails, disconnect the C.H.I.P.  Close Chrome, and reopen Chrome and navigate to http://flash.getchip.com/ – begin the process again (if you already installed the drivers, you don’t need to install them again)



Once the flash has completed, close Chrome, and remove the paperclip / twist tie jumper.  If necessary – connect the C.H.I.P to the linux computer (used a raspberry pi – it was necessary to use a powered USB hub in order to get the C.H.I.P to have enough power).
Install screen on the linux computer: sudo apt-get install screen

Type the command dmesg | tail

In the output above, you can see the C.H.I.P is presented to the OS as ttyACM1. 
Type the following command: screen /dev/ttyACM1 (replace ttyACM1 with the USB port number from the output of dmesg | tail
If the screen appears blank, press <ENTER>

The default credentials are chip / chip

Type the command sudo nmtui

Authenticate if necessary

Select Activate a Connection

Select your wifi connection from the list and press <ENTER>
Enter your wireless passkey and press <ENTER>

Once connected, you will see an asterisk next to the network you are connected to

Select Quit
type sudo nmtui again

Select Edit a connection

Select your wireless connection and select Edit…

Go to the bottom, and select Automatically connect and Available to all users.

If you wish, open IPv4 Configuration, and manually assign an IP address, Gateway and DNS servers.

Select OK and Quit
Verify you can access the internet.  ping www.google.com
CTRL-C to finish the ping.

Run the command sudo apt-get update to update the package list
Run the command sudo apt-get dist-upgrade
Select ‘Y’ to continue if prompted.
This may take some time.
Once completed, uninstall group-bin and configuration files
sudo apt-get purge cgroup-bin
It may / may not have anything to uninstall.  This can prevent the unit from booting.
Change the name of the device
sudo nano /etc/hostname
CTRL-X, Y and <Enter> to save the name
sudo nano /etc/hosts
Change the line
127.0.1.1     chip
to
127.0.1.1     <new name of the device>
CTRL-X, Y and <Enter> to save the name
Reboot the unit with
sudo reboot
you shuld now be able to connect to the chip with SSH via wifi.

References:
http://anonit.blogspot.com.au/2016/05/headless-install-of-raspbian-jessie.html
https://bbs.nextthing.co/t/setting-up-chip-as-a-headless-server-with-minimal-tools/1505