Go to advanced search

by ericcooper
Sun Oct 11, 2020 9:04 pm
Forum: Advanced users
Topic: find how long it takes to shutdown on my pi
Replies: 14
Views: 450

Re: find how long it takes to shutdown on my pi

You might be able to add something to /lib/systemd/system-shutdown/ that communicates the time to you somehow. But it's tricky because most (all?) filesystems will be unmounted by then (see "man systemd-shutdown"). Perhaps you can remote-log it somewhere.
by ericcooper
Wed Oct 07, 2020 4:34 pm
Forum: General discussion
Topic: Question: RPi Zero W CCTV (Battery Driven)
Replies: 5
Views: 163

Re: Question: RPi Zero W CCTV (Battery Driven)

Here is one possibility: https://www.adafruit.com/product/3435
It doesn't solve your exact problem, because the wakeup time is not programmable, just (manually) settable. So you'd probably have to err on the side of waking up your camera while it's still dark. But it's cheap and off-the-shelf.
by ericcooper
Tue Sep 15, 2020 5:39 pm
Forum: General discussion
Topic: [SOLVED] append user defined text to the current dmesg listing, possible? how ?
Replies: 3
Views: 130

Re: append user defined text to the current dmesg listing, possible? how ?

https://unix.stackexchange.com/question ... mmand-line

If you don't need to write to the kernel printk buffer, but just the system log, then the "logger" command might be easier.
by ericcooper
Fri Sep 11, 2020 6:11 pm
Forum: Media centres
Topic: How to use a RPI as a dnla controler ?
Replies: 2
Views: 312

Re: How to use a RPI as a dnla controler ?

VLC handles DLNA servers pretty well (under Local Network > UPNP)
by ericcooper
Thu Jul 30, 2020 3:26 pm
Forum: Troubleshooting
Topic: Circles of Hell ... 'nano' from source
Replies: 8
Views: 409

Re: Circles of Hell ... 'nano' from source

Upstream source is not the same as the Debian package source -- the latter often includes additional patches from the Debian maintainers.

Try "apt-get source nano" and see https://www.debian.org/doc/manuals/main ... ld.en.html or other guides on how to build Debian packages.
by ericcooper
Mon Jul 20, 2020 3:19 pm
Forum: Advanced users
Topic: Unable to read BLE characteristic
Replies: 2
Views: 129

Re: Unable to read BLE characteristic

You're receiving 2 bytes -- the \n in your Python code is the same second byte (0xA) that gatttool returned.

But I'm confused by b'\x0a\n' -- Python should print this as b'\n\n'. Was that hand-transcribed or cut and pasted?
by ericcooper
Thu Jun 25, 2020 5:55 pm
Forum: Networking and servers
Topic: Setup as router for use in third world countries?
Replies: 8
Views: 533

Re: Setup as router for use in third world countries?

A better-performing alternative might be used WiFi routers that you can flash with OpenWRT. Plenty are available on eBay in the $10-$25 price range.
by ericcooper
Fri Jun 19, 2020 9:18 pm
Forum: C/C++
Topic: Shutdown and Reboot from inside a C program
Replies: 13
Views: 790

Re: Shutdown and Reboot from inside a C program

Exec "systemctl halt" or "systemctl reboot" ?
by ericcooper
Fri Jun 19, 2020 9:13 pm
Forum: Python
Topic: Percentage with Numpy
Replies: 11
Views: 754

Re: Percentage with Numpy

It's treating True as 1 and False as 0, and doing the usual mean calculation.
by ericcooper
Fri Jun 19, 2020 2:44 pm
Forum: General discussion
Topic: What clock does the SPI SCLK use?
Replies: 4
Views: 208

Re: What clock does the SPI SCLK use?

I suggest reading the datasheet for the version of the Pi you have:
https://www.raspberrypi.org/documentati ... spberrypi/
by ericcooper
Thu Jun 18, 2020 12:42 am
Forum: General discussion
Topic: What clock does the SPI SCLK use?
Replies: 4
Views: 208

Re: What clock does the SPI SCLK use?

On the BCM2711, it's the system clock, divided by a configurable value that can range from 2 to 8192.
by ericcooper
Wed Jun 17, 2020 4:31 pm
Forum: General discussion
Topic: Pi to Pi Bluetooth Networking
Replies: 4
Views: 287

Re: Pi to Pi Bluetooth Networking

$ apt-cache search blueman blueman - Graphical bluetooth manager $ sudo apt-get install blueman You might already have a DHCP server installed. Once you choose the blueman "Local Services" window, see if there are any non-grayed-out choices under "DHCP server type". If they're all grayed out, you'l...
by ericcooper
Tue Jun 16, 2020 3:36 pm
Forum: General discussion
Topic: Pi to Pi Bluetooth Networking
Replies: 4
Views: 287

Re: Pi to Pi Bluetooth Networking

If you're running a desktop environment on the 4B , open blueman, choose "Local Services", and select "Network Access Point". You'll need some kind of DHCP server (udhcpd, dhcpd, and dnsmasq are all supported by blueman) On the Pi Zero, use network-manager (nmtui or nmcli) to set up a connection via...
by ericcooper
Tue Jun 16, 2020 3:43 am
Forum: Advanced users
Topic: RPi Zero doesn't have enough processing power to send RF signals
Replies: 18
Views: 926

Re: RPi Zero doesn't have enough processing power to send RF signals

If you get a better transceiver module that actually offloads the modulation and packet processing, like an RFM69 for about $5 or so, you can definitely use a Pi Zero.
by ericcooper
Sun Mar 01, 2020 7:14 pm
Forum: Beginners
Topic: Communication over Cat5 to Microcontroller
Replies: 3
Views: 203

Re: Communication over Cat5 to Microcontroller

If your microcontroller is communicating over Ethernet, chances are that it has a (pretty) full TCP/IP network stack. The fact that it's written in C has no bearing on what you do on your Pi to listen to it. All that matters is that you understand what protocol it's using. To get started, you could ...
by ericcooper
Sat Feb 29, 2020 7:41 pm
Forum: Beginners
Topic: data rate of rf module
Replies: 4
Views: 385

Re: data rate of rf module

This depends on the bandwidth and modulation scheme being used, not (just) the center frequency. For example, WiFi at 2.4GHz can achieve hundreds of Mbps.
by ericcooper
Tue Feb 18, 2020 5:42 pm
Forum: Beginners
Topic: Consumption raspberry pi zero w
Replies: 9
Views: 431

Re: Consumption raspberry pi zero w

One easy way is to use a USB power meter between your Raspberry Pi and the power supply. They're available for < $20
by ericcooper
Tue Dec 03, 2019 6:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI: Too short delay between CS low and first byte
Replies: 4
Views: 445

Re: SPI: Too short delay between CS low and first byte

If transfer rate isn't critical, maybe you can just slow down the SPI speed?
by ericcooper
Tue Nov 26, 2019 5:13 pm
Forum: Beginners
Topic: scp password question
Replies: 6
Views: 436

Re: scp password question

Add your public key to the remote user's ~/.ssh/authorized_keys file (or just rename the .pub file to that, if it's the only authorized key)
by ericcooper
Tue Nov 26, 2019 1:28 am
Forum: Beginners
Topic: scp password question
Replies: 6
Views: 436

Re: scp password question

If you use the user@host: syntax, scp will try to login to that user on that machine (this allows machine A to copy a file from machine B to machine C). But if it's your local machine, there's no need for that part -- just specify the local file name.
by ericcooper
Thu Oct 24, 2019 8:19 pm
Forum: Other programming languages
Topic: command line expand pi filesystem
Replies: 2
Views: 1357

Re: command line expand pi filesystem

If you don't really need a shell one-liner, I'd recommend using gparted, which has a nice GUI and is more foolproof. Otherwise, this *should* work, but as always you should have a backup if you're not prepared to lose what's on that partition. Also, I'm assuming your USB-attached disk is on /dev/sda...
by ericcooper
Wed Sep 11, 2019 6:05 pm
Forum: Beginners
Topic: pi zero and line in
Replies: 3
Views: 700

Re: pi zero and line in

That should work fine.

You can also use a USB audio capture device with a USB OTG adapter.
by ericcooper
Wed Sep 11, 2019 3:52 pm
Forum: Beginners
Topic: Connecting to RPI from another device
Replies: 2
Views: 192

Re: Connecting to RPI from another device

The ssh daemon listens on port 22, not port 80 (unless you've specially configured your sshd to do that). Port 80 is for HTTP by default.
by ericcooper
Thu Jun 27, 2019 6:05 pm
Forum: Beginners
Topic: Detecting changes in directory...
Replies: 3
Views: 420

Re: Detecting changes in directory...

The best way is to use the inotify facility, which waits for file system changes. You can use the "inotifywait" command (from the inotify-tools package) in a shell script, or use the inotify API directly in your programming language of choice. The easiest way might be just to poll: capture the outpu...
by ericcooper
Tue Jun 11, 2019 7:54 pm
Forum: Beginners
Topic: Determining how Raspbian was installed?
Replies: 4
Views: 521

Re: Determining how Raspbian was installed?

You can tell the difference between a Raspbian-only install and a NOOBS/PINN install by looking at the partitions on the SD card: sudo parted /dev/mmcblk0 print Raspbian will have a small fat32 partition and a larger ext4 partition; see https://github.com/raspberrypi/noobs/wiki/NOOBS-partitioning-ex...

Go to advanced search