Go to advanced search

by ZPMMaker
Thu Jan 23, 2020 11:11 pm
Forum: Troubleshooting
Topic: Camera not detected despite being plugged in
Replies: 19
Views: 3566

Re: Camera not detected despite being plugged in

I understand this error usually indicates the ribbon cable is disconnected. The system is inside a locked plastic enclosure mounted on a rooftop. I doubt anyone has climbed up and disconnected the camera ribbon cable from the camera itself. They are sealed containers so I doubt any bug could've got...
by ZPMMaker
Thu Jan 23, 2020 10:41 pm
Forum: Troubleshooting
Topic: [Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used
Replies: 17
Views: 1733

Re: Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used

Curl uses many shared libraries, so it is possible the segfault occurs inside one of them. See "ldd /usr/bin/curl". You can reinstall a package without purging it first: sudo apt install --reinstall PACKAGE However, if our working theory is that the SD card is experiencing corruption issu...
by ZPMMaker
Thu Jan 23, 2020 10:16 pm
Forum: Troubleshooting
Topic: FIXED: man <command> exits with code 1
Replies: 11
Views: 1089

Re: man <command> exits with code 1

Just some more potentially-useful information for diagnosing this issue... Using method 1, I run an SSH command on my computer's command prompt to control the Pi. Controlling via this method, the man pages work fine. This is logged in as user "pi". Using method 2, I go to a website which p...
by ZPMMaker
Thu Jan 23, 2020 11:30 am
Forum: Troubleshooting
Topic: Camera not detected despite being plugged in
Replies: 19
Views: 3566

Re: Camera not detected despite being plugged in

I don't have a solution, but I have the very same problem with one of my new Zero Ws. I ordered two and equipped them with the card with the same image running Raspbian Lite with mjpg_streamer. Between the two I only changed the hostname and the static IP. One runs perfectly OK, the other one doesn...
by ZPMMaker
Thu Jan 23, 2020 8:33 am
Forum: Troubleshooting
Topic: [Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used
Replies: 17
Views: 1733

Re: Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used

So I just tried to run sudo rpi-update and got a segmentation fault error when rpi-update attempted to use cURL to download the updated version of rpi-update itself. I decided to run sudo apt purge curl Reading package lists... Done Building dependency tree Reading state information... Done The foll...
by ZPMMaker
Thu Jan 23, 2020 8:20 am
Forum: Troubleshooting
Topic: FIXED: man <command> exits with code 1
Replies: 11
Views: 1089

Re: man <command> exits with code 1

does zcat /usr/share/man/man1/top.1.gz | groff -man -T ascii | less work? Interesting. So I have two separate ways of SSH'ing into the Pi's. If I SSH into a Pi one way, the above command works perfectly, as do all man pages. Problem is, this option for SSH connection is costly, so I'd prefer to use...
by ZPMMaker
Thu Jan 23, 2020 3:48 am
Forum: Troubleshooting
Topic: [Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used
Replies: 17
Views: 1733

Re: Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used

How are you determining that the message comes where the curl is used? The camera script that runs via cron every five minutes calls a number of functions from a separate function.sh file. source /home/pi/functions.sh When I SSH into an RPi and manually run the camera script, I get the following ou...
by ZPMMaker
Thu Jan 23, 2020 3:19 am
Forum: Troubleshooting
Topic: FIXED: man <command> exits with code 1
Replies: 11
Views: 1089

FIXED: man <command> exits with code 1

I have a dozen RPi's set up. I updated the software on them yesterday using apt-get update & apt-get upgrade. Since then, whenever I try to view a command's man page, I see the first page/screen, and then at the bottom of that first page, I see an following error and the man page exits (and I'm ...
by ZPMMaker
Wed Jan 22, 2020 9:28 am
Forum: Troubleshooting
Topic: [Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used
Replies: 17
Views: 1733

[Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used

I have a dozen remote RPi ZeroW's set up spread across a few countries, which I can control via SSH. They all have the RPi camera module v2 plugged in and have operated for about two years. They all run the same script every five minutes, which takes a photo and sends it to my server. I did an apt-g...
by ZPMMaker
Wed Jan 22, 2020 8:41 am
Forum: Troubleshooting
Topic: Camera not detected despite being plugged in
Replies: 19
Views: 3566

Camera not detected despite being plugged in

I have a dozen remote RPi ZeroW's set up spread across a few countries, which I can control via SSH. They all have the RPi camera module v2 plugged in and have operated for about two years. They all run the same script every five minutes, which takes a photo and sends it to my server. I did an apt-g...
by ZPMMaker
Wed Jan 22, 2020 8:05 am
Forum: General discussion
Topic: SSH tunnel to Pi via my own server
Replies: 5
Views: 2559

Re: SSH tunnel to Pi via my own server

Just wanted to give an update on this discussion. The tunnels I had set up to EC2 proved unreliable. I can't remember why; it was over a year ago. However, someone recommended I use MeshCentral, which is freeware that you install on a server (such as an AWS EC2 instance) and on the remote devices (R...
by ZPMMaker
Wed Oct 23, 2019 2:36 am
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

Finally figured out what the cause of the problem was. I had copied the udev rules into a private Wordpress-based website, and was then copying it from that into the terminal window in which I was editing the udev rules file. Doing so changed the double-quotes into a slightly different character, wh...
by ZPMMaker
Tue Oct 15, 2019 7:09 am
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

So I tried to get this to work again today. I went into the rules file and realised that the upgrade to Stretch must've overwritten the file, because my old file was there renamed to 99-com.rules.dpkg-old and a new file (presumably installed by the Stretch upgrade) was saved to 99-com.rules. The sol...
by ZPMMaker
Wed Oct 02, 2019 11:24 am
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

Bump. Anyone have any other suggestions please?
by ZPMMaker
Sat Sep 28, 2019 1:12 am
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

OK, have you tried it using their python library? from yocto_lightsensor import * ... get_currentValue() # Returns the current value of the ambient light ... Sorry, didn't see this message yesterday. I haven't tried using their Python library because I'm not familiar with Python (nor any other prog...
by ZPMMaker
Sat Sep 28, 2019 12:17 am
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

Ok try a different microSD card with Raspbian Stretch Lite freshly installed and updated. Then install the sensor code. ... I also realise I can still also upgrade from Stretch to Buster, but this upgrade to Stretch just bricked that particular device, dunno why, can't SSH into it any more. RIP dev...
by ZPMMaker
Thu Sep 26, 2019 1:15 pm
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

Ok try a different microSD card with Raspbian Stretch Lite freshly installed and updated. Then install the sensor code. ... I also realise I can still also upgrade from Stretch to Buster, but this upgrade to Stretch just bricked that particular device, dunno why, can't SSH into it any more. RIP dev...
by ZPMMaker
Thu Sep 26, 2019 12:28 pm
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

Ok try a different microSD card with Raspbian Stretch Lite freshly installed and updated. Then install the sensor code. Sadly these are all remote systems, so I can't replace the SD cards without having them all sent back to me. However, I can control them via SSH. I just updated the system to Rasp...
by ZPMMaker
Thu Sep 26, 2019 2:00 am
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

Which version of Raspbian are you running on the zero ? Stretch or Buster or some other? And not sure if it makes any difference but your 99-com.rules seems to be missing the line SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660" According to /etc/os-release and lsb_release...
by ZPMMaker
Wed Sep 25, 2019 9:58 am
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

Re: udev rule for accessing USB light sensor

neilgl wrote:
Wed Sep 25, 2019 9:13 am
What happens if you do not change any rules but use sudo to run the "armhf binary" they supply? as per their example:

Code: Select all

sudo ./YModule inventory
That works fine (it outputs a list of connected sensors). But I don’t want to have to run it as root...
by ZPMMaker
Wed Sep 25, 2019 7:05 am
Forum: Troubleshooting
Topic: udev rule for accessing USB light sensor
Replies: 14
Views: 975

udev rule for accessing USB light sensor

I have about a dozen identical RPi Zero Wireless systems. I'm trying to get a USB light sensor to work with them. The problem is, when I run the command to get the light sensor reading, I get an error message: ERR: Cannot register usb: the user has insufficient permissions to access USB devices (ypk...
by ZPMMaker
Wed Dec 12, 2018 9:45 am
Forum: Raspberry Pi OS
Topic: Run Bash script before shutdown or reboot
Replies: 5
Views: 2495

Re: Run Bash script before shutdown or reboot

Noob question, though. I note that one of the comments in that Stack Exchange link says "this also means that running my script through this folder will not be useful since it will happen too late". If this works, as it does, why not use it? I would assume that's because of some function(...
by ZPMMaker
Wed Dec 12, 2018 9:28 am
Forum: Raspberry Pi OS
Topic: Run Bash script before shutdown or reboot
Replies: 5
Views: 2495

Re: Run Bash script before shutdown or reboot

OK, I also posted in Stack Overflow earlier (before DirkS replied), but nobody had responded to me over there. So I went ahead and wrote an extremely-detailed explanation of how to get this to work using both methods. It is essentially a summary of everything I have learned today (but mostly about D...
by ZPMMaker
Wed Dec 12, 2018 8:57 am
Forum: Raspberry Pi OS
Topic: Run Bash script before shutdown or reboot
Replies: 5
Views: 2495

Re: Run Bash script before shutdown or reboot

Ahhh, right. That's the problem. Thanks for that. Adding in the following to my script: mount -oremount,rw / my original touch command goes here mount -oremount,ro / ....works perfectly. Noob question, though. I note that one of the comments in that Stack Exchange link says "this also means tha...
by ZPMMaker
Wed Dec 12, 2018 6:50 am
Forum: Raspberry Pi OS
Topic: Run Bash script before shutdown or reboot
Replies: 5
Views: 2495

Run Bash script before shutdown or reboot

I've gone through about two dozen websites trying to get this to work but it simply refuses to, and I'm starting to pull my hair out over it! I want to run a Bash script prior to either shutdown or reboot of my Pi (running the latest Raspbian). e.g. if I type in sudo shutdown now or sudo reboot now ...

Go to advanced search