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
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.

Puddin posted:

Au.element14.com would be your best bet but are out of stock. Will have 8490 in stock on 19th Nov however.
Ordered one late wednesday night (there were 650 in stock), and it came midday today (friday).

One odd thing that I've noticed - my powered usb hub is capable of powering the pi the wrong way (via its uplink port and the pi's fullsize usb ports). I thought it was convenient at first but then I realised what side of the pi's board the powersupply bypass/filter cap is on (makes me wonder how much good it does when the power supply obviously isn't isolated from the usb power at all).

Adbot
ADBOT LOVES YOU

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.
On a similar note, I was very surprised to find that the raspberry pi I set up at for my parents was capable of running my external (unpowered) 2.5" hard-drive from its own USB ports. It had to use both USB ports (via the Y-split cable) and the rpi reset when I first connected it (presumably the current needed to spin the drive up was a bit much) but after openelec rebooted it was fine.

The drive was a seagate momentus 5400.6 in a vantec cx enclosure. The powersupply for the pi was something similar to this but it has a micro-usb connector (I got a few from my work and they've proven to be solid power supplies for the pi).

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.
A small heatsink is an option but it isn't really needed, I got mine to 950mhz without additional voltage. You might want to go without a case though.

I wouldn't bother overclocking in openelec unless you are having problems - from what I hear the pi is fine decoding most audio formats in software as long as the video is being decoded in hardware (this will likely be the case in files where the audio is difficult to decode).

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.

TVarmy posted:

I find I can't fast-forward files. Is that just a limitation of the Pi?
It's a limitation of the youtube plugin - which seems to operate by just downloading the whole video. You can fast forward a little, or rewind then fast forward up to the point you rewound from, but if you fast forward past the point it has downloaded you have to wait for it to catch up (might take a long time but eventually it will start playing again). It isn't capable of restarting the stream from a point midway into the video.

Ensure you set max res of youtube plugin to 720p, even with a solid internet connection and 950mhz overclock the pi just takes too long to start 1080p playback.

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.
Yeah probably RMA (unless using a different sdcard helps). The only time I have seen that happen is running 1ghz overclocks at stock volts, and even then, only on samples that overclock poorly (the "made in UK" ones in my experience).

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.
Just got a raspberry pi 2 - the CPU is faster but I have to say that for what I've tried so far it definately doesn't feel like as much of an upgrade as you'd think.

The problem is that the the real performance bottlenecks are unchanged - everything is still on a single USB2 bus and the sdcard interface feels every bit as slow (no it's not my card - I'm using a sandisk extreme pro which has about as good random read/write as you can get). It being armv7 does open you up to more operating systems but then it's the closed source video driver that's in your way. If you want a snappy UI raspian still runs best (despite not being built for armv7) because it's been tweaked around the raspberry pi's shortcomings.

It's probably a fair upgrade for anyone using openelec on it - not that it's any more capable of playing actual video (so don't bother if you are just playing files off network shares like me) but if you are using lots of plugins or trying to run torrents in background I could see the CPU making a difference.

PBCrunch posted:

I suspect that a really kick rear end Android port for Pi 2 will emerge long before anything like that happens.
Yeah I wouldn't hold my breath for that, they recently closed the android thread on the official forums "due to the repetitive questions on this forum taking up valuable moderator time with little or no benefit to the community". There is no proper android video driver and there probably never will be - android needs a video accelerated UI and you don't really get that even in linux (hence no unity in the ubuntu image for raspberry pi 2).

It would probably be not too difficult to get wifi going in android on the odroid - I've read about people using wifi dongles with their actual android phone to use things like aircrack-ng - that community is probably bigger than odroid's so maybe see how they did it.

By the way, what's the video driver situation like with the odroid? Are you able to do things like watch youtube in a browser?

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.

PBCrunch posted:

I should add that not only is the microSD location on the C1 bad for tinkering, it is very fiddly to insert cards, and the card is only held in by friction. The click-click mechanism on the newer Pi's is much better.
Raspberry Pi B+ / 2 only hold the microsd with friction too, the push mech doesn't lock the card in or anything it's just to make it easier to remove the card but you can easily just pull it out instead (BeagleBone Black is the same). To be honest as someone who doesn't use a case, I'd rather the micro sd was a bit more out of the way because I've managed to eject the microsd card by accident more than once (usually when pushing things into the USB ports on the other side).

Projects specifically targeted to it is a strong point for the pi, no doubt, thing is though that until the 2 came out a lot more work was needed to target it than it's armv7 competitors. Going forward I'm wondering if ensuring backward compatibility with the low end devices might hurt the better ones (they've already stated that they may not release an armv7 version of raspbian for rpi2).

I haven't tried rasplex or openelec yet.

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.

wooger posted:

Yuck, I standby my opinion that anyone using these boards for media players etc would be better off getting a little atom box / Intel stick, and having a full suite of drivers, software, acceleration etc.
That's only a problem when trying to play video within the X windows environment (where it's notoriously difficult to hardware accelerate anything), which is more something you'd be doing if you were using it as a replacement for your actual PC.

If you want a media player you'll be using something like openelec which is an entirely different story, and when running that I've only seen my raspberry pi b struggle with 60fps 1080p content (it kept things synced but dropped frames a bit, still did better than some dedicated set top boxes I've seen).

When my htpc died over a year ago my raspberry pi took over its duties, and it was going to be temporary but it says a lot that it's still my htpc today (though for me that means "play videos off my network shares").

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.
On a rpi B I've successfully powered a 2.5" HDD and a wifi dongle without a hub, but I had to do the power bypass mod first:

People criticise this mod because it "back-powers" the pi - effectively bypassing the filtering afforded by the cap at the power input, but I've never had a problem (and the same thing happens with a powered hub anyway). The 4 port B+ and B2 apparently have better USB power so there's a good chance it'd work without the mod.

I will say though that my harddrive might be more efficient than most (I built it from an enclosure and laptop drive that I picked specifically for its low power consumption) it could actually run on an unmodified rpi B if you plugged it's y adapter cable into both the rpi's ports, and that doesn't seem to be common.

PS: I've used a raspberry-pi for wifi mischief myself (aircrack-ng, freeradius-wpe, hostapd-karma, etc) and it works very well, and one of these works pretty good for powering the pi if you want to take things mobile:


I don't know how long it'll last with a HDD but my 9000mah model could go for a few hours with 2 dongles connected (one for sniffing, and one which acted as an access point so I could connect my phone and control the pi using ssh).

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.
Phone charger is fine, something made for tablets (with 2amp or higher output) is best.

You really don't need a case, I've never used one except for chucking it in a small container for transport.

An 8gb card is fine, but 16gb might give you a bit more breathing room. The raspberry pi can't really use the high sequential speed of a very fast card but good random read/write helps a lot (which is something most sdcards aren't optimised for unfortunately). I've benchmarked random r/w on a bunch of cards myself and the sandisk extreme cards do well but are pricey. The Patriot LX cards do ok too as I recall and are much cheaper.

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.

Crack posted:

I have a TP-Link TL-WN722N which is cheaper and I might double up on
Those work fine and the early versions with atheros chipset are one of the better usb wifi dongles I've used.

For booting multiple os from one sdcard this might work well for you (never tried it myself):
http://www.berryterminal.com/doku.php/berryboot

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.

Gaz2k21 posted:

... would I be better off getting a crossover network cable between the Pi and my main computer or just unplugging the hard drive and and connecting it to the main computer when i need to transfer files?
The latter - all the pi's usb ports, it's network port and it's sdcard slot all share one USB2 bus. If you don't need the files in a timely manner (eg: you are just playing some videos) it will work, but otherwise you want to plug that drive into your PC.

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.
Anecdotally - some sdcard's are more prone to corruption than others. I've got a few pi's of different types and have never had an issue with corruption even though I yank power all the time - I'm I using patriot EP's for the RPi-B's, and sandisk extreme pro's for the B+ and 2 (the latter was chosen because it has very good random read/write).

However I've also set up a few for pi's for friends, where I've just used any old poo poo for the sdcard - a few of those have gone wrong, and it's these cards which seem particularly prone to loving themselves:


I should note that most of these pi's are running openelec which doesn't use a swap file/partition and has most things mounted readonly. I do try to properly shut down the pi's running raspbian especially if they are running a gui.

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.

eschaton posted:

Probably dastardly individuals (really their automated systems) trying to get access to the system through all possible combinations of passwords.
I once had a raspberry pi with ssh open to the world on default port of 22 and /var/log/auth.log was filled with loads of chinese IP's trying the usual dumb combinations. The funny thing is that I'd disabled password authentication completely (public-key only) but the scripts aren't smart enough to parse the authentication mode error and move on.

I now run on 443 because I log in through my work proxy which only allows HTTP CONNECT to port 443, auth.log is now a lot less busy infact I've never seen an attempted ssh login. I do see a few "Bad protocol version identification" lines a day, usually indicating russian and chinese IP's trying to connect to it like its a https site. I also just saw a taiwan IP trying to connect to it like it's a http proxy (the error was Bad protocol version identification 'CONNECT vip163mx01.mxmail.netease.com:25 HTTP/1.0' which I think means they were trying to use me for email spam).

Hadlock posted:

Real world numbers I've seen for the Pi are about 1 megabit (slightly less than a T1, ok for remote desktop and general command line stuff but not much else), Pi2 will do upwards of 10 megabit
Really? I've seen an original model B pass through up to 6megaBYTES/sec acting as a router (using a usb ethernet adapter for WAN and it's own ethernet for LAN, I've also had about half that using a wifi adapter for WAN) - I wasn't using a openwrt or anything though, I just set it up as a very simple router by using some iptables rules in raspbian. I still wouldn't use a raspberry pi as my main router because a router that can run openwrt is much better.

[edit]
I missed the fact you were using it for VPN, that would explain it, and yeah a Pi2 would make a difference because it's probably limited by how quickly the CPU can perform the encryption.

Fuzz1111 fucked around with this message at 06:07 on Nov 12, 2015

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.

Police Automaton posted:

E: Also routers don't run on magic, they're just computers too. Lots of routers actually have specs that make the Pi 2 look like a supercomputer. The only thing that really cripples the Pi 2 there is USB and no direct in-hardware support for some things.
While the CPU in the Pi isn't bad compared to what's in most routers, I still wouldn't use a Pi as one - routers don't have all their network interfaces on one USB2 bus (yes even the ethenet port on the Pi is on USB bus). Whilst pumping 6mB/s from one network interface to another is possible it's probably maxing out the USB2 bus to do so: a beaglebone black, which doesn't have its ethernet port on USB bus, can do over 8mB/s as a router (basically hitting the limits of 100mbit ethernet, not it's USB bus).

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.

Paul MaudDib posted:

99.9% of the time swapping isn't a problem but if you do it while the disk is full and it ends up being a lot of continuous, small, random swaps (ie your working set is really just too big for memory and you are heavily thrashing your pagefile) it could trigger enough write amplification that you could have a measurable amount of SSD wear. This is mostly just me being paranoid though.
No you are probably right. The only SSD that I've ever seen get worn enough to trigger windows generic "hard drive failing" warning* was an msata 24gb SSD being used as a cache drive (paired with a 500gb mechanical drive) in a friends laptop - it was only 2 years old but as a cache drive I'm guessing it saw a usage pattern similar to what you are describing.

* My friend actually payed someone to try and fix the laptop before bringing it to me - they wanted to replace the (perfectly fine) 500gb harddrive based on that windows error, but crystal disk info showed the real culprit. I ended up replacing the msata drive with something big enough to be the system drive itself, with the hdd now being used as a storage drive - it goes much faster than that useless cache setup.

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.
You know, I'm actually a tad annoyed seeing the specs of the rpi3 today after having read this article go on and on about the CPU and how it would make it a "real desktop computer". The rpi2's CPU upgrade didn't make a whole lot of difference because CPU wasn't the bottleneck for much of anything you could do on the rpi1, so how is an even smaller performance jump supposed to change things? It still won't decode H265, run android, or play video in a browser window because they are too attached to the "open" GPU which isn't, and it won't be a useful fileserver, router or do much of anything requiring decent IO throughput because everything is still sitting on a single USB2 bus and it just doesn't cut it.

I actually tried running a whole bunch of stuff on my rpi2 when I first got it (to see what it was capable of), and I will list the improvements that I noticed:
  • The CPU could run armhf binaries - don't get me wrong, that's a good thing which opens it up to a lot more distro's
  • OpenELEC's interface was very slightly more responsive - this is what it is being used for now
I guess the onboard wifi and bt will be a price improvement for those that will use them and don't already have a bunch of dongles laying around. I mean atleast you won't have to worry about the thing having trouble booting with a wifi dongle attached anymore (in my experience rpi2 was actually worse for that than the rpi1 - I don't know what those USB power delivery improvements in the B+ and 2 were supposed to be because my made in china version of the rpi1b is still best).

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.

fishmech posted:

I was able to run an old Raspberry Pi (original model B) that way, but it had a bad habit of dropping USB connections which was a pain. When I switched to powering off a separate power supply, the USB unreliability went away.
It sounds to me like the power supply for the hub was bad, but that wouldn't be a surprise: I had a power supply for a 7 port hub fall apart while unplugging it - leaving pins in outlet and 240 volt conducting wires attached to them (the wires were stupidly thin and mostly made of insulation too - I could probably count the strands of copper they contained on one hand).

I'd say a lot of the USB problems people experience are down to the power supply they are using - like the guy above who has his pi reboot just from plugging a USB keyboard in - I've got several rpi B's, a B+ and a B2 and I've never had that happen with anything less than a wifi dongle (which would only trigger reboot occasionally - doing the power bypass mod fixed that and now it can power both wifi dongle and 2.5" USB HDD at same time).

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.

PBCrunch posted:

I attempted to do exactly that with a TP-Link TL-WN722N..... The adapter uses the well-supported Atheros AR9271 chip.
Be careful buying tp-link anything if you are after atheros chipset, many models (eg: TL-WN821N and TL-WN822N - the latter being one of the best adapters I've used) have switched to using realtek chipset and so don't offer the range of modes they used to.

You can tell which models are affected based on whether tp-link offers different drivers for different iterations of the same model (the TL-WN722N you mentioned appears to have been spared for now).

The Netgear EVAW111 used to be a real cheap ($9) way to get an atheros wifi adapter, because while it was sold as an optional wifi upgrade module for netgears wired media player, it was actually just a normal usb wifi adapter (one that probably had to be atheros to work with the presumably Linux powered media player).

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.

LochNessMonster posted:

Another thing I'd love to give a shot some day is install some security camera's outside of my house and save the feeds on a disk

Would a puu zero be able to do that, or should I look at pi3 for that as well?
This post is from a while back but the original Pi is definitely capable of this, because in my home I've used one to simultaneously record from 3 camera's without problems (I currently use a Beagle Bone Black for it but a Pi1 worked too).

Here's how you set up the Pi/BBB to do it:
  • Run something minimal as OS, raspbian booting to shell worked ok for Pi, and I use arch linux on the BBB.
  • Use OpenRTSP for dumping camera footage and just dump raw streams. Obviously you won't be re-encoding footage on the device but don't use OpenRTSP's options to put stuff into avi, mov or other containers either if you want to have usable footage when stream is ended unexpectedly (eg: someone rips the camera down). I use ffmpeg to convert footage to something usable and I do it on PC, but it can feasibly be done on Pi/BBB because it's not re-encoding anything, just putting the streams into a container. If anyone is interested I can post both windows and linux scripts for converting footage as well as the linux script I use to run OpenRTSP (it records in 4 hour blocks and loops, deleting old footage as it goes).
  • Don't record to same device that the OS is on - on Pi I used a USB drive, on BBB I use microSD because OS is on MMC.
  • If you are recording from multiple cameras onto one flash device you should record to separate partitions otherwise stuff will get horribly fragmented. This happens because OpenRTSP writes in 1 second blocks and the streams from different cameras end up interleaved, it starts off bad enough, and it will just get worse and worse after old footage is deleted and new footage is squeezed into the slots of space left (which the flash memory won't care about but seeing a 800mb file in thousands of fragments made me wonder if I might find the limits of what fat32 will put up with).
  • Be mindful of what else you use the Pi for because you can potentially lose footage if you tax its I/O at all (this is why I used a BBB - the ethernet and MMC do not share the USB2 bus, so I don't need to worry about ssh'ing in remotely to monitor cameras, review footage, etc).

For anyone wondering why the hell I used such a low powered device for this - it was so I could run camera's, Pi/BBB and switch from a very modest battery backup setup - a 12v 9ah SLA battery connected in parallel with a 3amp 13.4v power supply (the voltage needs to be between 13.4v and 13.8v to keep battery float charged, but 13.4v is still low enough that the 12v camera's and switch don't mind being connected directly, and the BBB is connected via the stepdown from a cheap USB car charger). The battery is capable of keeping things going without power for 8 hours - which is enough for my purposes - I just want to deter smartarses who switch the mains off before breaking in with cameras that are visibly still on and being accessed (I'm in australia and our electrical panels are outside).

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.

LochNessMonster posted:

Awesome post, thanks for that! Time to start looking into it again, I did some side projects in the meanwhile. What kinda cams did you use for your project?
  • Edimax IC-9110W outside looking across front of house.
  • Edimax IC-3116W outside looking down side of house (it's an indoor cam but I have it far enough under eaves it doesn't mind).
  • Edimax IC-3140W inside (it has a microphone).
I bought them because they were cheap and were 12volt but I don't recommend them. Here's why:
  • The indoor cams would crash and require a hard reset after a semi random amount of time (between 6 hours and a few days) and require a manual power cycle to get going again. I worked around the problem by writing a script that runs on BBB and resets them (by making a call to their web interface) every 4 hours which seems to prevent them getting in this state.
  • The outdoor cam has the actual camera separate from the control unit, the idea being that if you record locally to the cameras sdcard you can mount the control unit somewhere that is safe even if camera is accessible by thieves. In reality you'll have trouble taking advantage of this design because the cord is less than a meter long, but worse than that is that the connectors they used are loving poo poo (socket must've been the cheapest 4 pin 2.5mm they could find), and camera would keep getting disconnected at random until I ripped the connectors off and soldered the 4 wires in the cable directly to control units circuitboard.
  • Even when you turn every single recording, notification, storage and UPNP option off (so that camera should basically do nothing until you you access it via http or rtsp) the camera still regularly attempts to connect to sites on the internet. It seemed dodgy to me and I stopped it by setting them to use 127.0.0.1 as their dns server.
  • They constantly spam your network with poo poo, if you ever configure them with a samba share they will ping that server every second checking if there is space to write to (even if you've disabled recording to samba). If you change their samba setting to an ip that doesn't exist they will spam their own system log with errors about it, but setting it to an invalid hostname results in just one error message. In addition to this I recently discovered that they spam the network with an insane number of ARP messages but I can't stop that (short of writing my own firmware for them).
  • The 3140W was ridiculously out of focus out of the box. I discovered later that you can twist lens to focus it (which wasn't in manual) but it really should have been set better than it was.
  • The 3116W has always been stuck in nightvision mode unless you disable it in settings (I've tried aiming a very bright torch directly at the light sensor and it doesn't care). I didn't mind that much as the picture was clearer in nightvision mode anyway - that was until the mechanism for toggling the IR filter got stuck so that the filter was always on (so with nightvision enabled camera was at all times illuminating things with IR light it couldn't see). I disabled nightvision mode because I couldn't be bothered trying to fix it.
  • One day I noticed a strange wifi access point broadcasting seemingly within my house with no ssid - yep it's the camera's and they do it whether you are using wifi or not. It's probably something to do with wifi based setup (which I've never used). Probably a big loving security risk right there but I've ripped the antenna off the one that has any worthwhile signal strength outside my house.

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.

xzzy posted:

Unless you have remote control to its power source, yeah, watchdogs are great.
These posts about hardware watchdogs made me curious if I such a feature is present on my Beagle Bone Black (as it's headless, always-on with battery backup, and in a fairly hard to access location under my house - I use it for recording footage off my IP-cameras, as an SSH gateway into my home network, for pi-hole, and a few other things).

Turns out it does have one, but thinking about it, the few times it's become inaccessible over SSH were caused by something I'd done breaking boot before SSH could launch (or before my script to open ports could run) where a watchdog wouldn't have helped me anyway. Infact I've just realised that in the ~3 years I've used it like this it's actually never locked up once, which is a lot better than my brief experience of using a rpi1B+ for the same task. So I guess if you wan't something more reliable than a raspberry pi, a BBB running arch-linux might be a good fit for you. They are a bit old at this point (and I wouldn't use one for anything video related because they can't even output 1080P), but ethernet is NOT on USB, and neither is the eMMC or sdcard storage (ethernet is only 100mBit but at-least you can max it out reliably, and without impacting it's bandwidth to it's own storage/USB). Power consumption is quite low too (I measured consumption of everything for power backup and BBB drew under 200mA via a 12-5v adapter).

Hadlock posted:

I recently found out that Synology makes all kinds of cool devices with ethernet and SATA port built right in...
I've thought of getting a NAS off and on for years - as I already have wired my house with gigabit (and my two PC's have 5 and 13tb worth of drives and spend a good part of their time on just for serving up files). The thing that has always put me off about a brand name enclosure vs a DIY solution is the somewhat black box nature of them, and basically having fewer options when things go wrong (Gamers Nexus covers it pretty well in this video). Of course what happens then is that I start looking into DIY'ing my own, realise that it's power consumption will be at the point where it's worse having it always on vs firing up a gaming PC to watch stuff on it, and then I forget about setting up a NAS for another year or so.

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.

Varkk posted:

You can install Kodi in Retropie. So in theory you would only need one device for media player and games.
I used berryboot with openelec and retropie to solve the same problem. The version of retropie offered in berryboot's menu can be a bit old, but you can download berryboot compatible image from retropie's site. Openelec is usually up to date but if not it already comes in the right format for berryboot (where most of the filesystem is in a compressed image file) in its normal distribution.

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.

Rexxed posted:

It's worthwhile to get either an official RPi power supply or just a good one that's recommended for the Pi...
For pi3 I'd actually recommend something that outputs a bit over 5volt (as many tablet chargers do - eg: many of apple's output 5.2v) because otherwise the stupid lightning bolt power warning will trigger everytime the voltage drops even a few millivolts below 5v.

That warning is way too sensitive, I have a bunch of microUSB chargers I got from work (this emerson model but with micro USB connector) which have been rock solid for every raspberry PI I have used them with - I was even able use one to power a rpi1b with 2 USB-powered 2.5" hard drives attached (the rpi had the power bypass mod). Despite the chargers only outputting 2amp 5volt, I found they also worked fine with a rpi3 - until I tried replacing the microUSB male connector on one with a fullsize USB female socket (so I could insert any cable I like), the extra length added by the USB->microUSB cable was enough to make that warning start popping up (and I disabling it once I broke out the meter and found it never dropped below 4.98volt).

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.

Rexxed posted:

It's really easy to have your SD card get corrupted if the Pi loses power unexpectedly. I had to setup retropie twice due to this and now just keep images of the important cards post-setup on my desktop PC just in case.
If you have a Linux PC / boot disk you can usually repair the card filesystem/s with fsck.

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.

Island Nation posted:

I’ve been using diskpart in Windows to repair it for now. I put Lakka on a card in place of Retropie but I can’t work on it until Friday
I mean using it to repair the EXT4 filesystem without re-imaging the card.

I should say that corruption hasn't been that much of an issue for me either, mostly its happened due to sdcard actually being yanked out (usually because of stupid unnecessary push-to-eject mechanism on rpi1B+ and rpi2) rather than loss of power.

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.

Newf posted:

What I'm looking for is a router that I can attach my phone to via USB instead. This one has a USB port for a USB Modem - could that port be running to an Android device instead?
I've had a fair bit of experience with tp-link's 3G/4G routers (including the one you linked) and as others have said - the router expects only certain devices in that USB port, specifically it expects a 3G/4G USB modem (using a chipset that it has a driver for), and an android phone doesn't quite work the same (though it would infact be technically easy for the router to use it if the manufacturer had thought to offer the functionality - because an android phone just appears as a USB network card when you tether it, a USB modem actually requires the router do a lot more work).

One option for using a router, is to flash a 3rd party firmware onto it (like gargoyle) and set it up as a wireless client/repeater - that way the router connects to phone via wifi, and other devices connect to it via wifi. I actually set up an atheros based tp-link MR3020 this way for my father in law because he had a laptop that just refused to connect to his routers wifi (seemed to be some weird wifi incompatibility issue - it'd connect to anything else, and could connect to his own router using a USB wifi dongle, but not with inbuilt wifi), I should note a few things though:
  • It looks like newer MR3020's use a different non-atheros chipset that you can't put 3rd party firmwares onto.
  • If you do this with another router you have to set the router up not just to be a simple repeater (where phone does routing) but as a full router that connects to it's uplink over wifi. The reason is because when you have multiple devices connected to the same phone over wifi, I don't think they are able to see each other (just phones internet connection).
  • Using USB instead of WiFi between router and phone is probably possible with a router running a third party firmware, but definitely not with gargoyle on any version of the MR3020. The problem is that it only has 4mb of flash which leaves barely enough for the firmware (and there's not enough for the optional USB drivers which take up a fair chunk of space themselves). This also goes for other TP-Link 3G/4G routers (eg: mr3040 and mr3420) as they all seem to have 4mb flash.

A better option I think would be to use the rpi as the router itself, it should be dead easy to tether a rpi running raspbian to your phone via USB - it should just work actually (and you should test this before taking this idea further), if it does I can post more details about setting rpi up to do this.

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.

Newf posted:

Posting now from the USB-tethered PI, which 'just worked'. A step in the right direction.

You're suggesting from here that I use the PI as a hotspot for my other devices?
Yes that's exactly what I'm suggesting (using rpi's internal wifi for the Access Point). Sorry for delay I had trouble finding the script I wrote ages ago to do something like this. Here are steps to set pi up as wireless router:
  1. Uncomment/add/modify following line in /etc/sysctl.conf:
    code:
    net.ipv4.ip_forward=1
  2. Install hostapd and dnsmasq:
    code:
    sudo apt-get hostapd dnsmasq
  3. Reboot pi.

  4. Download and extract the script and AP config:
    code:
    wget http://fuzz.website/pirouter.tar.gz
    tar xvf pirouter.tar.gz
  5. Plug in phone, tether, make sure pi has connected, and then run script:
    code:
    cd pirouter
    ./pirouter.sh

Hopefully you should see a new wifi access point called "HELLOHELLO", the password is "passwordhere" (to change these edit hostapd.conf file which came with script). Connecting to it should give you an IP in the 10.42.0.x range, and you should have internet access via the tethered phone. Actually the way I've written the script, the pi will use any available connection as uplink, so it will work just fine for someone wanting to use rpi's ethernet as uplink (infact if your pi has ethernet connection as well as tethered one, it will likely prefer using ethernet instead of tethered phone as uplink - let me know if this is a problem for you).

I should note that the script stops networking service so if uplink connection is not made before running script (or dies after) this will cause problems - there's some lines commented out in the pirouter.sh script that might help for that.

Let me know how you go.

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.
Oh that's right you're wanting to use pi-hole. Yeah my script uses dnsmasq for both dhcp and dns, while pi-hole just uses it for dns but can optionally enable dhcp too.

Easiest way to fix this is to let pi-hole do both - comment out the lines in my script that have anything to do with dnsmasq (so the line that stops service, the line that kills process, and the line that starts it). Then enable the dhcp server in pi-hole's gui with following settings (has to be these ip's so my script will do actual routing bits successfully):


Hopefully that works, but let me know if it doesn't and I'll go over doing this the other way (disabling only dns part of my script, but not dhcp).

[edit]
I recommend trying above first, but after looking at dnsmasq's options - it's actually kind of simple to do it the other way too: instead of commenting whole dnsmasq command line out just add "-port 0" to the end of it (apparently that's all that's needed to prevent it starting a dns server). You'll still have to remove the lines that stop the dnsmasq service and kill it because those will interfere with pi-hole's instance of dnsmasq - unfortunately this means my script can't be executed multiple times without cleaning up the instance of dnsmasq it leaves behind manually first (you'll have to use kill -9 and ensure you are killing the instance started by my script, not the instance started by pi-hole).

Fuzz1111 fucked around with this message at 08:53 on Oct 15, 2018

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).

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.

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.

thehustler posted:

(stuff about powering HDD from raspberry pi)
If you are running the pi from a good power supply and don't mind taking a soldering iron to it, then bridging input positive power to USB will do the trick. I've never done it to one of the newer pi's but used to do it to rpi1b's like so:

They had no problems powering anything I threw at them after doing that mod (including 2 portable HDD's at the same time).

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.
Well I just had quite an interesting time setting up my raspberry pi with arch linux - somehow when setting up the partitions and filesystems (which you do manually as there's no img file for arch linux) I managed to set permission flags on the root folder to 700 - meaning only root could access the filesystem at all.

I didn't know root itself even had permissions (it makes sense though I guess) and it was a real prick because you don't really get to see the permission flags on it (not when it's mounted to / anyway, unless you use something like stat). It sure made for some interesting problems too because you could still login as root but anything that ran things as non-root users was broken (mostly networking stuff - which I actually mostly worked around before finding the problem because I wanted to remove all network-managers anyway, as they'd get in the way of what I'm using it for).

What finally made me realise something was wrong was when I got to the point that I wanted to run as a normal user, and couldn't login because the user had no access to /bin/bash - still took ages to figure it out after that point (and google was no help because there's a lot of other ways to get that error).

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.

Inept posted:

I thought it was more that hardware accelerated video decoding isn't possible in the browser right now. Steam Link works fine on my Pi 3, and it's streaming h264 1080p60 at 30mbps.
I was going to post same thing as I remember playing 60fps h264 on an original rpiB without problems (overclocking the GPU helped a bunch though, and it was still dropping a few frames here and there but did so very gracefully).

doctorfrog posted:

It might be a matter of extra scripting and things other than the stream that come along with opening a browser page in Twitch. If there's a way to isolate the Twitch stream and just play it through VLC or the browser, it might work better.
I'm pretty sure that there's a twitch plugin for xbmc that you can use with openelec on raspberry pi (openelec is very easy to set up so it worth a shot).

Fuzz1111 fucked around with this message at 23:04 on Mar 3, 2019

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.

Klyith posted:

Installing a root cert is what Diversion does, using the tiny pixelserv-tls webserver to send a 1-pixel image back to all ad requests. It speeds up page loads a ton on https sites because the browser isn't just sending blackholed requests over and over.
Hang on a second, I could be wrong but in my observation replying with a 1 pixel image is not much different to not doing so, as long as pi-hole host replies to ad requests with a TCP reset, which can be accomplished with iptables rules like so:
code:
iptables -A INPUT -i eth0 -p tcp -s x.x.x.0/24 --dport 80 -j REJECT --reject-with tcp-reset
iptables -A INPUT -i eth0 -p tcp -s x.x.x.0/24 --dport 443 -j REJECT --reject-with tcp-reset
The reason I did it this way (and why there's the -s x.x.x.0 qualifiers which should be changed to specify subnet of your LAN) is because the same device also serves up http and https traffic to external connections. I could have had lighttpd host the 1 pixel image server on an unused port, and used iptables to redirect
local port 80 traffic to that port, but when I compared browser performance I saw no meaningful difference to just doing a TCP reset.

I do know that other types of responses (eg: just ignoring the packets entirely) definitely can slow things down because the browser keeps retrying connection, but TCP reset seemed to prevent that behaviour.

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.

Klyith posted:

I'm not a networks person so I couldn't tell you why they did it like that [......] Maybe some ads served by javascript might start looping requests when they got a connection reset. (that is a guess completely pulled out of my rear end)
I guess it might be faster if there's some latency between you and pi hole because browser will cache the 1px image response for (some) requests.

It being there for anti-adblock is another possibility, though in practice I haven't had an issue with pi-hole even on sites that I know will detect and whinge about u-block (also, any anti-adblock scripts that can be triggered by failure to load the ad, would also trigger anytime that happened because of connectivity issues - browser adblock actually replaces content in the page so it's a lot easier to detect without false-positives).

doctorfrog posted:

I’d credit trying to get a Pi to do a thing with giving me some basic Linux training...
I remember someone saying once that arch-linux can be good for training you to use Linux, and they are sorta right - because you have to set up much of it yourself, you know which components do what, and what will be loving up when something goes wrong (their guides are pretty good too, but it's definitely for advanced users and I would still recommend someone learn the basics on an easy distro before trying it).

For the guy with networking issues, I'd try "systemctl --all" and if any network related services are failing.

Adbot
ADBOT LOVES YOU

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.

Amethyst posted:

Is the pi 3b+ enough to make a little wifi router? Do I need any extra hardware?
If you aren't fussed about having a nice interface and know your way around iptables it is quite capable of maxing out the 100mbps limit of the Ethernet adapter (as long the usb Ethernet adapter you use for your second interface can do it too).

I recently set up a pi3b as a router of sorts - quite a bit more demanding though: it would redirect all internet-bound outgoing traffic through an SSH tunnel going through an http proxy, and to do this involved a combination of cntlm, desproxy, ssh, redsocks and a shitload of iptables rules.

Despite the complexity I noticed that I could hit 100mbps in both directions and ping times through it were single digit too.

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