How To Build Your Own Dedicated Pandora Radio

This mix of modern and retro acts as a standalone Pandora client. It’s certainly a radio upgrade, falling somewhere in between the passive listening of traditional broadcasts, and the complete control of music players that use playlists.

Inside the wooden case a BeagleBoard does most of the work. It’s running Ubuntu 12.04 on which pianobar, a command line interface package for Pandora is running. Those components alone would make a pretty nice listening experience, but since Pandora rolls different music into the mix it’s nice to be able to see what you’re listening to. The four-line LCD is wide enough to display plenty of information. It’s being controlled by a PIC24 microcontroller which also monitors the controls on the top. As you can see in the video after the break, the user interface offers almost everything you could want. It’s easy to switch stations, and you can still register your preferences on each track being played.

Continue reading “How To Build Your Own Dedicated Pandora Radio”

Programming A Propeller On An ARM

[Stefan] uses a small ARM-powered netbook for his development work, so when he tried to play around with the Parallax Propeller he ran into a few problems. The official tools from Parallax are Windows only, and the available 3rd party dev tools are only compiled for x86. After a lot of futzing about, [Stefan] was able to develop on his ARM netbook and wrote in to tell us how it’s done.

Luckily, Parallax released a GCC port for the Propeller, but unfortunately isn’t completely portable to ARM. The Propeller loader for this architecture ambivalent build uses a little bit of SPIN code, which can only be compiled on Intel machines.

To get around this problem, [Stefan] wrote an installer script to gather all the necessary bits of code to his computer. His ARM/Linux toolchain consists of the Propeller GCC, an open source SPIN compiler, and a Python script used to load code [Stefan] found on the Propeller forums.

Now that [Stefan] has a complete toolchain for programming the Propeller on an ARM device, it’s possible to develop for this very cool multi-core microcontroller on his netbook or even the Raspberry Pi.

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.