Go to advanced search

by ericcooper
Wed Sep 11, 2019 6:05 pm
Forum: Beginners
Topic: pi zero and line in
Replies: 3
Views: 136

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: 79

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: 266

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: 334

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...
by ericcooper
Tue Jun 11, 2019 3:48 pm
Forum: General discussion
Topic: Move a headless Pi0W to a new WiFi network - how?
Replies: 4
Views: 348

Re: Move a headless Pi0W to a new WiFi network - how?

I don't know if the boot sequence always picks up /boot/wpa_supplicant.conf and moves it to /etc/wpa_supplicant, or only on first boot, but it can't hurt to try. And yes, you can have multiple "network={" blocks in the file, and the ones with matching SSIDs will be tried. Do "man wpa_supplicant.conf...
by ericcooper
Sat Jun 01, 2019 3:29 pm
Forum: Raspbian
Topic: SSH (iptables): how to allow only one IP
Replies: 4
Views: 359

Re: SSH (iptables): how to allow only one IP

You're filtering on destination IP address (-d). Don't you want source (-s)?
by ericcooper
Tue Apr 30, 2019 3:57 pm
Forum: Troubleshooting
Topic: Power shortage using powerboost 1000c
Replies: 21
Views: 1051

Re: Power shortage using powerboost 1000c

It won't be as portable, but an off-the-shelf solution is an external USB battery.
by ericcooper
Sat Mar 23, 2019 5:18 pm
Forum: Python
Topic: Solved: How to avoid that math problem?
Replies: 11
Views: 568

Re: How to avoid that math problem?

You can pass the formatted string to the labelText.set() method instead of the floating point value.
by ericcooper
Sat Mar 23, 2019 4:46 pm
Forum: Python
Topic: Solved: How to avoid that math problem?
Replies: 11
Views: 568

Re: How to avoid that math problem?

It's not the math, but the fact that floating point values are represented in binary. So some values will be different than if they were represented in decimal. You can control how floating point numbers are printed using Python's format operations. For example, to display only one decimal place, yo...
by ericcooper
Thu Jan 31, 2019 4:20 pm
Forum: Troubleshooting
Topic: using Find to remove files older than X number of days
Replies: 18
Views: 771

Re: using Find to remove files older than X number of days

"find" has a built-in action "-delete" that is a little easier to use than "-exec rm '{}'". You can use "-print" while debugging, and when you're sure it's picking the right files, replace "-print" with "-delete".
by ericcooper
Thu Jan 17, 2019 4:54 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: DS3231 I2C RTC and g_ether - cannot use both?
Replies: 3
Views: 348

Re: DS3231 I2C RTC and g_ether - cannot use both?

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_serial
by ericcooper
Wed Jan 16, 2019 5:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: DS3231 I2C RTC and g_ether - cannot use both?
Replies: 3
Views: 348

Re: DS3231 I2C RTC and g_ether - cannot use both?

I would try more permutations. On my Pi Zeros, I have multiple dtoverlay lines in config.txt: # Enable USB driver dtoverlay=dwc2 # Enable i2c real-time clock dtoverlay=i2c-rtc,m41t62,wakeup-source # Enable i2c accelerometer dtoverlay=i2c-st-accel,lis3dh # Enable i2c ADC dtoverlay=ads1015,cha_enable,...
by ericcooper
Fri Dec 21, 2018 5:02 pm
Forum: Raspbian
Topic: Disk space eaten up by old kernels/modules - remove old kernels
Replies: 6
Views: 2560

Re: Disk space eaten up by old kernels/modules - remove old kernels

The latest version of the raspberrypi-kernel package in stretch ships the 4.14.79{,-v7+} modules directories. I guess the .80 and .81 versions came from pi-update, which as mentioned you don't need to be using, just apt update and upgrade. So you can manually remove (rm -r) modules directories older...
by ericcooper
Thu Dec 06, 2018 6:24 pm
Forum: General discussion
Topic: Could somebody update Bitcoin Electrum in the debs?
Replies: 5
Views: 544

Re: Could somebody update Bitcoin Electrum in the debs?

electrum in sid (unstable) is version 3.2.3
by ericcooper
Wed Dec 05, 2018 2:04 am
Forum: Networking and servers
Topic: Sharing internet by Bluetooth
Replies: 4
Views: 3241

Re: Sharing internet by Bluetooth

network-manager knows how to setup Bluetooth (PAN) network connections. Just discover, pair, and trust your phone from your Pi, using bluetoothctl, and if your phone's BT hotspot is enabled, it should show up as one of network-manager's connection options.
by ericcooper
Fri Oct 19, 2018 5:34 pm
Forum: C/C++
Topic: Double Check - Free`ing the right thing
Replies: 13
Views: 2006

Re: Double Check - Free`ing the right thing

Also, if you find yourself having to cast a variable almost every time you use it, that's a "code smell". You should declare a variable of the correct type, perhaps using a cast once to initialize it.
by ericcooper
Tue Oct 16, 2018 3:28 pm
Forum: C/C++
Topic: I am missing some fundamental understanding of C?
Replies: 13
Views: 2381

Re: I am missing some fundamental understanding of C?

I can't tell what's wrong without seeing more of the code (definition of the Image struct, declaration of the lfb variable), but I'd suggest running your program under the debugger, gdb. (You'll have to compile your code with the -g flag.) Then you can inspect the values of variables when the fault ...
by ericcooper
Thu Oct 11, 2018 10:51 pm
Forum: Python
Topic: Periodically update DS3231 RTC with NTP
Replies: 11
Views: 1697

Re: Periodically update DS3231 RTC with NTP

If the DTS file for your RTC specifies that it's a "wakeup-source", you should have a /sys/class/rtc/rtc0/wakealarm file to which you can write the desired number of seconds until it generates a wakeup alarm. The rtcwake command from the util-linux package may also be useful.
by ericcooper
Sun Sep 30, 2018 9:58 pm
Forum: Troubleshooting
Topic: Can not update to the latest MPD (raspianStretch)
Replies: 3
Views: 709

Re: Can not update to the latest MPD (raspianStretch)

Just because that version is in the pool doesn't mean it's the latest one for a particular suite (stretch, jessie, etc.). The Packages file determines that. In the case of stretch, 0.19.21-1 is the latest version. The one you found will be in buster. You can try downloading the .deb and installing i...
by ericcooper
Fri Sep 28, 2018 3:40 pm
Forum: Raspbian
Topic: Linux kernel source code and patches for Raspbian Jessie Lite
Replies: 6
Views: 1006

Re: Linux kernel source code and patches for Raspbian Jessie Lite

There are git tags on the rpi-4.9.y branch corresponding to the Debian raspberrypi-kernel package versions, including "raspberrypi-kernel_1.20170703-1" which corresponds to the package currently in jessie
by ericcooper
Wed Sep 26, 2018 10:38 pm
Forum: Bare metal, Assembly language
Topic: Why does my Raspberry Pi Zero W report that it has 256MB?
Replies: 7
Views: 1414

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

Boot it with a Raspbian SD card and see how much memory the kernel reports in the log, or the "free" command prints. If it says 512M, there's probably some low-level hardware initialization that you haven't done, or are doing differently.
by ericcooper
Wed Sep 26, 2018 9:20 pm
Forum: General discussion
Topic: terminal on ttyusb
Replies: 1
Views: 154

Re: terminal on ttyusb

On my Pi Zero, I added "modules-load=dwc2,g_serial" to /boot/cmdline.txt, and did "systemctl enable serial-getty@ttyGS0.service".
After rebooting, there should be a getty running on the Pi's /dev/ttyGS0.
by ericcooper
Thu Aug 09, 2018 3:39 pm
Forum: Off topic discussion
Topic: Any NAS chassis reccomendations ?
Replies: 6
Views: 2262

Re: Any NAS chassis reccomendations ?

I bought one of these: https://silverstonetek.com/product.php?pid=452 and put in my own motherboard and disk drives. The fans are a little too noisy to have in the same room, but you could probably mod those if desired.
by ericcooper
Thu Aug 09, 2018 3:34 pm
Forum: Troubleshooting
Topic: DietPi Zero w keeps rebooting
Replies: 10
Views: 1152

Re: DietPi Zero w keeps rebooting

I use a minimal Raspbian LIte on the PI Zero W I use as a webcam. It takes just over 1GB on the SD card. Is diet Pi really worth the trouble? I can hardly find SD cards that small any more.
by ericcooper
Wed Jul 25, 2018 3:43 pm
Forum: Advanced users
Topic: Configuration of a RTC-MCP79410 with Raspberry PI 3
Replies: 8
Views: 793

Re: Configuration of a RTC-MCP79410 with Raspberry PI 3

What MCP79410 module are you using? Does it have a battery, and if so have you checked that the battery is good? Without a battery, most RTC chips will lose their settings when the power goes off.

Go to advanced search