Pages

Thursday, 25 October 2012

em28xx - RPi - archlinux-hf-2012-09-18

N.B. This doesn't work

Second attempt with a em28xx on Raspberry Pi... I'm so fucking bored of this not working I decided to do it again.


This is largely based on the first attempt...

http://bufobufomagic.blogspot.co.uk/2012/07/make-disk-image-mac-diskutil-list-sudo.html



 

build SD card (on a mac) and, probably, make it work


diskutil list

sudo diskutil unmountDisk /dev/disk1

dd if=/Users/michael/Desktop/RaspberryPi/Images/archlinux-hf-2012-09-18.img of=/dev/disk1 bs=1m


muck about with partitions - i expand the arch linux partition to 4Gb and call the remainder of the drive fat32.

fiddle with boot partition memory elves - rename original start elf and copy the 240 start elf as start.elf



then insert card, boot RPi and watch the LEDs dance about while you find it on the network.



mine was 85...

ssh 192.168.1.85 -l root (password root)

if this isn't your first time round the loop you might get a load of key verification errors, so do

ssh-keygen -R 192.168.1.85

and try again.

 
it is plugged in, right?

set up stuffs

swapdisk-u-like


mkdir -p /var/cache/swap/

dd if=/dev/zero of=/var/cache/swap/swapfile bs=1M count=1024

chmod 0600 /var/cache/swap/swapfile 
mkswap /var/cache/swap/swapfile
 
swapon /var/cache/swap/swapfile
put it in fstab, if you want to...
 
echo "/var/cache/swap/swapfile    none    swap    sw    0   0" >> /etc/fstab


...otherwise just remember to check it's on before you make the kernel.









upgradings






// if you like progress bars, this will give you the horn.

pacman -Syuand open a bottle of red wine.


install stuff

// because you want stuff

pacman -S ffmpeg motion git base-devel python2


Shall we reboot? Wouldn't be a bad idea. It will be nice to see it boot in a working state one more time...

do a kernel

get the kernel source


// are you doing this for fun? - because it isn't.





cd /home

git clone --depth 1 https://github.com/raspberrypi/linux.git

cd linux

zcat /proc/config.gz > .config



make menuconfig
( it appears i2c and em28xx stuff is all there now, but you can have a look for yourself)

muck about with the kernel


This is where you patch em28xx... https://patchwork.kernel.org/patch/1309461/

diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index de2cb20..bed07a6 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -785,12 +785,8 @@ int em28xx_resolution_set(struct em28xx *dev)
     else
         dev->vbi_height = 18;

-    if (!dev->progressive)
-        height >>= norm_maxh(dev);
-
     em28xx_set_outfmt(dev);

-
     em28xx_accumulator_set(dev, 1, (width - 4) >> 2, 1, (height - 4) >> 2);

     /* If we don't set the start position to 2 in VBI mode, we end up

make the kernel

// I know we've been here before, just try and think positively

make



cd ..
 

git clone https://github.com/raspberrypi/tools

python2 imagetool-uncompressed.py /home/linux/arch/arm/boot/Image

mv /boot/kernel.img /boot/kernel.old


cp kernel.img /boot/kernel.img

cd /home/linux

make modules_install

reboot





ERRORS!


motion grumbles with;

[1] Unable to query input 1 VIDIOC_ENUMINPUT: Invalid argument
[1] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[1] Could not fetch initial image from camera
 




I suspect this is something to do with the wrong card id...

[    4.504130] em28xx #0: Your board has no unique USB ID and thus need a hint to be detected.
 

Here are the choices;

[    4.504215] em28xx #0: Here is a list of valid choices for the card=<n> insmod option:
[    4.504232] em28xx #0:     card=0 -> Unknown EM2800 video grabber
[    4.504248] em28xx #0:     card=1 -> Unknown EM2750/28xx video grabber
[    4.504264] em28xx #0:     card=2 -> Terratec Cinergy 250 USB
[    4.504279] em28xx #0:     card=3 -> Pinnacle PCTV USB 2
[    4.504293] em28xx #0:     card=4 -> Hauppauge WinTV USB 2
[    4.504307] em28xx #0:     card=5 -> MSI VOX USB 2.0
[    4.504321] em28xx #0:     card=6 -> Terratec Cinergy 200 USB
[    4.504335] em28xx #0:     card=7 -> Leadtek Winfast USB II
[    4.504350] em28xx #0:     card=8 -> Kworld USB2800
[    4.504365] em28xx #0:     card=9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker / Kworld DVD Maker 2
[    4.504386] em28xx #0:     card=10 -> Hauppauge WinTV HVR 900
[    4.504401] em28xx #0:     card=11 -> Terratec Hybrid XS
[    4.504415] em28xx #0:     card=12 -> Kworld PVR TV 2800 RF
[    4.504429] em28xx #0:     card=13 -> Terratec Prodigy XS
[    4.504445] em28xx #0:     card=14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0
[    4.504462] em28xx #0:     card=15 -> V-Gear PocketTV
[    4.504476] em28xx #0:     card=16 -> Hauppauge WinTV HVR 950
[    4.504490] em28xx #0:     card=17 -> Pinnacle PCTV HD Pro Stick
[    4.504506] em28xx #0:     card=18 -> Hauppauge WinTV HVR 900 (R2)
[    4.504521] em28xx #0:     card=19 -> EM2860/SAA711X Reference Design
[    4.504537] em28xx #0:     card=20 -> AMD ATI TV Wonder HD 600
[    4.504552] em28xx #0:     card=21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder
[    4.504569] em28xx #0:     card=22 -> EM2710/EM2750/EM2751 webcam grabber
[    4.504585] em28xx #0:     card=23 -> Huaqi DLCW-130
[    4.504599] em28xx #0:     card=24 -> D-Link DUB-T210 TV Tuner
[    4.504613] em28xx #0:     card=25 -> Gadmei UTV310
[    4.504628] em28xx #0:     card=26 -> Hercules Smart TV USB 2.0
[    4.504643] em28xx #0:     card=27 -> Pinnacle PCTV USB 2 (Philips FM1216ME)
[    4.504659] em28xx #0:     card=28 -> Leadtek Winfast USB II Deluxe
[    4.504675] em28xx #0:     card=29 -> EM2860/TVP5150 Reference Design
[    4.504690] em28xx #0:     card=30 -> Videology 20K14XUSB USB2.0
[    4.504705] em28xx #0:     card=31 -> Usbgear VD204v9
[    4.504719] em28xx #0:     card=32 -> Supercomp USB 2.0 TV
[    4.504733] em28xx #0:     card=33 -> Elgato Video Capture
[    4.504748] em28xx #0:     card=34 -> Terratec Cinergy A Hybrid XS
[    4.504763] em28xx #0:     card=35 -> Typhoon DVD Maker
[    4.504777] em28xx #0:     card=36 -> NetGMBH Cam
[    4.504790] em28xx #0:     card=37 -> Gadmei UTV330
[    4.504804] em28xx #0:     card=38 -> Yakumo MovieMixer
[    4.504817] em28xx #0:     card=39 -> KWorld PVRTV 300U
[    4.504832] em28xx #0:     card=40 -> Plextor ConvertX PX-TV100U
[    4.504846] em28xx #0:     card=41 -> Kworld 350 U DVB-T
[    4.504860] em28xx #0:     card=42 -> Kworld 355 U DVB-T
[    4.504875] em28xx #0:     card=43 -> Terratec Cinergy T XS
[    4.504890] em28xx #0:     card=44 -> Terratec Cinergy T XS (MT2060)
[    4.504905] em28xx #0:     card=45 -> Pinnacle PCTV DVB-T
[    4.504919] em28xx #0:     card=46 -> Compro, VideoMate U3
[    4.504934] em28xx #0:     card=47 -> KWorld DVB-T 305U
[    4.504948] em28xx #0:     card=48 -> KWorld DVB-T 310U
[    4.504962] em28xx #0:     card=49 -> MSI DigiVox A/D
[    4.504976] em28xx #0:     card=50 -> MSI DigiVox A/D II
[    4.504990] em28xx #0:     card=51 -> Terratec Hybrid XS Secam
[    4.505005] em28xx #0:     card=52 -> DNT DA2 Hybrid
[    4.505019] em28xx #0:     card=53 -> Pinnacle Hybrid Pro
[    4.505033] em28xx #0:     card=54 -> Kworld VS-DVB-T 323UR
[    4.505048] em28xx #0:     card=55 -> Terratec Cinnergy Hybrid T USB XS (em2882)
[    4.505064] em28xx #0:     card=56 -> Pinnacle Hybrid Pro (330e)
[    4.505079] em28xx #0:     card=57 -> Kworld PlusTV HD Hybrid 330
[    4.505094] em28xx #0:     card=58 -> Compro VideoMate ForYou/Stereo
[    4.505109] em28xx #0:     card=59 -> (null)
[    4.505123] em28xx #0:     card=60 -> Hauppauge WinTV HVR 850
[    4.505138] em28xx #0:     card=61 -> Pixelview PlayTV Box 4 USB 2.0
[    4.505153] em28xx #0:     card=62 -> Gadmei TVR200
[    4.505167] em28xx #0:     card=63 -> Kaiomy TVnPC U2
[    4.505181] em28xx #0:     card=64 -> Easy Cap Capture DC-60
[    4.505196] em28xx #0:     card=65 -> IO-DATA GV-MVP/SZ
[    4.505210] em28xx #0:     card=66 -> Empire dual TV
[    4.505223] em28xx #0:     card=67 -> Terratec Grabby
[    4.505237] em28xx #0:     card=68 -> Terratec AV350
[    4.505252] em28xx #0:     card=69 -> KWorld ATSC 315U HDTV TV Box
[    4.505267] em28xx #0:     card=70 -> Evga inDtube
[    4.505281] em28xx #0:     card=71 -> Silvercrest Webcam 1.3mpix
[    4.505296] em28xx #0:     card=72 -> Gadmei UTV330+
[    4.505310] em28xx #0:     card=73 -> Reddo DVB-C USB TV Box
[    4.505325] em28xx #0:     card=74 -> Actionmaster/LinXcel/Digitus VC211A
[    4.505340] em28xx #0:     card=75 -> Dikom DK300
[    4.505354] em28xx #0:     card=76 -> KWorld PlusTV 340U or UB435-Q (ATSC)
[    4.505371] em28xx #0:     card=77 -> EM2874 Leadership ISDBT
[    4.505386] em28xx #0:     card=78 -> PCTV nanoStick T2 290e
[    4.505400] em28xx #0:     card=79 -> Terratec Cinergy H5
[    4.505415] em28xx #0:     card=80 -> PCTV DVB-S2 Stick (460e)






It's supposedly a kworld 2800USB, so i'll try 8

modprobe -r em28xx
modprobe em28xx card=8


doesn't work, hangs on Resizing pre_capture buffer to 1 items - which i think is an improvement. card=19 doesn't work either, same error - although i have a feeling that's how it has turned up in the past.







New drivers?

cd /home

mkdir stuff

wget http://aur.archlinux.org/packages/pe/perl-proc-processtable/perl-proc-processtable.tar.gz


wget http://aur.archlinux.org/packages/pe/perl-proc-processtable/PKGBUILD

makepkg --asroot -s

pacman -U perl-proc-processtable-0.45-3-any.pkg.tar.xz

pacman -S patchutils

cd /home

git clone git://linuxtv.org/media_build.git

cd media_build

./build


the build failed on smiapp-core.c
at this point I  make menuconfig and start removing stuff
then try to make it again.

make install 


 this seemed to work now

reboot 


but the driver still doesn't. I'm giving up on this board for a while.

Monday, 22 October 2012

Cue light repeater

A cue light repeater

a photo transistor;

http://uk.farnell.com/vishay/tept5600/phototransistor-sensor-ambient/dp/1497673

a red led

http://uk.farnell.com/cml-innovative-technologies/cmd5055/led-5mm-red/dp/1139562


some circuit diagrams;

http://home.cogeco.ca/~rpaisley4/PhotoDetectors.html


When the male XLR shell housing the photo transistor is mounted over a cue light, and the cue light comes on, then the LED comes on.



Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License