I’ve not a great deal of experience with Jetson nano. I’m attempting to run a python script after startup, without peripherals - no display, keyboard or mouse. Just a jetson unit accessing a GPS (at this point, but later, a camera and USB drive to save images)
I’ve set up the script so it initiates with boot up, using a systemd.service file.
[Unit] Description="My service" [Service] ExecStart=/usr/bin/python3 /usr/local/bin/myscript.py User=username [Install] WantedBy=default.target
This works fine and the python script (in usr/local/bin/myscript.py) starts, as long as I have a monitor connected, but otherwise it will not.
It seems that while the systemd service is being executed and the python script is started - it just never gets the information it’s looking for, from the GPS.
I’ve also had to implement a rule to allow access to ttyTHS1:
Kernel == "tyTHS*", Mode = "0666"
And I stopped ngvetty, disabbled nvetty and restarted.
The script to access the GPS is just this:
try: gps.update() while not gps.has_fix: GPIO.output(gpsled_pin,ledon) time.sleep(0.2) print("waiting for fix..") gps.update() GPIO.output(gpsled_pin,ledoff) time.sleep(0.2)
So it seems that it never gets a gps fix.
Does anyone have any thoughts on what I can do? or what is going on?
I dont even know how to find out what might be stopping my script from accessing the GPS - the monitor isnt connected!
Is setting the system to start in headless mode appropriate or useful in this case? I dont need wifi access, the unit will be isolated in the middle of nowhere, just accessing gps and writing files.