Showing posts with label OASIS. Show all posts
Showing posts with label OASIS. Show all posts

Saturday, January 7, 2017

Raspberry PI network stability - resolved

The raspberry PI I have for the central controller of all things home was misbehaving. Once every few reboots, the network just wouldn't start.

Suspecting a power problem, I tried byuing a PS at Aliexpress that was specially desined for Raspi, quoting 2.5A on the box.


Things seemed to be OK, but no, not much stability there either. After a lot of reading logs and tried reboots, I got to this page: http://elinux.org/R-Pi_Troubleshooting#Networking - seems to be a great troubleshooting guide of all things Raspi. And every second problem there is related to power supply.

So I got suspicious, and disassembled the supply. Ha! The transformer inside is quoted at 2A, that before we mention any losses on the way. Little wonder it was browning out.

It actually looks well built, with quality components, good soldering, good mechanical design etc. But it's just too weak for its job.

So far, I connected it to some high-quality USB supply I had lying around that can do 2.1A (but this one likely really can sustain that). In the future, the plan is to connect it to a really powerful 5V supply, one that can even supply 10A if necessary. That's overkill, but then, several devices can feed off it.

Thursday, January 5, 2017

Configuring all the computers at home to recognize each other.

I would like all the computers at home to be known by their names, under domain "oasis". Historical reasons, fwiw.

The router I have doesn't support local dns, but there is avahi, which I can install on all the computers at home (Mac mini, two linuxes, Raspi and potentially a slew of ESP8266 and the like).

Unfortunately, avahi normally likes to use the .local suffix for its domain.

Here's what it took to get all machines recognized and searchable under .oasis domain.

In /etc/avahi/avahi-daemon.conf:

[server]
domain-name=oasis

[wide-area]
enable-wide-area=no

[publish]
publish-domain=yes

Then, restart avahi by sudo /etc/init.d/avahi-daemon restart.
After this done on all the computers, I can see them all in avahi-resolve --name <host>.oasis. But ping doesn't work yet. For it to work, need to enable nss integration to work with mdns and to accept the .oasis domain. There are two changes:

In /etc/mdns.allow:

.oasis

In /etc/nsswitch.conf:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

The important change seems to be the "mdns4" at the end.

Now I can access all the machines on the local network by their names. ping, ssh, browser, all works.