NAS-based Transcoding Facilitates Security Cam Viewing On IPhone

[Zitt] has a security camera which will send him messages any time it detects motion. However annoying this might seem, we’re sure he has his reasons for needing this much immediate feedback. The real problem comes when he goes to view the feed on his iPhone. His solution is to turn the camera’s notifications off, and use his own script to transcode a clip and shoot off an email.

As you can see above, the end result is a concise email that includes the recently captured clip, as well as links to the live feed. He has been storing the clips on an LG N4B2 Network Storage Server (NAS) and since he’s got root access to the Linux system on the device it was an easy starting point for the new system. After he compiled FFmpeg from source (which handles the transcoding) he started work on the script which backs up the recordings and sends the email messages.

One thing he wants to add is a method to clear out the old backup videos. Having encountered a similar issue ourselves we decided to share our one-liner which solves the problem. Find it after the break.

Continue reading “NAS-based Transcoding Facilitates Security Cam Viewing On IPhone”

Node.js For Linux Joysticks

[Tim Caswell] has been using gamepads and joysticks to demonstrate his node.js hacks for a long time. The thing is, he has been relying on C++ bindings to handle the hardware while trying to herald the praises of node.js. Why not cut out the middle man and write a joystick driver in node.js? It turns out to be so simple anyone can do it.

Granted, this is not a kernel driver. He’s relying on the Linux kernel to recognize the hardware and provide him with the customary /dev/js0 file which he can then work with. As you can see in the snippet above, he’s looping through code in order to constantly read from the hardware. To get this far he dug through the documentation for joystick packets (yay for open source!) to find that each is made of a 32-bit timestamp, a 16-bit value, and two 8-bit numbers identifying the event type and button or axis.

Once he has the packets, it’s off to the races. Each data type is parsed into an appropriate variable which you can use in the logic of your own program. Don’t be nervous, this will make a great weekend project!

A Tale Of (un)bricking A $10k Microsoft Surface Unit

We’ve all had that sinking feeling as a piece of hardware stops responding and the nasty thought of “did I just brick this thing?” rockets to the front of our minds. [Florian Echtler] recently experienced this in extremis as his hacking on the University of Munich’s Microsoft Surface 2.0 left it unresponsive. He says this is an 8,000 Euro piece of hardware, which translates to around $10,000! Obviously it was his top priority to get the thing working again.

So what’s the first thing you should do if you get your hands on a piece of hardware like this? Try to run Linux on the thing, of course. And [Florian] managed to make that happen pretty easily (there’s a quick proof-of-concept video after the break). He took a Linux kernel drive written for a different purpose and altered it to interface with the MS Surface. After working out a few error message he packaged it and called to good. Some time later the department called him and asked if his Linux kernel work might have anything to do with the display being dead. Yikes.

He dug into the driver and found that a bug may have caused the firmware on the USB interface chip to be overwritten. The big problem being that they don’t just distribute the image for this chip. So he ended up having to dump what was left from the EEPROM and rebuild the header byte by byte.

Continue reading “A Tale Of (un)bricking A $10k Microsoft Surface Unit”

[Sprite_tm] Connects An LCD To A Tiny Linux Board

One of [Sprite_tm]’s colleagues recently challenged him to connect a small LCD touch screen to a Raspberry Pi. Sadly, [Sprite_tm] has yet to take delivery of a Raspberry Pi, but he did manage to connect an LCD to a Linux board without video capabilities.

Because [Sprite_tm]’s display has a 16-bit parallel interface, and 16 GPIO pins are hard to come by on the Carambola Linux board, a few shift registers had to be brought into the build to make the LCD work. These shift registers are connected to the Carambola board via an SPI interface; a very simple way to connect all the LCD pins to the Linux board.

Of course, there’s no way for Linux to speak to the LCD without a kernel driver; [Sprite_tm] wrote a framebuffer driver so the LCD can be used as a console, an X session, or used by any other program that can write to a framebuffer device.

Like all good driver authors, [Sprite_tm] is giving away the patch to enable SPI-ified LCD panels on the Carambola along with the shift register schematic. With any luck we’ll also see the Raspi drivers when [Sprite_tm] takes delivery of his Raspberry Pi.

A Primer On Dynamic Loading

[Graphitemaster] is helping to demystifying the process of tailoring functions for dynamic loading. His tutorial shows how make a dynamic function that prints “Hello World” to the standard output. This is of course rudimentary, but if you have no prior experience with the topic you might be surprised at what actually goes into it.

Normally your compiled code has addresses in it that tell the processor where to go next. The point of dynamic loading is that the code can be put anywhere, and so static addresses simply will not work. The code above shows how a simple printf statement normally compiles. The callq line is a system call that needs to be replaced with something that will play nicely in the registers. [Graphitemaster] takes it slow in showing how to do this. Of course a dynamic function alone isn’t going to be much good. So the tutorial finishes by illustrating how to program a dynamic code loader.

Gooseberry Is The Latest ARM Linux Board

It looks like we’re finally seeing the proliferation of single board computers take off. The latest is called the Gooseberry. While it will cost about £40/$62 USD at release, it greatly outperforms the current crop of tiny Linux boards.

As the latest in what will be a long line of these ARM-ified single board computers, the Gooseberry hugely outperforms the VIA APC and Raspberry Pi with a Allwinner A10 CPU running at 1.2 GHz, 512 MB of RAM, and built-in WiFi. Basically, the Gooseberry has all the features you would expect from an Android tablet; the reason for this is because the Gooseberry actually is the board found in a few Chinese tablets.

There’s a few very nice features like an LVDS output to add LCD displays without hogging the HDMI output, and the form factor is incredibly thin making it perfect for building a small portable device.

After the break you can check out a walkthrough of the Gooseberry board along with evidence of it running Ubuntu.

Continue reading “Gooseberry Is The Latest ARM Linux Board”

Cheap ARM Netbooks Have Linux Forced Upon Them

[Doragasu] got his hands on one of these WM8650 Netbooks for around 50 euros (~$63.50) delivered. They come with a version of Android preinstalled, but he wanted to use them more like a computer and less like an Android device. So he set out to load Arch Linux on the ARM-based Netbook.

This is possible because the hardware inside is actually pretty good. The 800 MHz SoC is accompanied by 256 megs of RAM. There’s 2 gigs of internal storage, a 7″ display, USB, Ethernet, WiFi, and an audio system. This is comparable to what you’d get with a Raspberry Pi (without video acceleration) but also includes all of those peripherals, a case, a touchpad and keyboard… you get the point. There are several patches that need to be applied to the kernel to get it working with the hardware. [Doragasu] covers each of them in the post linked above. You can also hear his presentation in the video after the break.

Continue reading “Cheap ARM Netbooks Have Linux Forced Upon Them”