From 779dfd351a48626ec5dbd66c059e6d91682fd50a Mon Sep 17 00:00:00 2001 From: grizzly Date: Thu, 11 Jul 2024 22:55:05 -0400 Subject: [PATCH] update --- eet_instructions/eet_instructions.typ | 47 +++++++++++++++++++++------ 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/eet_instructions/eet_instructions.typ b/eet_instructions/eet_instructions.typ index 2a0161d..73c6d4b 100644 --- a/eet_instructions/eet_instructions.typ +++ b/eet_instructions/eet_instructions.typ @@ -1,14 +1,25 @@ +#import "@preview/showybox:2.0.1": showybox #set enum(numbering: "1.a.i.") +#set heading(numbering: "1.1.") -#let pat = pattern(size: (30pt, 30pt))[ - #place(line(start: (0%, 0%), end: none, angle: 45deg, stroke: stroke(paint: red, cap: "square"))) +#let hash_line(w:20pt, reverse:false, angle:0deg) = [ + #let n = 15 + #stack( + dir: ltr, + spacing: 1fr, + .. n*(rotate(if reverse{angle} else{-angle})[#rect(width:w,height:w/3, fill:red, radius:1pt)],), + ) ] -#rect(width: 100%, height: 20pt, fill:pat) +#set page("us-letter", + margin: (y: 5%, x:10%), +) + +#hash_line() #align(center)[#text(size:2em, weight:"bold")[EET Boxes Setup Instruction]] +#hash_line() -#rect(width: 100%, height: 20pt, fill:red) #outline() = Preparation @@ -121,6 +132,17 @@ Once the device is added to the frontend, you can find the connection string in To flash the firmware, you first need to update the configuration file that stores the informarion specific to this box and then flash the rebuilt firmware to the box. + +#showybox( + [But how do I get the connection string from my laptop to the computer?], + [You can use the `ntfy` utility on the computer to get the connection string. +To do so, start by listening on the constring topic on the computer with:\ +`ntfy sub https://ntfy.aljeit.fr/constring`\ +Then you can send the connection string (or any other message) to the server using the command:\ +`curl -d "message" https://ntfy.aljeit.fr/constring`] +) +#footnote[See @ntfy for more info about the ntfy setup.] + + Update the file in `base-firmware-new\application\src\aa_set_device_parameter_here.h`. + Change the `SAS_KEY` value to the connection string from the IoT Hub. + Change the `AZURE_DEVICE_ID` field to the Id of the box from the label. @@ -129,7 +151,8 @@ To flash the firmware, you first need to update the configuration file that stor + Rebuild the firmware with `Build` #sym.arrow `Build Solution (F7)`. + Verify that the box is properly connected to both power and the Atmel adapter. + In `Tools` #sym.arrow `Device Programming` detect the box as for the base firmware. -+ Under `Memories` in the left sidebar, select the file to flash that end with `V71Q19B_`#text(fill:orange)[`XXXX`]`.hex` with #text(fill:orange)[XXXX] a four-characters hexadecimal number. ++ First, flash again the base firmware. Under `Memories`, select the `[...]application.elf` file and program the chip. ++ Next, flash the `RTOS` firmware. Select the file that end with `V71Q19B_`#text(fill:orange)[`XXXX`]`.hex` with #text(fill:orange)[XXXX] a four-characters hexadecimal number. + Click `Program`. Congratulation, the box is all flashed, you are almost done. @@ -147,11 +170,6 @@ Now that the box is flashed, power cycle it and connect it to a PoE enabled port + `targetId` is the name of the MinIO folder where all the data will be stored. By default, enter the same as the box Id. + Save the configuration. -The finale step is to restart the aggregator to apply all the changes. - -+ SSH into the `sf-pc48` server. -+ #text(fill:red)[write command] - = Verification Go on MinIO and verify that a folder with the name of the box was created and that some data started comming in. If not, good luck debugging this mess (I recomend redoing everything...). @@ -163,3 +181,12 @@ The network setup to get the `udp_server.py` is specific so here are the instruc - The PC running the `udp_server.py` script should get the IP `192.168.29.11`. I recomend setting a DHCP reservation at the router level. - The boxes thould get an IP in the range `192.168.29.[101-120]`. I am not sure this is a scrict requirement but I recomend setting the DHCP range in the router to this range. + +== ntfy Server +ntfy is a publish/subscribe system that allow simple publishing of messages with an http request to a central server. +In this case, the server is my (Arthur Grisel-Davy) server running the ntfy binary. +While this is more private than using the default public #link("ntfy.sh") server, keep in mind that anyone can subscribe to the `constring` topic and get the message. +there is no user authentication from the server. +However there is server authentication from the user using SSL. +I (Arthur Grisel-Davy), hereby swear never to intentionally store the constring messages, because I don't really care. +If you are concerned about this method for sharing the conection string, feel free to use any other method.