Setup a C.H.I.P. without a screen
August 14, 2017
socs
chip
Some times ago (december 2015 according to my emails) I’ve ordered a C.H.I.P. . After a month I was wondering why it wasn’t already arrived so I realized I preordered that, shipping was scheduled for June 2016. It was $17.22 USD (I’ve ordered the case too) so not a big deal.
It arrived in July and I planned to use it as dhcp/dns server for my home network but it didn’t work as the C.H.I.P.’s wifi had a strange behaviour: sometimes wifi freezes and never wake up again until manual intervention (service restart or reboot). Not a nice feature. I admit I didn’t dig into it a lot (I remember there was a thread somewhere with other people having the same problem) and I forgot the board in a drawer.
Now that I’m on holiday again I have a little more time to search for a fix. First thing to do is to flash again the C.H.I.P., there are two way of doing this: a Chrome/Chromium Extension and using the C.H.I.P. SDK which is a Vagrant VM. I’ve chosed che SDK and following the simple instrunction on the side I’ve flashed the soc. The only thing to know is to modify the Vagrantfile according to this comment on github otherwise flash will fail. So after execution of ./chip-update-firmware.sh -s
the system will report that it has flashed properly the C.H.I.P.:
FLASH VERIFICATION COMPLETE.
# # #
#########
### ###
# {#} #
### '%######
# #
### ###
########
# # #
CHIP is ready to roll!
vagrant@vagrant-ubuntu-trusty-32:~/CHIP-tools$
The C.H.I.P. now has an OS (headless Debian) so it’s time to boot. As I haven’t bought a video adapter I will use a USB/serial cable which I had already at home to connect to it. Instructions are clear and simple so no problem here and after configured a terminal (I used PuTTY) I can see C.H.I.P.’s login prompt (user/pass: chip/chip
):
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Started Load/Save RF Kill Switch Status of rfkill1.
[ OK ] Started Load/Save RF Kill Switch Status of rfkill0.
[ OK ] Started Load/Save RF Kill Switch Status of rfkill2.
[ OK ] Started Bluetooth service.
[ 34.510000] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 34.520000] Bluetooth: BNEP socket layer initialized
Starting Hostname Service...
[ OK ] Reached target Bluetooth.
[ OK ] Started Hostname Service.
[ OK ] Started Authenticate and Authorize Users to Run Privileged Tasks.
[ OK ] Started Modem Manager.
[ OK ] Started Network Manager.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Update UTMP about System Runlevel Changes.
Debian GNU/Linux 8 chip ttyS0
chip login:
As first thing I’ll configure wifi so I don’t have to use the USB/serial cable anymore to connect to C.H.I.P. . First list the available networks with nmcli device wifi list
:
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
oneAP Infra 1 54 Mbit/s 92 ▂▄▆█ WPA2
WebCube4-0EDB Infra 1 54 Mbit/s 49 ▂▄__ WPA2
FRITZ!Box 3272 Infra 6 54 Mbit/s 44 ▂▄__ WPA2
FASTWEB-J5RN5S Infra 6 54 Mbit/s 45 ▂▄__ WPA2
WOW FI - FASTWEB Infra 6 54 Mbit/s 37 ▂▄__ WPA2 802.1X
SANFRANCESCO Infra 6 54 Mbit/s 44 ▂▄__ WPA1 WPA2
InfostradaWiFi-f445b0 Infra 1 54 Mbit/s 47 ▂▄__ WPA1 WPA2
InfostradaWiFi-014839 Infra 11 54 Mbit/s 29 ▂___ WPA1 WPA2
Then connect to your network and check if we are online:
chip@chip:~$ sudo nmcli device wifi connect 'myAP' password 'myPass' ifname wlan0
Connection with UUID '322325bd-5a26-4c52-a9b6-c95c96d952ce' created and activated on device 'wlan0'
chip@chip:~$ ping google.it
PING google.it (216.58.205.99) 56(84) bytes of data.
64 bytes from mil04s26-in-f3.1e100.net (216.58.205.99): icmp_seq=1 ttl=51 time=72.9 ms
64 bytes from mil04s26-in-f3.1e100.net (216.58.205.99): icmp_seq=2 ttl=51 time=62.9 ms
64 bytes from mil04s26-in-f3.1e100.net (216.58.205.99): icmp_seq=3 ttl=51 time=62.4 ms
^C
--- google.it ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 62.454/66.114/72.913/4.816 ms
It works! Now I should do the usual stuff with new devices: regenerate ssh keys, change hostname, create a new user, etc. but that is as I said usual stuff. :D