Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
jokes
Dec 20, 2012

Uh... Kupo?

There was discussion on the pihole reddit about it. I'm fairly certain it's a direct competitor, there's really not much difference. There's a bit more usability with PiHole but AdGuard is also trying to make theirs very easy to use/set up.

I think the issue is that AdGuard Home is trying to work on a bunch of devices which is gonna be a bitch when PiHole works well on an RPI specifically and thus is easier to make sure is working great.

But then again, AdGuard is a business that does well otherwise and PiHole is a bunch of randos relying on donations.

Adbot
ADBOT LOVES YOU

Moey
Oct 22, 2010

I LIKE TO MOVE IT
Who manages and updates those lists? That's all you gotta care about.

John Capslocke
Jun 5, 2007

jokes posted:

I think the issue is that AdGuard Home is trying to work on a bunch of devices which is gonna be a bitch when PiHole works well on an RPI specifically and thus is easier to make sure is working great.

It should be noted that, despite it's name, the pi-hole works on basically any debian-based distribution, and with a bit of work, probably any flavor of linux.

jokes
Dec 20, 2012

Uh... Kupo?

John Capslocke posted:

It should be noted that, despite it's name, the pi-hole works on basically any debian-based distribution, and with a bit of work, probably any flavor of linux.

Yeah but the idea behind poo poo designed for RPi like Pi-hole (and Raspbian) is to be super minimalist and tailored specifically to the ultra-low processing capabilities of the Pi. It also means that devs don't need to give too much of a poo poo about varying hardware for end users.

Fuzz1111
Mar 17, 2001

Sorry. I couldn't find anyone to make you a cool cipher-themed avatar, and the look on this guy's face cracks me the fuck up.

John Capslocke posted:

It should be noted that, despite it's name, the pi-hole works on basically any debian-based distribution, and with a bit of work, probably any flavor of linux.
I can speak to the fact that there's a version of pi-hole for (the very not debian-based) arch linux in the AUR repository. I'm running it and the arm fork of arch on my beagle-bone-black.

The efficiency of pi-hole comes from the fact that there's actually not much to it at all:
  • It uses dnsmasq to handle the DNS server duties (just like the script I posted a week or so does)
  • The config file for dnsmasq is modified to point to a hosts file (located at /etc/pihole/gravity in my install) in which blacklisted url's are resolved to the IP of machine running pi-hole (this is basically not much different to modifying your local hosts file to redirect certain addresses to 127.0.0.1)
  • The pi-hole daemon is mostly there to handle updating the hosts file (after blacklist updates) and re-configuring of dnsmasq
  • A http server hosts the PHP web interface, and handles the requests that would be going to ad servers (though both of these are actually optional)

The http server is optional because you can forego the web-interface entirely if you want (and issue commands to daemon via command line - eg: "pihole updateGravity"). It's also not necessary for ad's to be redirected to a valid http server - it's actually more efficient to just TCP-reset them with the following iptables rules (this assumes a lan subnet of 192.168.1.x):
code:
iptables -A INPUT -s 192.168.1.0/24 -p tcp --dport 80 -j REJECT --reject-with tcp-reset
iptables -A INPUT -s 192.168.1.0/24 -p tcp --dport 443 -j REJECT --reject-with tcp-reset
I found this out because I actually host a website on the same device, and after installing pi-hole I was seeing bits of my site sometimes appear where the ad's should be. I could have fixed this by setting up an alternate site for pi-hole's purposes but I found the above rules worked just fine (and still allow external IP's to access my web server).

TalkLittle
Jun 23, 2004

The Ubuntu 18.10 blog post mentions expanded graphics support on RPi 3 Model B and B+:
"The Linux 4.18 kernel together with updates in Mesa and X.org significantly improve game performance. Graphics support expands to AMD VegaM in the latest Intel Kabylake-G CPUs, Raspberry Pi 3 Model B, B+ and Qualcomm Snapdragon 845."

So looks like it may be ahead of Raspbian which is still on Linux 4.14 as of the Oct 9 release. Does this mean Ubuntu 18.10 enables some games/applications that couldn't be run on a RPi before?

Hadlock
Nov 9, 2004

There is probably a 1-3% increase in graphics performance, not especially substantial. I think we're going to have wrung most of the performance out of the chip at this point.

Probably will be stuck with the same games from now until the end of time, or at least until the raspberry pi 4/5 is released using a moderately modern could.

Nvidia tegra x1 (Nintendo switch) or some allwinner (A80 ?) would be interesting, or any Qualcomm chip, especially the snapdragon 600-series would be a massive bump up. I think I saw someone claiming that the x1 was going for $40, is probably a lot cheaper now that Nintendo has bought 20 million so far, and will likely buy another 20 million. But the allwinner run $0.10-3.00

TalkLittle
Jun 23, 2004

That makes sense, thanks for the response. Guess I shouldn't read too much into marketing blog posts that don't include performance figures.

jokes
Dec 20, 2012

Uh... Kupo?

One day I will be able to play FFT on a Rpi at 60 FPS without it looking/running like dogshit. One day.

evil_bunnY
Apr 2, 2003

Hadlock posted:

Nvidia tegra x1 (Nintendo switch) or some allwinner (A80 ?) would be interesting, or any Qualcomm chip, especially the snapdragon 600-series would be a massive bump up. I think I saw someone claiming that the x1 was going for $40, is probably a lot cheaper now that Nintendo has bought 20 million so far, and will likely buy another 20 million. But the allwinner run $0.10-3.00
It'll be a cold day in hell before RPI's come with not-Broadcom SoCs. They're practically joined at the hip at this point.

Serenade
Nov 5, 2011

"I should really learn to fucking read"
Is running an RPi (or competitor) on battery power a particularly perilous plan? I’ve been considering a portable retropi set up for a long time and think I’m gonna treat myself.

SD corruption seems like the biggest threat, but most of the important files (config, saves, etc) can be stored externally.

xzzy
Mar 5, 2009

As long as the battery has a charge it'll work fine.

You can get watchdogs that will power the system off cleanly if the power supply is in danger of going dead. I haven't actually done it so can't say how easy/fun it is, but the solution is out there.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Is there a way to do that beyond having a data cable attached to a UPS? I have the apc daemon installed and that shuts down my rpi if power gets too low.

mewse
May 2, 2006

evil_bunnY posted:

It'll be a cold day in hell before RPI's come with not-Broadcom SoCs. They're practically joined at the hip at this point.

They were from the beginning, Eben Upton still works at Broadcom even

evil_bunnY
Apr 2, 2003

Cojawfee posted:

Is there a way to do that beyond having a data cable attached to a UPS? I have the apc daemon installed and that shuts down my rpi if power gets too low.
You can directly monitor Vbat through an analog pin I suppose

wolrah
May 8, 2006
what?

Serenade posted:

Is running an RPi (or competitor) on battery power a particularly perilous plan? I’ve been considering a portable retropi set up for a long time and think I’m gonna treat myself.

SD corruption seems like the biggest threat, but most of the important files (config, saves, etc) can be stored externally.

There are a few HATs that can accept various kinds of rechargeable batteries and provide either a "low battery" GPIO signal or actual charge state information for monitoring and safe shutdown.

https://lifepo4wered.com/lifepo4wered-pi+.html
http://alchemy-power.com/pi-uptime-ups/
http://pimodules.com/products/ups-pico-hv3-0a-b-b/plus-advanced
https://copperhilltech.com/pijuice-uninterruptible-power-supply-for-raspberry-pi/
https://shop.pimoroni.com/products/lipo-shim

If you're going for portable, one of the ones that can monitor voltage and recharge the battery is probably a good way to go.

Professor of Cats
Mar 22, 2009

wolrah posted:

There are a few HATs that can accept various kinds of rechargeable batteries and provide either a "low battery" GPIO signal or actual charge state information for monitoring and safe shutdown.

https://lifepo4wered.com/lifepo4wered-pi+.html
If you're going for portable, one of the ones that can monitor voltage and recharge the battery is probably a good way to go.

I'm a big fan of the lifepo4pered one. fairly easy to setup and configure. Great for a temporary UPS. Super easy to tell the Pi to shutdown gracefully when power has been cut after X amount of time or when Y percent of battery life is left.

e: accidentally a word

Professor of Cats fucked around with this message at 23:46 on Oct 25, 2018

Hadlock
Nov 9, 2004

Amazon now sells a variety of ESP8266 and ESP32 (which sit somewhere on the spectrum between Arduino and RPi, closer to Arduino) that include an 18650 battery holder + 128x64 OLED display, and charging circuit for ~$12. With the battery you're looking at $15-20 all in.

Of course, you have to compile everything from scratch, or figure out how micropython works, which is a level up from RPi.

evil_bunnY
Apr 2, 2003

Hadlock posted:

Amazon now sells a variety of ESP8266 and ESP32 (which sit somewhere on the spectrum between Arduino and RPi, closer to Arduino) that include an 18650 battery holder + 128x64 OLED display, and charging circuit for ~$12. With the battery you're looking at $15-20 all in.

Of course, you have to compile everything from scratch, or figure out how micropython works, which is a level up from RPi.
If they're valid arduino targets that's a hell of a loving deal for the functionality.

Hadlock
Nov 9, 2004

Yeah I was surprised how much stuff you get in the package. I think they also include a temp sensor and something else as well. Haven't purchased one yet though.

Fuzz1111
Mar 17, 2001

Sorry. I couldn't find anyone to make you a cool cipher-themed avatar, and the look on this guy's face cracks me the fuck up.
Regarding battery powered pi - I've run pi's off of portable USB powerbanks before, they seem to last a fair while (longer than using them to charge a phone) though I found some powerbanks put out much more stable voltage than others (a phone is a relatively constant load, a pi not so much).

I never did this for long enough to worry about monitoring the charge level, but if you don't mind opening up the powerbank it'd probably be pretty easy to connect one of the pi's pins to either one of the charge indicator lights or direct to a lithium cell for monitoring voltage.

MeKeV
Aug 10, 2010
Not sure whether to stick this in here or the general linux thread as I think it's more docker related than Pi specific, but here goes;

I'm new to docker and only have passable linux experience. I've got docker and a few containers up and running on a RPi3 running raspbian but all the "-v /home/pi/dockerfig/:" files are created with root ownership rather than my pi user, so I'm forced to sudo edit config files in nano/vim where as I'd prefer to winscp in and edit in Notepad++

Any general thoughts on why this might be, and even better how to fix it for existing and future containers?


Edit: running chown on the folder doesn't seem to have messed anything up so far. I love a simple fix.

MeKeV fucked around with this message at 23:39 on Nov 5, 2018

Tatsuta Age
Apr 21, 2005

so good at being in trouble


MeKeV posted:

Not sure whether to stick this in here or the general linux thread as I think it's more docker related than Pi specific, but here goes;

I'm new to docker and only have passable linux experience. I've got docker and a few containers up and running on a RPi3 running raspbian but all the "-v /home/pi/dockerfig/:" files are created with root ownership rather than my pi user, so I'm forced to sudo edit config files in nano/vim where as I'd prefer to winscp in and edit in Notepad++

Any general thoughts on why this might be, and even better how to fix it for existing and future containers?

Add your local user to the docker users group and you won't need to use sudo anymore.

https://docs.docker.com/install/linux/linux-postinstall/

Edit actually this might not be it, sorry for potentially wrong drive by phone posting

Ethereal
Mar 8, 2003
Anyone have tips for debugging a suddenly unmounted sd card based root partition?

I'm SSH'd into my raspberry pi, and all of a sudden, no commands work (ls, cd etc.) with error messages like "-bash: /bin/ls: No such file or directory". I can't read any log messages or use any commands as far as I can tell. I'm at a loss as to what to debug right now.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Your SD card is corrupted, reflash.

Or, get a new one.

xzzy
Mar 5, 2009

I'd just reboot it and pray.

But bash builtins will still work, like "echo *" can replace ls and "echo $(< filename)" can dump a file.

But those are just parlor tricks, just reboot it. :v:

revmoo
May 25, 2006

#basta
Am I just misguided or are there only a small handful of actual basic GPIO pins on the Rpi? What's the solution if you have a whole bunch of inputs / outputs?

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

revmoo posted:

Am I just misguided or are there only a small handful of actual basic GPIO pins on the Rpi? What's the solution if you have a whole bunch of inputs / outputs?
RPi has 26 GPIO pins.

Ethereal
Mar 8, 2003

ante posted:

Your SD card is corrupted, reflash.

Or, get a new one.

xzzy posted:

I'd just reboot it and pray.

But bash builtins will still work, like "echo *" can replace ls and "echo $(< filename)" can dump a file.

But those are just parlor tricks, just reboot it. :v:

So rebooting generally seems to work, but only temporarily. Is there some sort of deeper corruption on the SD card that manifests itself this way?

The echo with a pipe trick is awesome though.

revmoo
May 25, 2006

#basta

So you can reprogram all of them? I was under the impression a lot of them were reserved for specialty TX / RX stuff.

E: Just spitballing, 26 / 2 = 13 but minus a handful for GND and constant 5v etc, that's not that much for basic I/O (think switches and relays etc). What if I wanted to pull input from 10 switches and control 10 relays?

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

revmoo posted:

So you can reprogram all of them? I was under the impression a lot of them were reserved for specialty TX / RX stuff.

E: Just spitballing, 26 / 2 = 13 but minus a handful for GND and constant 5v etc, that's not that much for basic I/O (think switches and relays etc). What if I wanted to pull input from 10 switches and control 10 relays?

If you wanted that? Then you wouldn't buy a gimmick computer with most of the relevant specs locked down 6 years ago, whose gimmick was "just make something for $35".

It's not a serious GPIO platform, just a relatively cheap and relatively popular one.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

revmoo posted:

So you can reprogram all of them? I was under the impression a lot of them were reserved for specialty TX / RX stuff.

The page I linked you posted:

Any of the GPIO pins can be designated (in software) as an input or output pin and used for a wide range of purposes.
It has 40 pins total. It has 26 GPIO pins.

xzzy
Mar 5, 2009

You can buy daughter cards to expand the pins anyways, if you really really want ALL THE PINS.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
You're also not going to be able to turn on a bunch of relays anyway. Depending on the relay, even one is likely to burn out a gpio pin, they're not designed to handle a bunch of current

BattleMaster
Aug 14, 2000

With a power supply and some MOSFETs you can control as many relays as you like.

Edit: plus a high value pulldown resistor and freewheel diode for each of course

BattleMaster fucked around with this message at 05:25 on Nov 6, 2018

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
If you want to run a relay, just put a transistor to stop the current that runs the relay and activate the transistor with the GPIO pin. Seems kind of redundant though.

BattleMaster
Aug 14, 2000

Yeah unless you're switching mains just just the transistor to switch the load.

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

Switches can be setup as a row/column grid layout like a keyboard, depending on the kind of switch you're working with. If you want a bunch of I/O there's microcontrollers more appropriate for that kind of thing like the atmega 2560:
https://store.arduino.cc/usa/arduino-mega-2560-rev3

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
don't buy official arduino boards unless you have money to burn though

Adbot
ADBOT LOVES YOU

Sagebrush
Feb 26, 2012

If you want lots and lots of GPIO pins just get yourself something like the MCP23017 16-channel I2C port expander. $1.25 and a bit of software and you have 16 extra IOs. Use all 127 addresses on the I2C bus and you have 2032 pins. Go nuts

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply