Week 1- Get the Reading into Web via TCP

Basic Knowledge Notes:

NETWORK

An IP address, or Internet Protocol address, is a series of numbers that identifies any device on a network. Computers use IP addresses to communicate with each other both over the internet and on other networks.

                                           S-w1-2

IP addresses are only one part of the internet’s architecture. After all, having a postal address for your house is meaningless unless there’s a post office responsible for delivering the mail. In internet terms, IP is one part of TCP/IP.

The Transmission Control Protocol/Internet Protocol (TCP/IP) is a set of rules and procedures for connecting devices across the internet. TCP/IP specifies how data is exchangedData is broken down into packets and passed along a chain of routers from origin to destination. This is the basis for all internet communication.

IP addresses and geolocation: IP addresses can mark the real-world location of your device. This comes in handy when a website wants to customize itself to suit your needs — such as by automatically changing its language, or showing you products that are available in your country. Streaming platforms can also use your IP address to show you the content that they’re allowed to provide you based on where you live. Your IP address can be used to identify your city, postal code, internet service provider (ISP), and latitude and longitude. Since you may not want everyone to know roughly where you are, consider hiding your IP address with a VPN, which masks your IP address behind another one. 

POSIX COMMAND

Terminal describes a group of hardware devices comprising a keyboard and a monitor. A terminal enables a user to communicate with the internal CPU or another network device or computer.

man Help manual
ls List information about the file(s)
pwd Print Working Directory
ping Test a network connection
cd Change Directory.

Absolute Path (cd / )vs. Relative Path (cd ../ )

nslookup Query Internet name servers interactively
whois

Internet domain name and network number directory service

cat Concatenate and print (display) the content of files (The cat command is suitable for viewing small, plain text files. For large files, use the more command)
nc Netcat, read and write data across networks
grep Search file(s) for lines that match a given pattern

S-w1-1  tip for cd

 

Components of the WEB APPLICATION

HTML:  Define the structural elements of the page (paragraphs, headings, input elements, etc.) Using markup tags to describe the web, the tags are usually in pairs. <b> — start tag, </b> — end tag 

CSS: Define the styles and layout of the elements.

Javascript: Define their behavior(interactivity), and increase functionality.

DOM: (HTML, CSS, and JavaScript) comprise the DOM(Document Object Model). The objects are the various HTML elements and CSS styles.

JavaScript is the programming language used to manipulate the DOM and to communicate with other devices.

s-w1-6

 

Get the Reading into Web via TCP

  1. WiFiNINA Library: use to connect devices to the Wifi. 
    Arduino Sketch: [Scan Network] [WifiStatus] ____ Ensure the network connection.
  2. TCP Socket Connection.
    Arduino side: use the sketch [WifiTCPClientLogger].
    Terminal side: Netcat

    nc -l 8080

  3. Download web-related files locally into one directory.
    CD in Terminals to the same directory.

    $ cd /*the target path

  4. Run netcat and python’s http.server script.Terminal: $ nc -l 8080 >> log.json & python3 -m http.serve
    I try the potentiometer and FSR, both of them get the reading into web.
    s-w1-3 s-w1-4 s-w1-5

Question:

I haven’t got the list of currently running processes after entering kill PID

but [1] + terminated nc -l 8080   What’s the meaning of it? 

s-w1-7s-w1-8

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *