Commit a8d0671e authored by Chipp Jansen's avatar Chipp Jansen Committed by node
Browse files

Update on Overleaf.

parent a9fbb9ae
......@@ -386,15 +386,15 @@ In order to communicate properly, the Data Transmit (TX) on the NEOS needs to be
% https://www.raspberrypi.org/documentation/computers/configuration.html
% TODO - probing possible debug ports on the device.
Also, an important thing to consider here is the operating voltages of the boards. The Raspberry PI's I/O and board operates at 3.3V (which is a common voltage for modern IoT devices). This device also operates at 3.3V. However, older devices might run at 5V (like Arduino baords). Using a multi-meter first on the device to see at what voltage level the board is powered. If you have different voltages, you'll need to add level-shifters to the UART lines.
Also, an important thing to consider here is the operating voltages of the boards. The Raspberry Pi's I/O and board operates at 3.3V (which is a common voltage for modern IoT devices). The NEOS also operates at 3.3V. However, older devices might run at 5V (like Arduino boards). You can use a multi-meter first on the device to see at what voltage level the board is powered at. If you have different voltages, you'll need to add \textit{level-shifters} to the UART lines.
\begin{table}[]
\centering
\begin{tabular}{c|c|c|c|c}
NEOS Pin & On NEOS & cable color & RPI Pin & On RPI \\
Ground Pin & bottom pad & black & Ground (GND) & Pin 6 \\
RX Pin & center pad & white & TX (GPIO14) & Pin 8 \\
TX Pin & top (corner) pad & grey & RX (GPIO15) & Pin 10
On RPI & RPI Pin Name & Cable Color & On NEOS & NEOS Pin Name \\
Pin 6 & Ground (GND) & black & bottom (3rd from corner) & Ground (GND) \\
Pin 8 & TX (GPIO14) & grey & top (1st from corner) & RX Pin \\
Pin 10 & RX (GPIO15) & white & center (2nd from corner) & TX Pin \\
\end{tabular}
\caption{Connections between the NEOS and the Raspberry PI}
\label{tbl:connections}
......@@ -489,7 +489,7 @@ Now we verified that we have a successful connection to the NEOS via the Raspber
When the NEOS starts up, it first loads a \textit{bootloader}, which is a program that loads the operating system or the firmware for the device. The NEOS runs a version of embedded linux (MIPS Linux). The bootloader that the NEOS uses is \texttt{U-Boot}\footnote{\url{https://source.denx.de/u-boot/u-boot/blob/HEAD/doc/README.autoboot}}, which is a common open source bootloader used on embedded devices.
On start-up right before \texttt{U-Boot} loads the linux kernel (the main operating system), it waits for 1 second to listen for any input on the debug port. If there is any input, then it pauses start-up and gives you access to the \texttt{U-Boot} menu. With the NEOS connected to the Raspberry Pi, restart the NEOS while holding down a key (such as the space bar on the keyboard) in the terminal window on the RPI. You will have to be quick and try a couple of times. If successful, the loadig output will stop and you will get a prompt \texttt{isvp\_t20#} in the terminal:
On start-up right before \texttt{U-Boot} loads the linux kernel (the main operating system), it waits for 1 second to listen for any input on the debug port. If there is any input, then it pauses start-up and gives you access to the \texttt{U-Boot} menu. With the NEOS connected to the Raspberry Pi, restart the NEOS while holding down a key (such as the space bar on the keyboard) in the terminal window on the RPI. You will have to be quick and try a couple of times. If successful, the loadig output will stop and you will get a prompt \texttt{isvp\_t20\#} in the terminal:
\begin{verbatim}
...
......@@ -523,10 +523,14 @@ TODO - printenv output
The \texttt{bootargs} environment variable dictates how \texttt{U-Boot} will set-up and boot the NEOS device. It will set-up a serial \texttt{console}, to login into the operating system via the serial port that we are using. It maps memory addresses and sets-up the root file system. The \texttt{init} argument is which program to run, once the system is set-up, and in this case \texttt{/linuxrc} is the linux kernal and the rest of the operating system.
We can modify the \texttt{bootargs} variable and change \texttt{init} portion to run a different program, in this case we will run a terminal shell \texttt{/bin/sh}. We will use \texttt{setenv} to do this, it might be helpful to first copy the \texttt{bootargs} output to a text editor in order to edit it:
We can modify the \texttt{bootargs} variable and change \texttt{init} portion to run a different program, in this case we will run a terminal shell \texttt{/bin/sh}. We will use \texttt{setenv} to do this, it might be helpful to first copy the \texttt{bootargs} output to a text editor in order to edit it as a single line:
\begin{verbatim}
setenv bootargs console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/bin/sh rootfstype=squashfs root=/dev/mtdblock2 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)
setenv bootargs console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000
rmem=16M@0x7000000 init=/bin/sh rootfstype=squashfs root=/dev/mtdblock2
rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),
4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),
256k(para),-(flag)
\end{verbatim}
You can verify that the change took place by running the \texttt{printenv} command again. Run the command \texttt{boot} to continue the boot process with your modified \texttt{bootargs}. If you reset or switch the device off, the changes will be lost and you will have to go through the editing process again.
......@@ -557,7 +561,30 @@ Now the firmware on the device will first look for a filesystem on the SDCARD to
\subsection{Tour of the System}
The system runs off of the sdcard. Ignore stuff not in /system/sdcard.
The system that is live is running off of the SD-CARD, which is located at \texttt{/system/sdcard} That means the configuration files and the programs to use are not in the typical Unix places. % Ignore stuff not in /system/sdcard.
\begin{verbatim}
cd /system/sdcard
ls
TODO - directories on the sdcard, what is what.
\end{verbatim}
Initially, the SD-CARD might be in a read-only state, and that the file system does not allow changes. In order to write to the file system, run these commands in the terminal:
\begin{verbatim}
dosfsck -a /dev/mmcblk0p1
mount -o remount,rw /system/sdcard
/system/sdcard/autoupdate.sh
\end{verbatim}
You will have to run these commands
% https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/issues/880
\subsection{Connect to the local Network}
First we want to set-up a unique hostname. By default it is dafang. We can modify the hostname with the hostname.conf file. We do this also because we'll access the interface through a .local domain. Since there many of us in the room, there would be mix-up of dafang.local.
......@@ -571,16 +598,6 @@ Now we see if the device is connected to the internet.
% <your hostname>.local
Initially, the SDCARD might be in a read-only state. You will have to run these commands
% https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/issues/880
% dosfsck -a /dev/mmcblk0p1
% mount -o remount,rw /system/sdcard
% /system/sdcard/autoupdate.sh
\section{Streaming your own Video}
Once you have the camera set-up to stream video, you can stream to an online broadcasting service. Autistici (\url{https://www.autistici.org}) is a video hacking collective with an open re-broadcasting server at \url{https://live.autistici.org/}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment