gkaindl / ambi-tv

a flexible ambilight clone for embedded linux
295 stars 85 forks source link

Invalid Module Format #7

Open SchruteRampage opened 11 years ago

SchruteRampage commented 11 years ago

Hello, I seem to have everything running a built correctly except I am getting one error that I can't figure out.

When I run the 'sudo insmod usbtv.ko' command when I am located in the usbtv folder, I get the error: could not insert module usbtv.ko: invalid module format.

Any ideas?

Mrjohns42 commented 11 years ago

Can you post what you get when you run "lsmod"?

sn00zerman commented 11 years ago

Is there an spidev0.0 in the /dev folder ? Did you try to run it with sudo ambi-tv ?

Best regards, kris

Http://www.digitalplayground.be Where fun meets technology ...

Verstuurd vanaf mijn iPad

Op 24-sep.-2013 om 22:37 heeft Crafu notifications@github.com het volgende geschreven:

Hello everyone, I hope someone can help me, I've followed all the directions above and some of the ones on the other pages and I'm stuck. I've even bought a USB powerhub as a last ditch attempt to try and get it all running but I just can't get past the final hurdle when I try to run the AmbiTV program. Every time I get the following: lpd8806-spidev: failed to open device '/dev/spidev0.0' : 2 (No such file to directory). Main: failed to start initial program 'program_tv_edge_colour', aborting... I've followed Kris's instructions above and got past the issue I was having with the usbtv issue (turns out I had to use an older version o f Raspbian). If anyone can give me any pointers, I'd be really greatful. I can't help but feel I'm so close to getting this working. It's taken 4 days and a lot of late nights to get this far! Thanks in advance, Craig

— Reply to this email directly or view it on GitHub.

Crafu commented 11 years ago

Hi MrJohns & Kris (many thanks Kris, your posts have got me this far!)

I'm staring a rebuild again right now so will update you once I'm back to launching the Ambitv again. When I run lsmod I get the following:

snd_bcm2835 16304 0 snd_pcm 77560 1 snd_bcm2835 snd_seq 53329 0 snd_timer 19998 2 snd_pcm, snd_seq snd_seq_device 6438 1 snd_seq snd 5847 5 snd_bcm2835, snd_timer, snd_pcm, snd_seq, snd_seq_de vice snd_page_alloc 5145 1 snd_pcm leds_gpio 2235 0 led_class 3562 1 leds_gpio evdev 9426 6

Crafu commented 11 years ago

Hi there,

right back up and running again, I've not run the rpi update though I've checked the Dev folder and there's no spidev0.0 in there Have I done something wrong? Missed a step or something? It's been a pretty steep learning curve for the past few days! Could you give me the exact code required in order to install it or copy it to the right location?

Crafu commented 11 years ago

OK last thing - I ran the rpi-update again as Kris did above but I now get a usbtv error on startup And if I enter sudo modprobe usbtv I get: ERROR: could not insert 'usbtv': Exec format error Checked /dev now there's no video.0 or any spidev file in there.

I'm stuck

Mrjohns42 commented 11 years ago

I usually don't run rpi-update. Chances are it changed the kernal code and your usbtv module is now incompatible. Try recompiling the usbtv module. If that doesn't work, you might need a fresh OS install again.

Your lsmod output seems to be missing the module for the spi controller. Try: modprobe spi-bcm2708

You'll need to add that module every time you reboot because it is blacklisted. If you want it to load automatically on boot, comment it out from:

/etc/modprobe.d/raspi-blacklist.conf

Crafu commented 11 years ago

Thanks for the update. Tried to run modprobe spi-bcm2708 But it returns an error. Tried to comment it out but still doesn't show in /dev even when I modify the blacklist conf file. Going to rebuild again tomorrow and not run the update but it'll still come back saying the spi file is missing.

On 25 Sep 2013, at 00:11, Mrjohns42 notifications@github.com wrote:

I usually don't run rpi-update. Chances are it changed the kernal code and your usbtv module is now incompatible. Try recompiling the usbtv module. If that doesn't work, you're might need a fresh install again.

Your lsmod output seems to be missing the module for the spi controller. Try: modprobe spi-bcm2708

You'll need to add that module every time you reboot because it is blacklisted. If you want it to load automatically on boot, comment it out from:

/etc/modprobe.d/raspi-blacklist.conf

— Reply to this email directly or view it on GitHub.

Mrjohns42 commented 11 years ago

Did you reboot after commenting it out of the blacklist file?

hebaishi commented 11 years ago

Just thought I'd make a little contribution here as well. These are the instructions that worked for me (taken from Kris' earlier post). Follow these instructions with a fresh raspbian wheezy, do NOT do apt-get update or rpi-update or anything like that. Obviously your pi needs be connected to the internet for this to work:

Once that's done, you need to enable the spi kernel module. You can follow this guide to do that: http://www.100randomtasks.com/simple-spi-on-raspberry-pi

Then compile and run ambi-tv. What led strip are using? You might need to modify the ambi-tv source code for the hardware protocol for the IC in your led strip, but I can help you with that.

Mrjohns42 commented 11 years ago

This worked for me (also based on Kris's instructions):

hebaishi commented 11 years ago

I like the very last bullet point there. In all honesy though, this really is an amazing project. I managed to get it working about two weeks ago and the effect is truly amazing. I'm considering uploading a video at some point

Mrjohns42 commented 11 years ago

The moment when it all comes together is truly rewarding. Thanks @gkaindl for putting this project up.

Crafu commented 11 years ago

Hi MrJohns,

Many thanks for the instructions. I tried to give them a quick run through before work this morning using a fresh build of 2013-07-26. All looks fine until this line: sudo cp usbtv.ko /lib/modules/3.6.11+/extra/ When I try to run it I get an error saying the file can't be found. Any ideas? Thanks again, Craig

duenorh commented 11 years ago

Do a ls and see if the file exists in the folder. It should be present in ambi-tv-master/misc/usbtv-driver/ folder.

Crafu commented 11 years ago

Can I just check that I'm seeing if the usbtv.ko file is in the folder /ambi-tv/misc/usbtv-drive? If so, I've not checked the most recent build but the previous one's I've done have contained it. I'm at work now but till check as soon as I get back. Thanks again Craig

Crafu commented 11 years ago

It's time to Celebrate! All up and running, I just need to play with the config a little.

Thanks to everyone that helped with this, it's truly been a real learning curve and worth every second. The issue I was having with indeed solved by un blacklisting the spidev file. MrJohns you are a star!

Many many thanks to all once again, I'll post up a video once it's all in place.

Final question, how do I get Ambitv to load automatically when I reboot the Pi?

Mrjohns42 commented 11 years ago

Add the full path to the ambi-tv executable to /etc/rc.local

Crafu commented 11 years ago

Thanks, what's the right command? I'm trying sudo bin/ambi-tv--master --button-gpio 3

duenorh commented 11 years ago

You'll need the full path, like sudo ./home/pi/ambi-tv-master/bin/ambi-tv --button-gpio 3

sn00zerman commented 11 years ago

if you want to add it to your etc/rc.local:

  1. skip the sudo part, rc.local is already run as root.
  2. add the full path to your ambi-tv binary.

so something like: /ambi-tv/source/bin/ambi-tv--master --button-gpio 3

good luck, Kris

-=[http://www.digitalplayground.be]=- where fun meets technology

On 26 sep 2013 08:55 "Crafu" notifications@github.com wrote:

Thanks, what's the right command? I'm trying sudo bin/ambi-tv--master --button-gpio 3

— Reply to this email directly or view it on GitHub https://github.com/gkaindl/ambi-tv/issues/7#issuecomment-25147110.

lukefoster197 commented 10 years ago

Hi Guys,

I'm hoping you can help, Ive been following the instructions by Mrjohns42 and have become stuck on: "Check that video0 is in /dev (if it’s not, STOP, come back here and ask for help)" Video0 is just not there, i am using the easycap with the fushicai UTV007 chip in it. Do i have the correct easy cap? and if so how do i get around this?

Thanks Luke

lukefoster197 commented 10 years ago

I have now manged to to get video0 to appear, but now when i try and run ambi-tv i get this error: v412-grab: failed to start video streaming: 71 (Protocol error).

Any ideas?

Cheers Luke

lukefoster197 commented 10 years ago

All sorted, made a powered usb cable. The capture card wasn't getting enough power, all up and running now.

Mrjohns42 commented 10 years ago

Congrats. Sorry I haven't been active here in a while. For future visitors to this thread, would you mind explaining what you did to get video0 to appear when you got stuck?

kinkerl commented 10 years ago

hi everyone. thanks for this very helpfull thread so far! but, i am currently stuck and was wondering if someone can nudge me in the right direction.

i followed https://github.com/gkaindl/ambi-tv/issues/7#issuecomment-25052979 and i used the correct debian image and everything went smooth. but video0 is not showing.

i wired the dongle to the pi

lsusb

Bus 001 Device 005: ID 1c88:0007 Somagic, Inc. SMI Grabber (EasyCAP DC60+ clone) (no firmware) [SMI-2021CBE]

dmesg

[   84.585144] Linux media interface: v0.10
[   84.595506] Linux video capture interface: v2.00
[   96.255944] usbcore: registered new interface driver usbtv
[  244.007576] usb 1-1.2: USB disconnect, device number 4
[  246.552295] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
[  246.653727] usb 1-1.2: New USB device found, idVendor=1c88, idProduct=0007
[  246.653755] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  246.653771] usb 1-1.2: Product: SM-USB 007
[  246.653785] usb 1-1.2: Manufacturer: Somagic, Inc.
[  246.653799] usb 1-1.2: SerialNumber: SMBL007

lsmod

Module                  Size  Used by
usbtv                   6366  0 
videobuf2_vmalloc       2425  1 usbtv
videobuf2_memops        2584  1 videobuf2_vmalloc
videobuf2_core         26995  1 usbtv
videodev              104342  2 usbtv,videobuf2_core
media                  13424  1 videodev
snd_bcm2835            16304  0 
snd_pcm                77560  1 snd_bcm2835
snd_page_alloc          5145  1 snd_pcm
snd_seq                53329  0 
snd_seq_device          6438  1 snd_seq
snd_timer              19998  2 snd_pcm,snd_seq
snd                    58447  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
leds_gpio               2235  0 
led_class               3562  1 leds_gpio

this looks good right? any idea?!?! thanks!

edit: after further research: everything might be fine on the software side. maybe its the dongle. i try getting a new one and update this post

lukefoster197 commented 10 years ago

Sorry it's taken so long for me to update on this. Its all working now, the video 0 issue was down to the Raspberry Pi not supplying the usb capture card with enough amps.

Used powered usb hub, now works fine and has been running for over a week solid.

kinkerl commented 10 years ago

update from me: i got a new usb dongle and it worked. http://www.amazon.de/gp/product/B0013BXFLG/

this did NOT work http://www.amazon.de/gp/product/B0042EZ596/

T-a-r-a-x commented 10 years ago

@kinkerl: I read your post with the link to the Mumbi on Amazon.de saying it works and bought it. Then you edited your post (I think) saying it didn't work.

I got the Mumbi (http://www.amazon.de/gp/product/B0042EZ596/) to work though... Only problem is that I have to unplug it and plug it in again every time I power up the Pi.

kinkerl commented 10 years ago

@T-a-r-a-x yes i did edit my post because i bought a new dongle after i ran into so much problems with the first one but i dont know if all problems where related to the dongle or if i just screwed up... i think it might be able to work with the first. dont know.

fine if this works for you!

i had the unplug problem as well. this went away with the logilink.

ps: finished everything last week and its working! http://www.youtube.com/watch?v=aCn0admwgWg i am updating the original ambitv software with some patches and a web interface (alpha is working). stay tuned ;)

supercrab commented 10 years ago

@kinkerl Please let me know how your web front end goes! I'd love to try and write a Windows MCE to control it :D

kinkerl commented 10 years ago

uh btw, forgot to mention. the webinterface is for a new "mood" mode/program. this is a solid color and no rainbow animation. this solid color is controllable with the web interface.

more things might be possible but i just suck at c.

look our for updates in https://github.com/kinkerl/goldrausch/tree/ambitv-hack (the branch ambitv-hack, NOT master) this is the frontend. documentation and things will follow. it is working with my fork of ambitv but some tinkering is still required.

supercrab commented 10 years ago

@kinkerl Thanks! I'm .Net developer and I can do basic stuff with C fine. I was planning to write a web socket on a different thread listening for HTTP requests but threading and C might be out of my league! :astonished:

I'll be sure to check it out :+1: :smile_cat:

overbusy commented 10 years ago

Hello, I tried everything exposed on this thread, without success. The main problem is that I can't see /dev/video0. I'm using raspian weezy 2013-07-26, launched get-kernel..., make usbtv from inside the usbtv-driver folder, created 'extra' directory, but I did not get any usbtv.ko to put inside that folder... launched modprobe etc. I followed very accurately the above thread even though I explained here in a very short form. I'm using a Belkin usb hub (with wall adapter after and without before) connected to my raspberry powered from GPIO connector. Video grabber is EasyCAP DC60 fw Fushicai USBTV007etc. I have also a wifi usb key (bought from The Pi Hut) connected on the other usb port and I connect to my Pi via SSH. When I query my Pi with dmesg I get :

[ 257.698335] usb 1-1.2.4: New USB device found, idVendor=1b71, idProduct=3002 [ 257.698360] usb 1-1.2.4: New USB device strings: Mfr=3, Product=4, SerialNumber=2 [ 257.698376] usb 1-1.2.4: Product: usbtv007 [ 257.698391] usb 1-1.2.4: Manufacturer: fushicai [ 257.698405] usb 1-1.2.4: SerialNumber: 300000000002

but with lsusb I get :

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Bus 001 Device 004: ID 050d:0304 Belkin Components FSU304 USB 2.0 - 4 Ports Hub Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter Bus 001 Device 007: ID 1b71:3002

I'm not a linux guru, but I googled a lot and found that my problem should be a driver missing for example for last row with id 1b71:3002.

It seems that here many people had similar problem but solved after a while. Could somebody help me to solve that problem ? Thanks.

nickmazz commented 10 years ago

I just ended up putting an image with everything already installed on it. Trying doing that. You can find a link Angora was kind enough to post on the thread "noob with frozen pi"

Second or third comment down

On Jan 23, 2014, at 4:33 PM, overbusy notifications@github.com wrote:

Hello, I tried everything exposed on this thread, without success. The main problem is that I can't see /dev/video0. I'm using raspian weezy 2013-07-26, launched get-kernel..., make usbtv from inside the usbtv-driver folder, created 'extra' directory, but I did not get any usbtv.ko to put inside that folder... launched modprobe etc. I followed very accurately the above thread even though I explained here in a very short form. I'm using a Belkin usb hub (with wall adapter after and without before) connected to my raspberry powered from GPIO connector. Video grabber is EasyCAP DC60 fw Fushicai USBTV007etc. I have also a wifi usb key (bought from The Pi Hut) connected on the other usb port and I connect to my Pi via SSH. When I query my Pi with dmesg I get :

[ 257.698335] usb 1-1.2.4: New USB device found, idVendor=1b71, idProduct=3002 [ 257.698360] usb 1-1.2.4: New USB device strings: Mfr=3, Product=4, SerialNumber=2 [ 257.698376] usb 1-1.2.4: Product: usbtv007 [ 257.698391] usb 1-1.2.4: Manufacturer: fushicai [ 257.698405] usb 1-1.2.4: SerialNumber: 300000000002

but with lsusb I get :

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Bus 001 Device 004: ID 050d:0304 Belkin Components FSU304 USB 2.0 - 4 Ports Hub Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter Bus 001 Device 007: ID 1b71:3002

I'm not a linux guru, but I googled a lot and found that my problem should be a driver missing for example for last row with id 1b71:3002.

It seems that here many people had similar problem but solved after a while. Could somebody help me to solve that problem ? Thanks.

— Reply to this email directly or view it on GitHub.

overbusy commented 10 years ago

Thanks nickmazz for your fast answer, that could be an interesting solution... I didn' t read yet the whole content of that issue (I'm at work now), but I have LPD8806 and I don't kwow how to search for such image on the same site. ...Any tip about it ? Thankyou very much.

overbusy commented 10 years ago

Dear nickmazz, I tried to download and unzip the image you suggested me but the file is corrupted... any alterrnative source (better for LPD8806). Thanks

duenorh commented 10 years ago

@overbusy this is a image of my ambi-tv setup with lpd8806. It's a 8gb sd card and worked before I changed my dongle to a stk1160. https://mega.co.nz/#!mY9DFSLa!DPJZMe_JeYuIuO9Dotj1Fzk4FBpYKiIe2Ku9nxS3FrA

overbusy commented 10 years ago

Thanks duenorth, I downloaded that file in Chrome with two pc running WinXP, but no one can open with success that zip file. I tried with Windows XP unzip, 7Zip, ZipGenius but no one can open it. Is there any other mirror where I can download a good file ? Thanks.

duenorh commented 10 years ago

Could I get your email and I could send you a more private link to the file.

overbusy commented 10 years ago

How can I send you my private email ? I'm new on github...

duenorh commented 10 years ago

Here's a link to the .img file. Uncompressed and ready to be copied to your sdcard. https://www.dropbox.com/s/dqe3j5rxg1siuag/ambitv.img

overbusy commented 10 years ago

Hello duenorh, I got your img with many difficulties coz of the size... Finally I downloaded the img and put zipped on a USB memory; when I unzipped in Windows I got again an error so I decided to try to unzip in Linux... gotcha! I wanted to do everything in Windows coz I know DD is very dangerous so I prefer to use Win32DiskImager. I unzipped the ambitv.zip with Kubuntu and copied the result in the Windows partition, so with Win32DiskImager I burnt my 8G SD. It worked immediately out of the box. However I found a strange problem: after playing some minutes with spacebar and connected on the fly a video source to the grabber I got some error and the running program quitted showing me the login prompt, I logged in and query with : ls -l /dev/v* ...I got the video device = /dev/video1... I rebooted and got the system working (not yet mounted on the tv set). I hope that problem won't present anymore. Thankyou.

balu4k commented 10 years ago

Hello Duenorh, your image worked liked a charm. I installed it, pluged in my grabber and i am now able to see Video0.

but when i run the ambi-tv it give me this error..

v4l2-grab: select() timed out.

Is this because i am feeding the NTSC video feed? if yes is there way i can change a config or something for ambi-tv to capture NTSC instead of PAL.

right now i am directly feeding it from a Y adapter RCA to the video grabber. i am not using the HDMI / HDMI to RCA for me to change the signal to PAL.

thanks for the help.

overbusy commented 10 years ago

balu4k, if you can switch to NTSC, you could feed the video grabber from the scart connector on the tv-set avoiding your Y rca adapter. Bye.

balu4k commented 10 years ago

Overbusy, thanks for the reply. my intension is not to avoid the Y adapter. and also Y adapter is feeding the NTSC signal to the grabber. just that the grabber is not able to capture anything because i guess its looking for pal signal. is there a way i can instruct the grabber / ambi-tv to looks for NTSC signal ?

overbusy commented 10 years ago

I don't know about it balu4k. Bye.

overbusy commented 10 years ago

I installed all the stuff on my tv set with a customized ambi-tv.conf. It seems to be working but I've found blue and green inverted that is a common problem (I read on other git issues). The problem is that I got a working img from duenorh and I wouldn't put my hand on a working system (as I spent weeks trying to get my grabber working). Is there anybody can send me what I need (binary or what else) ? Thanks.

duenorh commented 10 years ago

I will send a copy of the file when I get home. (1 hour or so). I have change the order of rgb on my copy. I guess you have a strip that works like gkaindls.

Skickat från min iPhone

1 feb 2014 kl. 15:37 skrev overbusy notifications@github.com:

I installed all the stuff on my tv set with a customized ambi-tv.conf. It seems to be working but I've found blue and green inverted that is a common problem (I read on other git issues). The problem is that I got a working img from duenorh and I wouldn't put my hand on a working system (as I spent weeks trying to get my grabber working). Is there anybody can send me what I need (binary or what else) ? Thanks.

— Reply to this email directly or view it on GitHub.

duenorh commented 10 years ago

Here you have the file with the right order of the rgb https://dl.dropboxusercontent.com/u/19235/lpd8806-spidev-sink.c Replace this one with the one you have in ambi.tv/src/components/ and then go back to ambi-tv/ and do a make.

overbusy commented 10 years ago

Thanks, I'll try immediately. Does it take hours to compile ? I'd like to ask you 3 more things : 1) How can I quit ambi-tv and get Raspberry Pi login ? 2) How can I safely turn off my Raspberry PI ? 3) When I turn on the Raspberry Pi I can't access it from ssh coz the Raspi is unreachable even though I set the "interfaces" file and wpa_supplicant.conf for my wifi in the SD after burning it. Is it possible to modify it ?