ARM-Based NAS Is A Low Cost, Low Power Beauty

A NAS is always a handy addition to a home network, but they can be a little pricey. [Blake Burkhart] decided to create his own, prioritising budget and low power considerations, with a secondary objective to produce some router and IoT functionality on the side.

A Banana Pi R2 was a good choice to meet these requirements, being a router-based development board that also sports dual SATA connectors and gigabit Ethernet. [Blake] had some retrospective regrets about the performance of this particular SBC, but it does just fine when functioning purely as a NAS.

The enclosure for the device is a three bay hot-swap HDD module, with one of the bays gutted and used for the Banana Pi. It’s a simple idea, elegantly executed, which looks great. To access the ports of the Banana Pi, a custom acrylic side panel was laser cut, which also allowed LEDs to shine through – obligatory for any DIY server/computer build. When mounting this panel to the existing enclosure, [Blake] was reluctant to take his chances tapping the brittle acrylic, instead opting to melt the threads into the plastic with a pre-torched screw. We find that tapping acrylic is usually okay if you take it slow, but heat-tapping does sound fun.

The 12 V fan that came built into the hot-swap enclosure was too loud and awkwardly came in a non-standard size with a non-standard connector. What’s more, a buzzer alarm was triggered any time the fan was disconnected and 0 RPM was detected. [Blake]’s solution was to rewire the power pin of the connector to a 5 V rail; he found that running the fan at 5 V led to much quieter performance whilst keeping the HDDs sufficiently cool.

We find that when it comes to DIY network gear and routers, there are two approaches. Either create your own bespoke solution that perfectly fits your needs, like this perfect home router, or work around your current gear and build some tech to automatically reboot it for you.

 

FOSSCON 2018: Developing The FreedomBox

The modern Internet can be a dangerous place, especially for those who might not have the technical wherewithal to navigate its pitfalls. Whether it’s malware delivered to your browser through a “drive-by” or online services selling your data to the highest bidder, its gotten a lot harder over the last decade or so to use the Internet as an effective means of communication and information gathering without putting yourself at risk.

But those are just the passive threats that we all have to contend with. What if you’re being actively targeted? Perhaps your government has shut down access to the Internet, or the authorities are looking to prevent you from organizing peaceful protests. What if you’re personal information is worth enough to some entity that they’ll subpoena it from your service providers?

It’s precisely for these sort of situations that the FreedomBox was developed. As demonstrated by Danny Haidar at FOSSCON 2018 in Philadelphia, the FreedomBox promises to help anyone deploy a secure and anonymous Internet access point in minutes with minimal user interaction.

It’s a concept privacy advocates have been talking about for years, but with the relatively recent advent of low-cost ARM Linux boards, may finally be practical enough to go mainstream. While there’s still work to be done, the project is already being used to provide Internet gateways in rural India.

Continue reading “FOSSCON 2018: Developing The FreedomBox”

$99 Pinebook Gets KDE Neon Port

If you’re the kind of person who likes small and cheap Linux devices, you’re definitely alive in the perfect moment in history. It seems as if every few months we’ve got another tiny Linux board competing for our pocket change, all desperate to try to dethrone the Raspberry Pi which has already set the price bar exceptionally high (or low, as the case may be). We’ve even started to see these Linux boards work their way into appropriately cheap laptops, though so far none have really made that great of an impression.

But thanks to the efforts of Blue Systems and Pine64, the situation might be improving: they’ve worked together on a build of KDE Neon for the $99 Pinebook. The fact that they’ve gotten Plasma, KDE’s modern desktop environment, running on the rather mediocre hardware at all is an accomplishment by itself. But they’ve also set out tailor the entire system for the Pinebook, from the kernel and graphics drivers all the way up to Qt and Plasma tweaks.

In a blog post announcing the release candidate of the OS, Neon developer [Jonathan Riddell] says that these top-to-bottom improvements show that you can turn a super cheap Linux laptop into a practical computer if you’re willing to really get in there and optimize it. He also says the project has been something of a two-way street, in that improvements made for the Pinebook build have also been applied to upstream development.

The last time we looked at the Pinebook, we came away cautiously optimistic. It wasn’t great, but it was about as good as you could possibly expect given the price. If more developers are willing to go out on a limb and start optimizing their software for the device, it might become a very promising platform for low-cost mobile hacking.

ARM Programming With Bare C

We confess. When starting a microcontroller project, we often start with the last one we did for that environment, copy it, and just make changes. And the first one? It — ahem — might have been found on the Internet. There’s a lot more than just your code that goes into this. If you want  to do (and understand) absolutely everything yourself on an ARM development project, you could use an all-in-one walkthrough. It just so happens [Jacob Mossberg] has a from scratch guide of what you need to do to get your C code running on ARM.

Starting with an ARM Cortex M3, he writes a simple C program and gets the assembly language equivalent. What follows is a detailed analysis of the machine code, exploring what the compiler assumed would be set up. This leads to understanding of what the start up code and linker script needs to look like.

It is a great approach and reminded us of the old saying about “teach someone how to fish.” He even devotes a little time to talking about getting debugging working with OCD. Of course, the exact details are specific to the chip he’s using, but most of it would apply to any ARM chip. Even if you don’t use ARM, though, the thought process and methodology is itself quite interesting.

This post would be just the thing if you are using Blue Pills and ready to move away from the Arduino ecosystem. Of course, if you want to veer away from the Arduino system, but don’t want to go all the way to bare metal, there’s always mBed.

PTPM Energy Scavenger Aims For Maintenance-Free Sensor Nodes

[Mile]’s PTPM Energy Scavenger takes the scavenging idea seriously and is designed to gather not only solar power but also energy from temperature differentials, vibrations, and magnetic induction. The idea is to make wireless sensor nodes that can be self-powered and require minimal maintenance. There’s more to the idea than simply doing away with batteries; if the devices are rugged and don’t need maintenance, they can be installed in locations that would otherwise be impractical or awkward. [Mile] says that goal is to reduce the most costly part of any supply chain: human labor.

The prototype is working well with solar energy and supercapacitors for energy storage, but [Mile] sees potential in harvesting other sources, such as piezoelectric energy by mounting the units to active machinery. With a selectable output voltage, optional battery for longer-term storage, and a reference design complete with enclosure, the PPTM Energy Scavenger aims to provide a robust power solution for wireless sensor platforms.

CortexProg Is A Real ARM-Twister

We’ve got a small box of microcontroller programmers on our desktop. AVR, PIC, and ARM, or at least the STMicro version of ARM. Why? Some program faster, some debug better, some have nicer cables, and others, well, we’re just sentimental about. Don’t judge.

[Dmitry Grinberg], on the other hand, is searching for the One Ring. Or at least the One Ring for ARM microcontrollers. You see, while all ARM chips have the same core, and thus the same SWD debugging interface, they all write to flash differently. So if you do ARM development with offerings from different chip vendors, you need to have a box full of programmers or shell out for an expensive J-Link. Until now.

[Dmitry] keeps his options open by loading up the flash-specific portion of the code as a plugin, which lets the programmer figure out what chip it’s dealing with and then lookup the appropriate block size and flash memory procedures. One Ring. He also implements a fast printf-style debugging aid that he calls “ZeroWire Trace” that we’d like to hear more about. Programming and debugging are scriptable in Lua, and it can do batch programming based on reading chip IDs.

You can build your own CortexProg from an ATtiny85, two diodes, and two current-limiting resistors: the standard V-USB setup. The downside of the DIY? Slow upload speed, but at least it’ll get you going. He’s also developed a number of fancier versions that improve on this. Version four of the hardware is just now up on Kickstarter, if you’re interested.

If you’re just using one vendor’s chips or don’t mind having a drawer full of programmers, you might also look into the Black Magic Probe. It embeds a GDB server in the debugger itself, which is both a cool trick and the reason that you have to re-flash the programmer to work with a different vendor’s chips. Since the BMP firmware is open, you can make your own for the cost of a sacrificial ST-Link clone, about $4.

On the other hand, if you want a programmer that works across chip families, is scriptable, and can do batch uploads, CortexProg looks like a caviar programmer on a fish-bait budget. We’re going to try one out soon.

Oh and if you think [Dmitry Grinberg] sounds familiar, you might like his sweet Dreamcast VRU hack, his investigations into the Cypress PSOCs, or his epic AVR-based Linux machine.

Hackaday Links Column Banner

Hackaday Links: July 15, 2018

Have you tried Altium CircuitMaker? Uh, you probably shouldn’t. [Dave] of EEVBlog fame informs us via a reliable source that CircuitMaker is intentionally crippled by adding a random sleep on high pad-count boards. The hilarious pseudocode suggested on the forum is if ((time.secs % 3) == 0) delayMicroseconds(padCount * ((rand() % 20) + 1));.Now, this is a rumor, however, I would assume [Dave] has a few back channels to Altium. Also, this assertation is supported by the documentation for CircuitStudio, which says, “While there are no ‘hard limits’ per se, the software has been engineered to make it impractical for use with large designs. To this end, the PCB Editor will start to exibit [sic] performance degradation when editing designs containing 5000 pads”. Chalk this up to another win for Fritzing; Fritzing will not slow down your computer on purpose.

Here’s an open challenge to everyone. As reported by [SexyCyborg], XYZPrinting (makers of the da Vinci printer) are patent trolling. This US patent is being used to take 3D printers off of the Amazon marketplace. Here’s the problem: no one can figure out what this patent is actually claiming. There’s something about multiple nozzles, and it might be about reducing nozzle travel, but I’m getting a ‘snap to bed’ vibe from this thing. Experts in 3D printing have no idea what this patent is claiming. The printer in question is the Ender 3, one of the first (actually the third…) China-based Open Source Hardware certified products, and it’s actually the best selling printer on Amazon at this time. I’m talking with Comgrow (the sellers of the Ender 3 on Amazon), and the entire situation is a mess. Look for an update soon.

Tired: Congress shall make no law… abridging the freedom of speech. Wired: But what if that speech is a gun? Wired‘s own Andy Greenberg advances the argument that computer code is not speech, contrary to many court rulings over the past 30 years (see Bernstein v. United States). Here’s the EFF’s amicus brief from the case. Read it. Understand it. Here’s a glowing Stephen Levy piece from 1994 on the export-controlled PGP for reference.

Like integrated circuits and microprocessors? Sure you do. Like drama? Oh boy have we got the thing for you. A week or so ago, ARM launched a website called RISC-V Basics (now unavailable, even from the Internet Archive, but you can try it here). It purports to settle the record on those new chips based on the capital-O Open RISC-V instruction set. In reality, it’s a lot of Fear, Uncertainty, and Doubt. This was an attempt by ARM Holdings to kneecap the upstart RISC-V architecture, but a lot of ARM engineers didn’t like it.