Fubar Labs

NEW JERSEY'S FIRST HACKERSPACE - 100 Jersey Ave, New Brunswick, NJ

The Internet

More than 3 billion people are now using the Internet, according to the United Nations agency that oversees international communications. The number of Internet users has increased from 738 million in 2000 to 3.2 billion in 2015, according to a new report from the International Telecommunication Union.May 26, 2015

As of June 2017, 51% of the world's population is on internet.

How many websites are there on the Internet today?
The Internet Society - Sets policy for how the Internet should be used.
The Internet Engineering Task Force - makes the Internet work
The Internet Assigned Numbers Authority - Controls the assignment of IP addresses and Domains
The Root Name Servers - Registry of the top level Domains
Verisign Internet registry
Verisign Internet registered Domain Names
Wireshark Ethernet packet sniffer.
Netcraft Internet news
Who_is (ip lookup)

Ethernet & TCP/IP Networking

The following is a powerpoint presentation I created quite a while ago, I still think its relevant. It is a little bit old, but still very useful.

Ethernet and TCP/IP Presentation

Webpage design

Since our student members have a mix of Windows and Apple Laptops, software design will focas on displaying embedded microcontroller data within a webpage. The premier place to go on the Internet to learn webpage design is W3Schools.

W3Schools - webpage design using Bootstrap.

Arduino Networking with Ethernet - And Webpage design

This class will be focased on using the plug-in Ethernet Shield. We explore programming and communication using Arduino built-in Libraries for embedded websites on Arduino. We will use a Bootstrap website design, in a embedded Arduino webserver, to display analog measured parameters on a viewable web page.

Original $43 dollar Arduino Ethernet Shield - Wiznet chip W5100
Amazon market $12 dollar Arduino Ethernet Shield
Arduino Communications Library Functions

Assigning a good IP address to Arduino

You will need to assign a good IP address inside your Arduino Webserver or Webclient program. What constitutes a good IP address? The IP address MUST be on the same subnet as the Ethernet port is assigned on your PC or laptop. There are 4 classes of IP address, A, B, C and D. Each class has a different range of IP address subnets. Forget about Class A. You either have class B or Class C or Class D. Each has a smaller number of host computers allowed, respectively. YOU NEED TO ASSIGN AN IP ADDRESS WITHIN THE SUBNET OF YOUR COMPUTER'S ETHERNET PORT

Cisco tutorial on IP subnet addresses

The take away is that you want to asssign the IP address of your Arduino, as one larger that the Ethernet port on your PC or laptop. Example, my PC Ethernet port is assigned IP address to 169.254.75.103. So I will program the Arduino to IP address 169.254.75.104. Do this with the "IPAddress ip(169, 254, 75, 104)" declaration in your program. The Local IP should be close in mathamatical value to the Host IP port address.

DHCP - Dynamic Host Configuration Protocol - Assign IP addresses
What is a Subnet anyway?
Obtain IP subnet on Windows computer
Obtain IP subnet on Apple or Linux computer

Open a DOS command window on your PC, and type in >ipconfig

On Apple or Linux, look for a Linux command shell, and type in >ifconfig

Look at the IPV4 addresses assigned to Ethernet interfaces. We are trying to track down a valid IP subnet so we can assign a good IP address to Arduino Ethernet program.

Issues with local Webserver access from the wider Internet (at home).

Most consumer Internet connections involve a dedicated media specific router for broadband access. This device may (probably) include a firewall to prevent unauthorized internet (outside home) users from gaining access to resources behind your firewall/router. This normally involves Network Address Translation, to hide your computer from outside access.

There is also a small issue with fixed versus dynamic IP address assignment of your home subnet, by the broadband carrier. These issues may hamper the use of dedicated embedded webservers when connected at home behind a firewall.

Network Address Translation.

Program examples

There are some program examples underneath "Ethernet" tab in the Examples within Arduino IDE

Basic WebServer_one example, read analog inputs, display in web page.
Basic WebServer_two.ino example, read analog inputs, display with Bootstrap .
Basic WebServer_three.ino example, read analog inputs, form submit backstream info .
WebClient_one.ino example, read file from other webserver, display in terminal .
My_SQL_basic_insert.ino example, write directly into a mySQL database from Arduino.

Ethernet Shield using Wiznet W5100 TCP/IP protocol chip.

The W5100 chip is a complete TCP/IP processor, with 16K Bytes of packet buffer storage. This chip provides an 10/100 Megabit Ethernet interface to the world, and a SPI interface to the embedded microcontroller. This chip offloads all the network processing of TCP protocol and provides raw data packets to the Arduino target CPU over an SPI interface at slower speed.
Wiznet W5100 product web page
Wiznet W5100 datasheet