Notes: Time Sync

September 21st, 2016

TBH I don’t have this figured out yet.

In my case, the HW clock is wrong (off by 1 hour).

It should be using NTP, but NTP doesn’t seem to take effect. I’ve read a bunch of conflicting information, like using “ntpd -qg” (which can’t be run until you stop the ntp service), or that a command “hwclock –systohc” will do it. One other dude said there’s some sort of check by hwclock that wont do it unless the date is only slightly off (safety feature). I don’t really buy that though.

Ah well, I just wanted a quick note for this.

Notes: Setting up a Webcam Server

September 21st, 2016

kirbytest

I have a small room, also known as a closet *cough* that I have my printer and some small computers in. Some day I plan to put a 3D printer there as well. It would be wise to set up a simple webcam, so I can check on it. You know, in case of fire and stuff. 😉

Read the rest of this entry »

Notes: Rogers Wireless E-mail to Text

September 20th, 2016

Rogers has 2 ways (that I know of) for sending short e-mails to people as text messages.

Read the rest of this entry »

Notes: Setting up a modern Mail Server and Relay

September 19th, 2016

This is an attempt to clean up these notes:

http://blog.toonormal.com/2016/03/20/notes-mail-server-madness/

References go there. This post is a summary.

Read the rest of this entry »

Orange Pi Lite Notes

August 30th, 2016

Hey! It’s more notes!

orangepi_lite_detail1

Opi_gpio

Orange Pi Lite is, IMO, the only difficult Orange Pi to get working. Primarily, because it has WiFi, and no Network socket.

For an OS, use Armbian. http://armbian.com

WARNING: the device will be unlit, no LEDs, until the OS image begins to boot. It could be half a minute before you see anything.

It can sometimes take a few tries to program the SD card correctly (either that or I’m using bad SD cards).

NOTE: Armbian will reboot a few times after first inserting a fresh memory card. You should wait a few minutes before you attempt to log in. When you see the red-light flashing, that means it’s about to reboot.

You’re going to need a way to view the console. Either by plugging in a mouse/keyboard/tv, or via a USB UART cable. UART pins are beside the USB ports. According to the image above, WHITE, GREEN, BLACK (TX, RX, GND). NEVER use the red (doesn’t provide enough power).

root password is 1234

Now for the work.

If you’re like me, you have a WPA2 protected WiFi network. I also hide my SSID, so there’s an extra step needed if you do that.

First, if you’re not already, become root.

It’ll save you a bunch of headaches, so again, become root. Don’t try to do this with sudo.

Generate a wpa_supplicant configuration.

Edit this file.

For security reasons, you may want to remove the line that shows your password.

If you use a hidden network, add a line “scan_ssid=1” to the network section. It should now look something like this:

Save and close the file. You can test the configuration like so.

If you wanted to manually connect to the internet, right now, you could do this.

To make this permanent, open up /etc/network/interfaces

Comment out or delete everything but the loopback. Your file should look something like this:

You can then restart networking.

And you should be on the internet now, and any time you reboot.

You can also now SSH in to it, and stop using your tv/mouse/keyboard. Hooray!

References:

http://askubuntu.com/a/406167
http://forum.armbian.com/index.php/topic/1915-/
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=25104

C.H.I.P. (by Next Thing Co) Notes

August 29th, 2016

Just some notes.

chip_pinouts

To reinstall (upgrade) the OS, go here:

flash.getchip.com

You’re going to need a USB cable, and a jumper wire/paperclip. Ground the FEL line before plugging it in to your PC. If you’re on Linux, you’ll also have to follow some funny instructions to give your account permission to access the USB port via the Chrome web browser. For me the variable that’s supposed to be your login name wasn’t working, so I just used my login name directly.

The upgrade is all-or-nothing. Kernels can’t be updated with apt-get (yet).

If you go headless, getting WiFi configured can be a pain, especially if you have a hidden SSID. Common instructions are here:

https://bbs.nextthing.co/t/setting-up-chip-as-a-headless-server-with-minimal-tools/1505

The key thing is the command: nmtui

You can *almost* do everything in it. Manually adding a hidden SSID didn’t want to take for me.

SSID IS CASE SENSITIVE (also no matter how many times you type in an incorrect SSID, it wont work, *cough*).

Much further down in the post is some guy that talks about how to do it entirely from the command line. This is what you need.

https://bbs.nextthing.co/t/setting-up-chip-as-a-headless-server-with-minimal-tools/1505/36

nmcli con add con-name your_connection_name ifname wlan0 type wifi autoconnect no save yes ssid your_hidden_ssid

nmcli con modify your_connection_name wifi.hidden true wifi-sec.key-mgmt wpa-psk wifi-sec.psk your_passwd

# To connect
nmcli con up your_connection_name

# If it’s good, permanently make it autoconnect
nmcli con modify your_connection_name autoconnect yes
# or use the GUI (nmtui)

# To disconnect
nmcli con down your_connection_name

SSH comes preinstalled on 4.4. AVAHI (zeroconf) is preconfigured to give it the network name ‘chip’ (and chip.local), so you should be able to connect like so:

Getting the IP address is not ifconfig (though you can do sudo ifconfig).

Instead, use: ip addr

To not drive yourself crazy, make an alias for ll.

Install NodeJS.

https://github.com/nodesource/distributions#debinstall

Setup a simple web server.

http://stackoverflow.com/a/8427954/5678759

AVAHI (Zeroconf) is also pre-configured. You should be able to connect to the server like so:

http://chip:8080

1 Wire

According to the “DIP” docs, the 1 Wire bus is located on LCD_D2 on pin header U13.

http://docs.getchip.com/dip.html#dip-identification