developer.shyd.de. studying my hobby

8Sep/1337

AVR, Raspberry Pi, VW Beta: VAG CDC Faker

(4 votes, average: 5.00 out of 5)
Loading...

I was tired connecting my cellphone with an old cassette adapter to my VW Golf with an Beta 5 in it. I needed something new, something cool. And here it is, a fully functional interface between the Beta 5 and any device you want to play the music with.

This project raised out of an ebay search: I just wanted to know if there is a solution to get an AUX input on the car radio. Yes there is, even complete mp3 players are available. But that's not what I wanted - at first!

Then I started digging the web for more info about the protocol the radio talks to cd changers.
The idea was to build a tiny thingy that fakes a cd changer and simply enables the AUX input (as it is available in several online stores). But during the development my ambition became greater and I wanted to read the keys pressed on the radio to remote control my RPi.

1. Understanding the Protocol

First of all this is the pinout of the radio: rkieslinger.de/steckerbelegungen/vag-stecker.htm
The interesting cell is no. 3, the blue one.
DATA IN simply is MOSI of an 8bit SPI interface with special timings between the bytes
CLOCK is SCK of the SPI
DATA OUT is the key code of the pressed key on the radio itself

The radio needs a sequence of bytes to enable the AUX input and display CD# and TR#. It looks likes this:

frame cd#   tr#   time  time  mode  frame frame
0x34, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x3C

cd# and tr# are sent inverted. So this sequence will display: CD1 TR00
mode sets the playmode (PLAY|SHFFL|SCAN)

14Jun/1317

Dockstar/Goflex: new Kernel 3.9.5 ready to use

(3 votes, average: 5.00 out of 5)
Loading...

It's been one year since I published a compiled kernel for our devices. Now I decided to build a new one and share it!

Some facts about it:

  • As all of my other kernels this one uses heartbeat during boot.
  • It supports the dockstar, goflex net and home.
  • Some of you asked for I2C support, it's now working on the dockstar and goflex net. i2cdetect -l has the desired output!

If you encounter any missing modules for certain devices, try to compile them yourself with the given headers and give me a hint so I can include them in feature releases.

1. Prerequisites

In order to install the kernel properly, you need to have initramfs-tools installed. Otherwise your device won't be able to boot! Thanks to chessplayer for sharing this info!

Make sure you have the latest uboot installed. See 1. in Dockstar: new Kernel 3.3.3 ready to use.

Filed under: Dockstar, Goflex, Hardware, Kernel, Linux | 8,359 views Continue reading
7Jun/131

FTDI: interfacing FT1248/FT220x over SPI

(2 votes, average: 4.50 out of 5)
Loading...

In my current project I want to interface the FT220x over 1-bit SPI with an TI piccolo TMS320F28027.
After some trouble and various cups of coffee I managed the whole thing by implementing the SPI in pure software.

I wasn't able to get it working with the built in tri-wire hardware SPI as the FT uses MIOSIO and MISO to send/receive data and status respectively.

Because there is no sample code available on the web concerning this problem I decided to publish my library here. Take a look into the datasheet for further information!

Sending data over SPI to the FT1248/FT220x is quite easy: Just send a WRITE_REQ (0x00) followed by the payload on MIOSIO.

Reading is a bit more complicated: We need to know how many chars to read. Well, send a READ_REQ (0x02), evaluate MISO and read data on MIOSIO if the FIFO is not empty.

Filed under: C/C++, Hardware, Microcontroller, Software | 5,328 views Continue reading
7Jun/136

Dockstar/Golfex: booting with LABEL or UUID instead of device name

(1 votes, average: 5.00 out of 5)
Loading...

Did you want to reboot your Dockstar or Golfex with multiple drives attached? Well, that's not the problem if uboot lists the devices in the correct order.
But what if your Golfex has SATA drives attached and you want to boot from an usb-drive?

The answer my Goflex gives me all the time: Loading kernel from usb works. Starting the kernel also works. But mounting the filesystem fails, because the device names are remapped when the SATA drives are initialized. The usb-drive ain't /dev/sda anymore...

I (have) had one rule since I had to drive more than 100 kilometers to fix that: never reboot remotely with SATA attached.

The solution is quite simple:
We have to tell the kernel properly where to get the rootfs from to mount it. To be versatile, uboot is configured to boot the kernel with device names as parameter, such as /dev/sda1. But I know what I am doing and want to boot from one single device, no matter if other drives are attached or not, which could mess the device names. So the disk LABEL or the Universally Unique Identifier (UUID) is what we need.
You might say: Ha! I adapt fstab. But this doesn't do the trick.

We need to alter the uboot bootargs. You have to decide which method is more suitable for your environment.

Filed under: Dockstar, Goflex, Hardware, Linux | 10,670 views Continue reading
1Jul/127

Raspberry Pi: Setup Debian with SanDisk Extreme

(2 votes, average: 3.50 out of 5)
Loading...

Finally my RPi has been delivered! After unboxing it I really couldn't image that is was that tiny. First thing I did, was grabbing my 8GB SanDisk SD-Card and copying the rootfs debian6-19-04-2012 onto it.

After plugging the sd card in the RPi and connecting power supply the problems came up...

This article is not a detailed guide how to set up your RPi. It just describes my second afford to get the RPi booting flawlessly in a few words I can refer to in the future.

Problems I had

  • device didn't boot at all
  • no serial output on the GPIOs
  • login failures with definitely correct password
  • mouse/keyboard stopped working after startx
Filed under: Hardware, Raspberry Pi | 11,073 views Continue reading
26Apr/1233

Dockstar: new Kernel 3.3.3 ready to use

(4 votes, average: 5.00 out of 5)
Loading...

As you may have noticed, we were discussing things about newer kernels and drivers in the comments of Dockstar/Goflex: new Kernel 3.1.10 ready to use. With that in mind I started up my VM and looked at what I've got there in /usr/src - there was a compiled 3.2.1 that initially wouldn't boot. But following davy's guide to upgrade U-Boot makes that one boot.

Taking a look at kernel.org made me jealous... Here it is - a fully working 3.3.3:

Filed under: Dockstar, Hardware, Kernel, Linux | 15,754 views Continue reading
22Jan/1243

Dockstar/Goflex: new Kernel 3.1.10 ready to use

(3 votes, average: 5.00 out of 5)
Loading...

It's now been a while since I installed the 3.1.0-1 kernel from sid and made some testing. But I don't like the LED beeing solid green during boot, I want to see whats going on. Thats why I decided to compile 3.1.10 with heartbeat from this erlier article: Dockstar: new Kernel 2.6.38 ready to use. The config is based on sid's 3.1.0-1, if you want to take a look at it, you will find it here: config-3.1.10-dockstar-shyd_1.2
It supports several devices like wifi, webcam, audio or dvb.

Some of you might ask why I didn't build 3.2.1. I did, but it wouldn't boot.

Filed under: Dockstar, Goflex, Hardware, Kernel, Linux | 21,617 views Continue reading
3Jan/1223

Remote printing: Debian and Google Cloud Print

(8 votes, average: 4.75 out of 5)
Loading...

Have you ever heard of google cloud print? It allows you to add your printers to the cloud and share them. You can print on them from any device supporting this service, even if you are on another network. This sounds pretty cool, I gave it a try and I am really amazed.

None of my printers doesn't support cloud print directly, so I need a google chrome installation to share the printer. But I don't want to have my computer to run when printing remotely. There is a project called Google CloudPrint on Linux which allows you to use this nice service from the command line. At this point the dockstar or the linkstation joines the game.

26Nov/1121

Shairport: Debian as Airtunes Server

(2 votes, average: 5.00 out of 5)
Loading...

Recently some friends and me were talking about streaming music from iTunes to my dockstar with an usb sound device connected.
I knew there is a solution, so I started some research an found shairport at mafipulation.org. The project looks quite interesting and I tried to set everything up that I am able to play my music remotely.

First there are some dependencies you need to install:

Now all you need to do is download the sources, make and install them:
Get the sources at github.com/albertz/shairport/downloads.

1Aug/11114

miniDLNA: Dockstar as DLNA-Server v1.1.4

(20 votes, average: 4.80 out of 5)
Loading...

Today I noticed there is a new version of miniDLNA available. When the build process was running I decided to make a deb-file that you guys don't have to compile the sources yourself.

Some people don't want to install the build-environment or sources of dependencies, that's two of the reasons why I put the files together into an installable deb-file, there you go: (Look at the updates below for feature versions!)

Now edit the config in /etc/minidlna.conf and start the service:

If everything works fine, the server should show up on your dlna-clients.

If your kernel supports inotify (my 3.1.10 does) and you want miniDLNA to use it, check if the device is present:

If it's not created automatically by udev, you have to do it manually:

After you restarted miniDLNA you should instantly see directorychanges on your clients.

Update 12.09.2011: v1.0.22

I just compiled the new version and packed it to a new deb file. To update just install it:

In the version tag I added a version number lower than sid to avoid problems during system upgrade, thanks to fear_factory84!

Update 28.01.2012: v1.0.23

Today I found some time to build the new version into a deb-file. There you go:

Update 21.02.2012: v1.0.24

Just build the new version into a deb-file. There you go:

Update 24.07.2012: v1.0.25

Just build the new version into a deb-file. There you go:

Update 18.06.2013: v1.0.26

Just build the new version into a deb-file.
Because of a dependency change, you need to update libavformat. It isn't part of the debian repo, so we need deb-multimedia. Follow the intructions on deb-multimedia.org how to include it in your sources.list!
Then install my .deb and update the deps:

Update 09.03.2014: v1.1.2

Just build the new version into a deb-file.
Maybe you need to remove older versions of minidlna, because the developer changed its path from /usr/sbin to /usr/local/sbin.
Backup your current config and install my .deb:

Update 06.09.2014: v1.1.4

Just build the new version into a deb-file.
Backup your current config and install my .deb:

Filed under: Dockstar, Goflex, Hardware, Linkstation, Linux, Raspberry Pi | 124,904 views 114 Comments