Table of Contents
Data Workflow Setup Notes
Raspberry Pi: Remote Access
- Anydesk Install: 767 453 454 ID
Raspberry Pi: Set Time Zome
- Need to use UTC time zone.
- Main menu, go to Preferences > Raspberry Pi Configuration.
Raspberry Pi: Setting Up USB-to-Serial
- lsusb in terminal list USB devices on system.
- ls /dev/ttyUSB* Gives list of USB-to-Serial devices.
Raspberry Pi: Identifying and Naming USB Devices
If multiple devices are connected to a raspberry pi, at some point the devices may switch USB ports due to inevitable manual reconfiguration of the raspberry pi setup. It is then important for the raspberry pi to specifically identify devices no matter which USB port they are plugged into. To perform this:
- In a terminal write (Copy/Paste does not get the dashes right): udevadm info −−name=/dev/ttyUSB0 −−attribute-walk | grep serial
- The 0 after USB has to be replaced with what USB number device you are interested in.
- This will get specific serial ATTRS information (for example FTBYJRJL) for the device (device often labeled ttyUSB0 or ttyUSB1)
- You can also look up any sort of identifier (product IDs, vendor IDs, etc.) instead of serial number to help distinguish devices
- Navigate to /etc/udev/rules.d
- Open or create 10-usb-serial.rules file (may need to be root, “sudo”)
- Write a new line as follows:
- SUBSYSTEM==“tty”, ATTRS{serial}==“YourSerialNumber”, SYMLINK+=“nameofchoice”
- Ex: SUBSYSTEM==“tty”, ATTRS{serial}==“FTBYJRL”, SYMLINK+=“ttyUSB_IMetXQ2”
- Save your file and in a terminal write:
- sudo udevadm trigger
You should now have created a universal link to your device. Add this link to relevant programs as needed. To check this:
- Navigate to ~/dev
- Search for the link you created (For example: ttyUSB_IMetXQ2, whatever you wrote in the SYMLINK)
Note, this method may not work if connecting multiple devices using identical converters/cords that do not have accessible serial numbers.
The December 2023 MetTrailer /etc/udev/rules.d/10-usb-serial.rules file is:
SUBSYSTEM==“tty”, ATTRS{serial}==“A9HL1DV3”, SYMLINK+=“ttyUSB_Gillsonic_MetTrailer”
SUBSYSTEM==“tty”, ATTRS{serial}==“A9N4KUII” SYMLINK+=“ttyUSB_VaisalaWXT536”
SUBSYSTEM==“tty”, ATTRS{serial}==“A928AYH7”, SYMLINK+=“ttyUSB_YoungPressure”
SUBSYSTEM==“tty”, ATTRS{serial}==“A1056QAY”, SYMLINK+=“ttyUSB_CS125”
SUBSYSTEM==“tty”, ATTRS{serial}==“DN02E2J3”, SYMLINK+=“ttyUSB_IMetXQ2”
Raspberry Pi: Starting Acquisition Programs
To start all acquisition programs manually, the {ADPAA_DIR}/src/acquire_python/start_all_MetTrailer script is available. However, the system is setup to run programs upon startup without having to manually startup each program.
Automatic Startup of Programs using startlxde-pi. Best to place files in ~/.config/autostart than in /usr/bin/startlxde-pi:
- Programs in autostart are started using /home/pi/.config/autostart
- Create symbolic links to files in ${ADPAA_DIR}/src/acquire_python/*.desktop
- To check if this worked, in terminal write: “sudo reboot” to reboot the raspberry pi.
Note, this process only works for Raspberry Pi's that are attached to monitors or some visualization interface. Not headless.
The December 2023 MetTrailer /etc/xdg/lxsession/LXDE-pi/autostart file include the following at the end:
Raspberry Pi: Running Python Programs Headless
If you want to run programs without monitors or some sort of visualization interface connected upon startup:
- Navigate to the “/etc” directory
- Edit the rc.local file, need root permissions to edit. Type “sudo vi rc.local”
- Towards the end of the file but before the “exit 0” command, add the desired commands
- Ex: “sudo python3 /home/pi/IMetXQ2_tri.py &”
- If the program runs indefinitely, make sure to add the ampersand (&). Else, the raspberry pi will not boot properly as without the ampersand, it will sequentially try and finish each command before fully booting up.
- If needed, add a “sleep X” command before the commands with the desired programs where X is the number of seconds to wait before running the rest of the code. This is helpful if you want to make sure the raspberry pi fully boots and loads properly before running any programs.
- Example end section of rc.local code:
- sleep 40
- sudo python3 /home/pi/IMetXQ2_tri.p &
- sudo python3 /home/pi/StenMiniOFS_tri.py &
- sudo python3 /home/pi/YoungAnem_tri.py &
- exit 0
- Restart the raspberry pi and test if programs are running headless.
Windows Computer Data System Setup
- No Reboot - See configuration at https://www.itechtics.com/disable-automatic-restart/
- To See Uptime, in PowerShell use “(get-date) - (gcim Win32_OperatingSystem).LastBootUpTime”
Gill Sonic Data Stream
- Dropbox storage
- Met Trailer Data is stored in David Delene dropbox folder, Surface/MetTrailer/data
- Transfer from Dropbox folder to Aircraft Server
- Data is transferred from Dropbox server to Aircraft server.
- Data is stored in /nas/Surface/MetTrailer/data/ on Aircraft server.
- The script /nas/Surface/MetTrailer/ingest/scripts/rsync_cirrus2aircraft does the transfer.
- Create Plots
- The script /nas/Surface/MetTrailer/data/WindSonic/scripts/process_all_MetSonicWinds creates all plots.
- Plots are stored in /nas/Surface/MetTrailer/data/WindSonic/plots on Aircraft server.
- Transfer to Web Server
- The /nas/Surface/MetTrailer/ingest/scripts/rsync_aircraft2adiabat copy plots to Web server.
- Automated (crontab)
- The Data Stream is automated using the david.delene user's crontab on Aircraft server.
- The crontab information is archived in /nas/Surface/MetTrailer/control/contab