Why seismic sensors:
What you will need:
We have several levels of seismic sensors available to us:
Let’s start with the simple one:
Module 1: Shakenet
Module 2: Swarm
Raspberry Pi Debian Buster basics
What you will need:
Module 1: first steps (see notes below)
Module 2: SSH
Module 3: commands
Module 4: nomachine (if no desktop access)
Module 5: nano text editor
Module 6: what’s going on? who?
Module 7: commands, modifiers
Module 8: creating directories
Module 9: update your computer, install apps
Module 10: control x and control z
More complete notes:
Module 1: Terminal first steps
Using terminal on the raspberry pi:
Start with ping:
ping sends a data packet to a machine on the internet, and tells you how long it takes to return, like sonar
try pinging 10.14.0.1 Time listed will be in milliseconds, so 1000 ms means one second
Notice different ping times
ctrl-c means cancel
ctrl-z means halt (stop everything, not gracefully)
Tracing around the internet:
traceroute www.apple.com (note hops and delays)
Evil stuff: ping flood attack:
ping flood, only use here as a test
sudo ping -f (notice that you have to use sudo, which means "superuser do" or treat me like computer god for this)
What's going on in your terminal:
who also whoami
last last command, also the up arrow
top lists all processes, useful with kill (see later)
history: shows recent commands like this, useful for retracing your steps or seeing who might have been in your machine:
1 ping 10.14.0.1
2 ping www.hpa.edu
4 traceroute www.hpa.edu
6 ping 10.14.252.22
7 sudo ping -f 10.14.252.22
10 ping 10.14.252.47
12 ssh email@example.com
14 man netstat
15 man ping
cd change directory, usually followed by a directory name, like "cd var/www/html/"
ls list directory, see also ls -l which lists all files in long form. Try also ls -lh *human long form"
ls -la lists even invisible files (the -a flag means "all") You can also hide files by adding . to the beginning
pwd print working directory, shows where you are in the file system (directory)
Try navigating to the desktop this way:
pwd (print working directory, "where am I")
ls (shows what is at this level)
cd or cd .. (cd to a directory, cd .. means one level up)
Here is where your desktop is: /home/pi/Desktop
try ls and see what is there, should be nothing.
Creating a directory:
mkdir creates a directory
This should create a folder on your desktop called "test"
click on this to see a directory browser, go nuts
ls -la will show you permissions in the format drwx, for directory, read, write and execute
read is 1, write is 2, execute is 4, so all added up 1+2+4 =7
chmod change "mod" or permissions of file, 777 is everything, see drwx format below and the 421 rule
You may also find this under chmod u+x on a file, which means make the file or program executable
man pages are manual pages, so "man ping" would give you manual pages on the ping command
less means look into a file (contrast with "more")
* means wild card, so if you want to see all files ending in jpg, you would say *.jpg
Secure shell login:
ssh means secure shell login, like ssh firstname.lastname@example.org
Mac specific commands:
fsck -yf after command-s startup (single user mode)
say command after ssh login
Module 2: wild cards, man pages, deleting files
This is how wild cards work:
Instead of typing out herobrine, you could type
just make sure that nothing else matches the h part.
These files are in a folder called test:
malcolm mary tom
if you type
it will delete mary and malcolm
if you type
it will delete only malcom
if you type
it will remove everything.
You can also use this to delete certain types of files (jpg, txt, mp4)
will remove every jpg file in the folder
Now you try it:
Ok, at this point, you can navigate around, login to remote computers, create and delete text files.
Module 3: Internet
Your computer needs 4 things to be able to get onto the internet:
IP address, example 10.14.8.4
Subnet mask, example 255.255.0.0
Gateway/router, example 10.14.0.1
Domain name server (DNS), example 10.9.250.13
Here's what each one does:
All traffic on the internet or local area network (LAN) is in the form of packets of information, like mail envelopes with a letter inside. Each letter you mail has two important things: the address you want it to go to, and the message inside the envelope.
TCP/IP is the format of these, which stands for Transmission control protocol and internet protocol.
The TCP part is the message, and the IP part is the envelope, with an IP address on it.
Check the IP address of your machine:
From the GUI: open system preferences, network
From the terminal: type ifconfig
Imagine you want to stay in one of two large 254 room hotels. One has long hallways, and very few floors, the other has many floors, but short hallways.
If you want to sleep, you don't want many people walking down the hall in front of your room. You want many floors with fewer rooms per floors.
This is what subnet masking does on a network. Each of the four segments can hold 254 addresses.
At home, you probably have a network that looks like this:
This means that the last zero can hold up to 254 addresses (from 192.168.1.1 to 192.168.1.254)
HPA has this sort of mask:
which means that
is the elab, which can have 254 x 254 addresses
It makes for a quieter network, also providing some security as others cannot see you easily.
This is the gateway for all of your traffic, usually the access point at your home. The technical difference between these words is that a router routes traffic between two networks of the same type (like ethernet), while a gateway is between different types of networks (like a cable modem or DSL gateway)
Domain name server:
This is the computer on your network or outside that translates names into numbers, like a digital phone book.
Try this in terminal:
Ping and traceroute:
Imagine you want to find out if a machine is responding (you can block this by using "stealth mode")
In terminal ping one of the IP addresses in your class
ping an address out on the internet
what is the difference?
now try this:
It should give you a trace of the path your connection took.
Try this with other addresses on and off campus.
Say you want to find out the name of something, or the IP address from the name.
(you will get a funny > sign)
what do you get?
where is this machine?
Try again using 188.8.131.52 as the server
The best use of this is to find out what OTHER people might call a machine.
We have several DNS servers on campus, the main one is at 10.9.250.13
Others to try:
you can get out by typing
or control-z (halt)
Module 4: web server and web pages (html)
Creating a web page, installing a web server:
On the raspberry pi, run the following commands:
sudo apt-get update (this updates your computer)
sudo apt-get install apache2 -y (this installs apache web server on your computer, answering yes to all prompts)
Go your browser and enter 127.0.0.1 (which means "me" on the internet)
Now type ifconfig in your terminal and look for your internet address, which should start with 10.14.x.y
Look at this address using your browser
Editing web pages:
On the terminal, navigate to the following directory:
run the ls command, you should see a file called index.html
You can edit this, either by using the nano command (cooler) or a text editor (simpler)
sudo nano /var/www/html/index.html
This is a complex bit of html, so just look for something you recognize from the 127.0.0.1 test and change it
nano is a text editor, so ctrl-o means overwrite, and ctrl-x means exit
If you are using a text editor, it might not let you save.
Back to permissions----
type chmod 777 /var/www/html
which makes everything in the html directory read and writable to everyone (including you)
Making a new web page:
Using either nano or a text editor, create a new page:
sudo nano /var/www/html/test.html
You'll notice this is blank.
Add the following to your new web page:
Wow, this is really easy
remember to overwrite (ctrl-o) and exit (ctrl-x)
Now go to your browser and enter http://127.0.0.1/test.html
What do you see?
ISR terminal commands
review: ls, pwd, cd
nano, ctrl o, ctrl x
directory and processes:
mkdir, rmdir, cp, mv, rm
ps -ax | grep Terminal
ps -ax | grep Chess
kill -9 PID
review: ping, traceroute, ifconfig
sudo apt-get install wavemon
sudo apt-get install nmap
on linux, look for eth0
on mac, look for en0
module x: Navigation and files
Module 4: Wireless networking
mac wireless monitor
scanners: active, mapping, passive
Module 5: html
where can I see it? safari, chrome, firefox, iceweasel
what does it mean?
how can I create it?
firefox tools inspector
WYSIWYG editors: itext express
text editors: textwrangler, bbedit (same thing now), subethaedit
module 6: Web server and html
Module 7: cybersecurity
module: xml and data science
module y: Programs OSX
module a: router setup
IP address, netmask
QOS, traffic control
module 8: wireless networking
module 9: IPnet monitor
module: advanced html, css
Part one: Sensors and controls
go to 10.14.17.1 and see if you can open something
go to 10.14.18.1 and do the same thing
try again with 10.14.19.1, what do you find?
go to 10.14.41.1 and look at the energy use in the elab, then turn on the hot tea water maker, which circuit is it on?
A Panel 1
go to 10.14.62.x and check out the weather right now. What is a W/m2?
The generation of solar energy
check out 10.14.8.10 to see the earthquake activity here
go to 10.14.8.2
how much solar power is generated on campus?
284 kilowatts per hour
how much is generated at the elab?
17 megawatts per hour
how much is generated at the PPA array behind the elab?
94 megawatts per hour
how much solar power is generated at each building?
GCAC: use: 0 /generate 20
CLH: use 0/ generate 20
IT building: use 22, generate 20
Solar English building: 22
Solar dining hall: 24
how much is used at each location?
Classroom C: 10
Tennis center: 14
when is it used?
Most of the uses happen during the day after 8:30 when classes start
what does this tell you?
The school uses a lot of energy every day (especially places like the tennis center where people don’t know how to turn off their lights).
what dorm uses the most energy?
when do the dorm lights “go off”?
From my experience is 10:30 for weekdays and 11 for weekends, but the graph shows that there are still some uses of the energy after lights off.
when is the use the least?
Elab energy hunt-answers on your weblog!
Part one: Sensors and controls
Part two: egauges
Part three: skyspark
Part four: elab2.hpa.edu
Part five: EMC server 5
Part six: Mango
Three clues will enable you to track and identify energy:
If you have other data like weather, power factor you can go even deeper
ISR EMC challenge
On server 10.14.4.123:8080 (184.108.40.206:8080) login as isr
Look for the data source “EG lab master”
You can also find this labeled “eGauge elab 2” on the server at
10.14.4.163:8080 if you are on campus
Create one of each of these dashboards:
M2M and IoT-the future
Powerful questions: introduce partner 3-4 minutes after breakout in pairs