Installation Issues (old driver)

Forums:

Post here for queries regarding setup problems with the old driver based installation.

We recommend you use the new driver free installation, it is easier to setup and allows more colour options from your LedBorg.

We also recommend you try using the troubleshooting instructions here first if you have not already.

Please try to list as much about the problem as you can (OS distribution, versions et cetera), the more we know the easier it is to help :)

Note this post is now long and has more than one page, he most recent answers will be on later pages

Have a Rev 2 board, and installed the Auto Rev2 download.

On running from the desktop icon, I get the Colour Picker window, but any choice gives:-

Unable to create file "/dev/ledborg"

Any ideas please?

piborg's picture

The file /dev/ledborg is how the driver exposes itself, it sounds like the driver is not actually installed.

  1. What distribution are you running?
  2. What version are you running? (type uname -a into a terminal to find out)
  3. If you enter the following into a terminal what output do you get:
    cd ~/ledborg-setup
    ls -l
  4. Finally did you get any errors when you used ./install

Thanks for reply...........

Linux raspberrypi 3.1.9+ #272 PREEMPT Tue Aug 7 22:51:44 BST 2012 armv6l GNU/Linux

total 34068
-rw-r--r-- 1 pi pi 932 Nov 15 11:21 install.sh
-rw-r--r-- 1 pi pi 210 Nov 14 17:09 ledborg.desktop
-rw-r--r-- 1 pi pi 27825087 Nov 14 17:08 ledborg_gui
-rw-r--r-- 1 pi pi 21174 Nov 14 17:00 ledborg_gui.ico
-rw-r--r-- 1 pi pi 10837 Nov 14 16:56 ledborg.ko
-rw-r--r-- 1 pi pi 747 Nov 15 08:35 ledborg-service.sh
-rw-r--r-- 1 pi pi 7008177 Nov 24 13:22 setup.zip

piborg's picture

You appear to have downloaded the Rev 1 board installer (ledborg.ko is listed as Nov 14), I think you mentioned you have a Rev 2 board.

First remove the existing download:
cd ~
rm -rf ~/ledborg-setup

Then follow the install process for Rev 2, 2012-08-16 or 3.1.9+:
mkdir ~/ledborg-setup
cd ~/ledborg-setup
wget -O setup.zip http://www.piborg.org/downloads/ledborg/raspbian-2012-08-16-rev2.zip
unzip setup.zip
chmod +x install.sh
./install.sh

Hopefully the green LED will come on after the install line

Thanks, yes, you are right, sorry but I had been playing with other versions trying to get something (anything!) working after the Rev 2 3.1.9 version install didn't work! Have now killed everything (again), loaded the right version for the hardware, and still not working.

SO, Killed that again, re-downloaded and installed it AGAIN, and this time it worked........so sorted, thanks.

Now to work out how to get it operating from Scratch so kids can play with it..............

piborg's picture

Glad to hear you got it all going fine in the end, shame it seemed to take so much effort.

Posts moved into a new thread for installation issues to make installation help easier to find for others

It is strange, because other two leds are working, but green is not.
I am using Raspbian 3.6.11+ with a raspberry pi model B (with ethernet).
Hi,
I have made all steps on installation, and there was no problem.
But in the moment of trying to change colours, all colours that needs the green led to compose the colour are afected of a lack of green, Green colour is not working.
I know a little bit of electronics, could you tell me what voltage in what pin would be normal?
I bought the ledborg at modmypi
Thanks

piborg's picture

The model B comes in two variants, a Rev 1 and a Rev 2.
Unfortunately the pin used by the green LED was changed between the two versions.
If you back to the installation page http://piborg.org/ledborg/install and scroll down you should see an image showing how to tell if your board is a Rev 1 or a Rev 2.

The pin in question is GPIO 21 or 27 depending on revision, pin 13 on the header.
The voltage when on should be ~3.3v, when off 0v.

The most likely explanation is that the wrong revision code was installed, since the software must match the board revision.

sorry,
just my mistake, you were so right.
I was navigating with my rapsberry all the time to download the installer, so I'v experimented some lag on the picture and did not realize that was downloading rev1!!!!
How do I uninstall the old version?

piborg's picture

No need to apologise :)

You can quite happily just install the correct version over the top, it will replace all of the old versions files.

The LEDs are only coming on when I touch the board. This is true, but to a lesser extent, with non-conducting items. Any idea that the problem is?

I have seen red, green and blue LEDs come on, but doesn't corespond to programs colours.

Stuart

piborg's picture

The reason this is happening is that the GPIO pins on the Raspberry Pi are tri-stated.
What this means is that the pins are neither high (3.3v) or low (0v) but are effectively disconnected.
When you apply a material which is even slightly conductive or charged across the GPIO pins, you have a possibility of making a voltage level approximating a high signal on one or more of the pins which are connected to the buffers, which then turn the LEDs on.

As for the reason behind this, it sounds like the software is either not installed, or not running properly.
Could you enter the following into a terminal window and post the results:
cat /dev/ledborg

Thanks, a reinstall fixed it.

I thinks the installation of Real Time Clock software had changed the kernel image causing the installation of the kernel module to fail.

Stuart

piborg's picture

Glad to hear you got it working.

If your Real Time Clock software provides the kernel headers it was built with, you could try building the LedBorg source and get both running if you wanted.

I had the LedBorg plugged into my RasPi Model A, with kernel 3.6.11+, but could not get the light working. I plugged it into my Rev 1 RasPi B with the same SD card, loaded the Rev 1 installation and it worked right away.

I think the Rev2 3.6.11+ install is not compatible with the RasPi Model A.

piborg's picture

Unfortunately we do not have a Model A to test with, but according to eLinux the Model A and the Model B Rev 2 should be the same in terms of the GPIO header, so this is puzzling.

The Rev 1 and Rev 2 installations are not compatible with each other, the Green LED is connected to GPIO 21, which became GPIO 27 in the Rev 2 boards.

Could you try installing the Rev 2 3.6.11+ version, if that does not work then restart the Raspberry Pi, open a terminal, run the following:
uname -a > ~/dmesg.txt
dmesg >> ~/dmesg.txt
and reply with the dmesg.txt file attached.

Hello. Just got my LedBorg today and cannot get the module to load i get invalid module format. I have built the kernel headers using this guide http://mchr3k-arduino.blogspot.co.uk/2012/05/raspberry-pi-progress.html but instead of doing a git clone i copied the sources i used to build the running kernel. when i make the module it builds fine but complains about a missing Module.symvers could this be the problem. how do i generate/obtain this file? My kernel version in 3.6.11-g-g470f0a7. i built a kernel so that it would have built in reiserfs support. What am i missing.

Alrgith got it working. In following the guide i mentioned it removed Module.symvers. I copied the kernel source over again and ran only make modules_prepare then ran make in the driver folder and everything works now (-: altho the init script does not start at boot but i can start it with /etc/init.d/ledborg start (i renamed the script to just ledborg) still investigating this...

EDIT: got it again. had to modify the initscript to work with openrc. The resulting init script is:

#!/sbin/runscript
### BEGIN INIT INFO
# Provides:          ledborg
# Required-Start:
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Load LedBorg driver
# Description:       Load LedBorg driver, providing /dev/ledborg
### END INIT INFO

DRIVERPATH=/root/ledborg.ko
COLOURPATH=/root/ledborg_bootcolour

start(){
		#echo 'Loading ledborg driver'
		insmod $DRIVERPATH
		cat $COLOURPATH > /dev/ledborg
}
stop(){
		#echo 'Unloading ledborg driver'
		rmmod $DRIVERPATH
}
piborg's picture

Glad to hear you got it all working, and thank-you for sharing the start-up script for openrc :)

Hi,

I have a raspberrypi running arch linux.

The provided driver would not work so I installed from source.

There were no errors. I can write to /dev/ledborg.

There is nothing coming from the LED.

Thanks.

piborg's picture

Hi Patrick,

It seems odd that you cannot get the LED to work at all, have you tried setting the LED to white:
echo "222" > /dev/ledborg
are any error messages shown at all?

What we did to build the driver module from a clean install was:
pacman -Sy
pacman -S make
pacman -S gcc
pacman -S unzip
mkdir ~/ledborg-source
cd ~/ledborg-source
wget -O source.zip http://www.piborg.org/downloads/ledborg/source-rev2.zip
unzip source.zip
cd driver
make
insmod ledborg.ko
echo "222" > /dev/ledborg

After using insmod ledborg.ko you should be able to call dmesg and see a couple of lines from the LedBorg driver, one talking about the interval, and another saying it is ready to use and the maximum channel value (normally 2).
If you have already loaded LedBorg drivers, you may need to use rmmod ledborg first to stop the previous load running before using insmod ledborg.ko.

We have just put up a new build for the latest download on the Raspberry Pi site (2013-06-06 or 3.6.11-11ARCH+), if that is the version you need you can find the standard download package here.

If none of that works, try the BashLed monday script as follows:
rmmod ledborg
cd ~
wget -O BashLed.sh http://www.piborg.org/downloads/BashLed.txt
chmod +x BashLed.sh
./BashLed.sh 222
it should use the built-in GPIO drivers only (in /sys/class/gpio) to set the LedBorg white, this should confirm if the LedBorg is functioning properly.

Thanks.

I rebooted the raspberrypi and plugged in a different LedBorg. The light works fine.

I'll try the other LedBorg again. Maybe it just needed a reboot.

Hi,

I have a usb wifi device.

When the wifi is plugged in the ledborg does not work at all. Only when I unplug the device from the raspberrypi does it work as suggested.

Is there anything I can do? Running a network cable to this device is not practical.

Thanks.

GeekyTim's picture

Sounds like the Pi is not getting enough power for both. Either try a better power supply, or run the WiFi from a powered USB Hub.

Tim

installed via rpi-update

Linux version 3.6.11+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #538 PREEMPT Fri Aug 30 20:42:08 BST 2013

downgrading to latest official raspbian kernel makes it work again...

piborg's picture

Hi Mahtiaivo,

Unfortunately the people working on Raspbian have made life difficult by not providing the kernel headers as part of the installation.

See the below post for a custom build for 3.6.11+ #538, plus detailed instructions on performing a custom build manually.
For more information see the manual LedBorg driver build instructions forum posts where these instructions were generated.

piborg's picture

Hi Mahtiaivo,

I have just run through the instructions previously provided and build a driver load for Raspbian 3.6.11+ #538 without any problems, the zip with the installation using this driver (for Rev 2 boards) is attached to this post.

For reference both for yourself and others, this is how the new driver binary was built from a clean copy of Raspbian after performing a sudo rpi-update command:

The first thing you will need to build is to have the kernel headers to build the driver with.
The following lines will download and run a script which attempts to download the latest kernel source (hopefully the same version as your copy).

cd ~
wget -O get-kernel-source.sh http://piborg.org/downloads/get-kernel-source.txt
chmod +x get-kernel-source.sh
sudo ./get-kernel-source.sh

You can view the script here.

Assuming that was successful then you will need to download the source for LedBorg.

mkdir ~/ledborg-source
cd ~/ledborg-source
wget -O source.zip http://www.piborg.org/downloads/ledborg/source-rev2.zip
unzip source.zip

Finally we need to build the driver code and install the files (we will use the pre-built GUI).

cd ~/ledborg-source/driver
make
cd ..
cp gui/ledborg_gui ./
chmod +x install.sh
./install.sh

wow, thanks a lot for all the trouble, and sorry for my lazyness ;)

piborg's picture

Glad to help

Hi,

every once in a while, after a rpi-update, ledborg doesn't work anymore.
Normally I wait until a installation zip is provided on this website.

Since upgrading to 3.10.22+ #600 I wanted to shortcut the waiting time for the official driver and tried to build my own (according to your instructions). This worked well in the past, but now the built module freezes the Pi.

So my questions:
1) will there be an official driver release for 3.10.X ?
2) can you please provide a more or less "foolproof" instruction to build the driver/ kernel module?

Thank you and Best regards,
Armin

piborg's picture

The trouble is they have not made the kernel headers available in the same way they are on standard distributions of Linux, making the driver build awkward.
Since the kernel version has moved from 3.6.X to 3.10.X the get-kernel-source.sh script needs a slight change.
You need to change line 5 from:
wget -O rpi-`uname -r`.tar.gz https://github.com/raspberrypi/linux/tarball/rpi-3.6.y
to
wget -O rpi-`uname -r`.tar.gz https://github.com/raspberrypi/linux/tarball/rpi-3.10.y
then re-run the build instructions starting from
sudo ./get-kernel-source.sh

The reason the script does not do this itself is that they have changed the branch naming convention before, for example with 3.2.27 the branch was called rpi-3.2.27 not rpi-3.2.y.

Hopefully this will be fixed at some point (ideally making the headers available using apt-get), for now we have to put up with these manual changes each time they move branch...

It works now! Thank you very much!

Best Regards,
Armin

piborg's picture

Glad to hear it works now.
I have updated the script at http://piborg.org/downloads/get-kernel-source.txt to assume a branch name with the 3rd part being 'y', e.g. 3.10.y

Hello,

after all these steps I still get
"Error: could not insert module /home/pi/ledborg.ko: Invalid module format"
wth kernel 3.10.38+ (Raspbian, revision 2 board).

piborg's picture

Try running rpi-update and then re-building the driver code (the third section of instructions).

You install and run rpi-update using the following commands:
sudo apt-get install rpi-update
sudo rpi-update
after which you should restart the Raspberry Pi before trying to re-build the driver code.

rpi-update GitHub page

Thanks. After a rpi-update and repeating _all steps_ again it's working now ... damn, bright light :-)

But what I don't understand, whats the difference now, what was the problem with 3.10.38 and the download of its sources?

piborg's picture

The trouble with the Raspbian distribution is that there is no package for apt-get which includes the necessary files to build a driver for the currently running kernel.

To get around this the get-kernel-source.sh script we have written downloads the complete source code for the kernel from the web and uses those files to build a driver.

The issue is the source code is stored in a separate version control system, the kernel version is not clearly labelled against which version of source it was built from in the version control system.

The way we get around this is that the script downloads the latest version of source labelled as 'released', this may not however be the latest copy from downloading an image or even using apt-get upgrade, it may in fact be newer.

What rpi-update does is to download the built versions of the latest released firmware, drivers, and kernel. This will ensure the source the script downloaded and the running kernel do now match.

Hi,

if we have a kernel 3.12.18+, LedBorg is installed and running, and a rpi-updates installs a new kernel (> 3.12.18+), do we have to repeat the above steps to rebuild/reinstall the LedBorg driver?

piborg's picture

Unfortunately you most likely will.

The reason is that the kernel expects all drivers to be for the correct version for certain things.

If you do re-run the instructions you will need to start from the beginning again (there will be new source code available).

If you do this you will probably want to do things in the following order:

  1. Perform the rpi-update
  2. Reboot the Raspberry Pi
  3. Check if the LedBorg still works (if it does you can stop here ^_^)
  4. Remove the old downloaded source using:
    cd /usr/src
    rm rpi-*.tar.gz
  5. Re-run the download kernel source script:
    cd ~
    sudo ./get-kernel-source.sh
  6. Re-run the build:
    cd ~/ledborg-source/driver
    make
    cd ..
    ./install.sh

That should get you to the latest copy with a working LedBorg.

Hi,

I used the script you provided. It ran without any errors.
Unfortunately installing (either insmod or copying it into /lib/modules/etc && depmod -a) gives me the following kernel message (dmesg):
ledborg: disagrees about version of symbol module_layout
All help is appreciated of course.

piborg's picture

Hi,

The message states that the headers / symbol table used to build the kernel and the LedBorg driver do not match.
Could you tell us what uname -a returns?

Since you have used depmod already you could try forcing the module to load:
modprobe -f ledborg
Note however that using modprobe with force (-f) is seen as dangerous, the reason it refuses to try and load is that it cannot be sure if the driver will try and do something wrong!

I'm sorry for bothering, but I get this error after running the script:

make[1]: Entering directory `/lib/modules/3.10.24+/build'
make[1]: *** No rule to make target `modules'. Stop.

The kernel version is right. Do you have an idea which step i'm missing?

piborg's picture

It sounds like you do not have the Kernel source downloaded, have you tried running our script:

cd ~
wget -O get-kernel-source.sh http://piborg.org/downloads/get-kernel-source.txt
chmod +x get-kernel-source.sh
sudo ./get-kernel-source.sh

If you have done that already could you post the result of running the following lines:

cd /lib/modules/3.10.24+/build
ls -l

/lib/modules/3.10.24+/build# ls
raspberrypi-linux-ff9f6d8

That folder is what the script made and contains:

root@lemon:/lib/modules/3.10.24+/build/raspberrypi-linux-ff9f6d8# ls -ltr
total 1028
drwxrwxr-x   3 root root   4096 Dec 12 13:35 virt
drwxrwxr-x   2 root root   4096 Dec 12 13:35 usr
drwxrwxr-x  17 root root   4096 Dec 12 13:35 tools
drwxrwxr-x  22 root root   4096 Dec 12 13:35 sound
drwxrwxr-x   9 root root   4096 Dec 12 13:35 security
drwxrwxr-x  12 root root   4096 Dec 12 13:35 samples
-rw-rw-r--   1 root root   7485 Dec 12 13:35 REPORTING-BUGS
-rw-rw-r--   1 root root  18736 Dec 12 13:35 README
drwxrwxr-x  55 root root   4096 Dec 12 13:35 net
drwxrwxr-x   2 root root   4096 Dec 12 13:35 mm
-rw-rw-r--   1 root root  48417 Dec 12 13:35 Makefile
-rw-rw-r--   1 root root 255053 Dec 12 13:35 MAINTAINERS
drwxrwxr-x   9 root root   4096 Dec 12 13:35 lib
-rw-rw-r--   1 root root    252 Dec 12 13:35 Kconfig
-rw-rw-r--   1 root root   2536 Dec 12 13:35 Kbuild
drwxrwxr-x   2 root root   4096 Dec 12 13:35 ipc
drwxrwxr-x   2 root root   4096 Dec 12 13:35 init
drwxrwxr-x  73 root root   4096 Dec 12 13:35 fs
drwxrwxr-x  36 root root   4096 Dec 12 13:35 firmware
drwxrwxr-x 112 root root   4096 Dec 12 13:35 drivers
drwxrwxr-x 100 root root  12288 Dec 12 13:35 Documentation
drwxrwxr-x   4 root root   4096 Dec 12 13:35 crypto
-rw-rw-r--   1 root root  95317 Dec 12 13:35 CREDITS
-rw-rw-r--   1 root root  18693 Dec 12 13:35 COPYING
drwxrwxr-x   3 root root   4096 Dec 12 13:35 block
drwxrwxr-x  32 root root   4096 Dec 12 13:35 arch
drwxrwxr-x  28 root root   4096 Dec 18 16:53 include
drwxrwxr-x  11 root root   4096 Dec 18 16:53 kernel
drwxrwxr-x  13 root root   4096 Dec 18 16:54 scripts
-rw-r--r--   1 root root 492348 Dec 18 16:55 Module.symvers
piborg's picture

It looks like the source has been downloaded to a different folder from expected, you can override the directory used for the kernel source with:
make KERNELDIR='/lib/modules/3.10.24+/build/raspberrypi-linux-ff9f6d8'
from the directory with the LedBorg make file.

Hi Piborg, I'm sorry for not responding earlier. My ledborg is now working fine! Thanks for the support and a happy new year to all.

piborg's picture

Glad to hear you got it to work in the end ^_^

Happy new year everyone.

Hello,

I tried many ways now, downloaded the right Rev2 packages (tried alsoolder ones) and tried lso to compile them manauly. always the same error message :( Could you help me to bring my LEDBorg up and running again. I used it already without any problems but this war wir a older raspbian firmware.

error massage is:

pi@raspberrypi ~/ledborg-setup $ sudo ./install.sh
Installing LedBorg, please wait...
Error: Module ledborg is not currently loaded
update-rc.d: using dependency based boot sequencing
Error: could not insert module /home/pi/ledborg.ko: Invalid module format
LedBorg installed, LedBorg should now be green

Thank you fpr your help
Andreas

piborg's picture

Hi Andreas,

It sounds like the Kernel version and downloaded source do not match if the custom build completes but the install fails with the "invalid module format" error.

Could you try updating the Raspberry Pi using:

sudo apt-get update
sudo apt-get upgrade

then perform the full set of custom build steps from the start.

It's working now. Great. Thank you very much. you make my day! :)

Pages

Subscribe to Comments for "Installation Issues (old driver)"