Wednesday, May 21, 2008

change ssh tunnel on the fly in a session

use escape character, then C for command line , then -L1234:remote.host:1234

i.e.

~C
-L1234:remote.host:1234

try ~? for help etc

Tuesday, May 20, 2008

howto compile he220stat for mips openwrt

wget http://www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c

needs libncurses

/home/desra/code/openwrt/trunk/staging_dir/toolchain-mipsel_gcc4.1.2/bin/mipsel-linux-uclibc-gcc -L /home/desra/code/openwrt/trunk/staging_dir/mipsel/usr/lib/ -I /home/desra/code/openwrt/trunk/staging_dir/mipsel/usr/include/ -I /home/desra/code/openwrt/trunk/staging_dir/toolchain-mipsel_gcc4.1.2/include/ -Wall -lncurses init_ncurses.c main.c flowreport.c rssi.c modechange.c -o he220stat-mips

Monday, May 19, 2008

e220 openwrt kamikaze wgt634u

installed new firmware

http://www.a1.net/CDA/navigation/pp4_frame/0,6194,50158-51220-51216-500626-html-de,00.html

gives 7.2mbs :-) if your network supports it....

modified /etc/init.d/S95done
sleep 30
/etc/init.d/network restart
/usr/sbin/dropbear -s -p 443

edit firewall.user to add

iptables -t nat -A prerouting_wan -p tcp --dport 443 -j ACCEPT
iptables -A input_wan -p tcp --dport 443 -j ACCEPT


change order of modules make sure storage starts before serial

ls /etc/modules.d
root@OpenWrt:~# ls -l /etc/modules.d/
-rw-r----- 1 root root 9 May 12 12:15 20-scsi-core
-rw-r--r-- 1 root root 35 May 12 12:17 20-switch
-rw-r----- 1 root root 8 May 12 12:25 20-usb-core
-rw-r----- 1 root root 37 May 12 12:25 30-ppp
-rw-r--r-- 1 root root 86 May 12 12:25 40-ipt-nathelper
-rw-r----- 1 root root 7 May 12 12:15 40-scsi-core
-rw-r--r-- 1 root root 115 May 12 12:08 50-madwifi
-rw-r--r-- 1 root root 9 May 12 12:25 50-usb-ohci
-rw-r--r-- 1 root root 9 May 12 12:25 50-usb2
-rw-r----- 1 root root 28 Jan 1 2000 55-usb-storage
-rw-r----- 1 root root 52 Jan 1 2000 60-usb-serial

modified usb serial
root@OpenWrt:~# cat /etc/modules.d/60-usb-serial
usbserial vendor=0x12d1 product=0x1003 maxSize=4096

edit /etc/config/network to add 3g
#### WAN configuration
config interface wan
option ifname "ppp0"
option ifname "ppp0"
option device "/dev/ttyUSB0"
option proto "3g"
option apn "open.internet"
option service "hsdpa"

stream flash video of vlc mpeg2 dvb stream

see other posts about streaming dvb. this sample below is receiving a vlc stream and re-encoding and streaming as flash.

in this case sky news on same server as vlc running

install ffmpeg , or checkout and build with mp3 support if your distro doesn't install with mp3support (likely)

see http://ubuntuforums.org/showthread.php?t=786095 for ubuntu

run ffserver with this conf

----
Port 9090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 100000
# Suppress that if you want to launch ffserver as a daemon.
NoDaemon


File /tmp/feed1.ffm
FileMaxSize 50M





Feed feed1.ffm
Format swf
VideoCodec flv
VideoFrameRate 25
VideoBufferSize 80000
VideoBitRate 10000
VideoQMin 1
VideoQMax 5
VideoSize 720x576
AudioBitRate 192
AudioChannels 2
AudioSampleRate 44100
AudioCodec mp3
PreRoll 0


-----


then at command line catch the vlc stream and pipe to ffmpeg, which then feeds to ffserver

curl -s -o- http://127.0.0.1:4710 | ./ffmpeg -i - -deinterlace http://localhost:9090/feed1.ffm


then open http://ip.of.ffdserver:9090/skynews.swf
and if you have flash support you should be happy :-)

or embed with

EMBED
src="http://ip.of.ffdserver:9090" width=640 height=480 type="application/x-shockwave-flash">
/embed

Sunday, May 18, 2008

yet another way for dazzle and heron :-(

cd ~
hg clone http://mcentral.de/hg/~mrec/em28xx-new
cd em28xx-new
sudo ./build.sh
cd ~

another way to get the dazzle stick to work on heron

sudo su

apt-get install mercurial linux-headers-$(uname -r) linux-source build-essential

cd /lib/firmware

wget http://konstantin.filtschew.de/v4l-firmware/firmware_v4.tgz

tar xvzf firmware_v4.tgz

hg clone http://mcentral.de/hg/~mrec/v4l-dvb-experimental

cd v4l-dvb-experimental

make

make install

reboot

sudo modprobe em2880-dvb

If on the next reboot, the card stops working the em2880-dvb module is not being loaded properly in Feisty. To fix this :

cd /etc/modprobe.d
sudo gedit dvbstick

then add this line to the new dvbstick file :
install em28xx /sbin/modprobe --ignore-install em28xx; /bin/sleep 2; /sbin/modprobe em2880-dvb

Reboot your system

Friday, May 16, 2008

dvb channel data for ireland

preferred_name service_type freq_actual channel transport_id service_id
RTE 1 DVB-T 738 54 1001 1101
RTE 2 DVB-T 738 54 1001 1102
TV 3 DVB-T 738 54 1001 1103
TG 4 DVB-T 738 54 1001 1104
RTE Radio 1 DVB-T 738 54 1001 1226
RTE 2fm DVB-T 738 54 1001 1227
RTE Lyric fm DVB-T 738 54 1001 1228
RTE Raidio na Gaeltachta DVB-T 738 54 1001 1229
Today FM DVB-T 738 54 1001 1230
RTE Radio 1 Extra DVB-T 738 54 1001 1231
RTE Choice DVB-T 738 54 1001 1232
RTE 2XM DVB-T 738 54 1001 1233
Channel 6 DVB-T 770 58 2001 2101
cBBC - Test DVB-T 770 58 2001 2102
cBeebies - Test DVB-T 770 58 2001 2103
BBC 3 - Test DVB-T 770 58 2001 2104
Sky News DVB-T 794 61 3001 3101
Sky Sports 1 DVB-T 794 61 3001 3102
Extreme Sports DVB-T 794 61 3001 3103
UKTV History DVB-T 794 61 3001 3104
Setanta Golf DVB-T 794 61 3001 3105
Setanta Ireland DVB-T 794 61 3001 3106
HD Test 1 DVB-T 818 64 4001 4101
SD Test 1 DVB-T 818 64 4001 4102
BBC 4 - Test DVB-T 770 58 2001 2105
BBC News24 - Test DVB-T 770 58 2001 2106
FM104 DVB-T 770 58 2001 2221
Phantom FM DVB-T 770 58 2001 2225
Newstalk 106-108 DVB-T 770 58 2001 2226
Dublins 98FM DVB-T 770 58 2001 2227
SPIN 1038 DVB-T 770 58 2001 2228
East Coast FM DVB-T 770 58 2001 2229
DAP All 80s DVB-T 770 58 2001 2232
DAP Mocha DVB-T 770 58 2001 2233

dvb channel data for ireland

preferred_name service_type freq_actual channel transport_id service_id
RTE 1 DVB-T 738 54 1001 1101
RTE 2 DVB-T 738 54 1001 1102
TV 3 DVB-T 738 54 1001 1103
TG 4 DVB-T 738 54 1001 1104
RTE Radio 1 DVB-T 738 54 1001 1226
RTE 2fm DVB-T 738 54 1001 1227
RTE Lyric fm DVB-T 738 54 1001 1228
RTE Raidio na Gaeltachta DVB-T 738 54 1001 1229
Today FM DVB-T 738 54 1001 1230
RTE Radio 1 Extra DVB-T 738 54 1001 1231
RTE Choice DVB-T 738 54 1001 1232
RTE 2XM DVB-T 738 54 1001 1233
Channel 6 DVB-T 770 58 2001 2101
cBBC - Test DVB-T 770 58 2001 2102
cBeebies - Test DVB-T 770 58 2001 2103
BBC 3 - Test DVB-T 770 58 2001 2104
Sky News DVB-T 794 61 3001 3101
Sky Sports 1 DVB-T 794 61 3001 3102
Extreme Sports DVB-T 794 61 3001 3103
UKTV History DVB-T 794 61 3001 3104
Setanta Golf DVB-T 794 61 3001 3105
Setanta Ireland DVB-T 794 61 3001 3106
HD Test 1 DVB-T 818 64 4001 4101
SD Test 1 DVB-T 818 64 4001 4102
BBC 4 - Test DVB-T 770 58 2001 2105
BBC News24 - Test DVB-T 770 58 2001 2106
FM104 DVB-T 770 58 2001 2221
Phantom FM DVB-T 770 58 2001 2225
Newstalk 106-108 DVB-T 770 58 2001 2226
Dublins 98FM DVB-T 770 58 2001 2227
SPIN 1038 DVB-T 770 58 2001 2228
East Coast FM DVB-T 770 58 2001 2229
DAP All 80s DVB-T 770 58 2001 2232
DAP Mocha DVB-T 770 58 2001 2233

vlc streaming astra sky bbc

Some command lines for streaming dvb-t , terrestrial and sat. in ireland.

BBC Sat feed
vlc --ttl 12 --ts-es-id-pid -I dummy --programs=6301,6302,6316,6317,6318,6319,6331 dvb: --dvb-frequency=10773000 --dvb-srate=22000000 --dvb-voltage=18 --sout '#duplicate{dst=std{access=http,mux=ts,url=:6301},select="program=6301",dst=std{access=http,mux=ts,url=:6302},select="program=6302",dst=std{access=http,mux=ts,url=:6316},select="program=6316",dst=std{access=http,mux=ts,url=:6317},select="program=6317",dst=std{access=http,mux=ts,url=:6318},select="program=6318",dst=std{access=http,mux=ts,url=:6319},select="program=6319",dst=std{access=http,mux=ts,url=:6331},select="program=6331"}'

Sky News
vlc --ttl 12 --ts-es-id-pid -I dummy --programs=4710,4711 dvb: --dvb-adapter=1 --dvb-frequency=12207000 --dvb-srate=27500000 --dvb-voltage=13 --sout '#duplicate{dst=std{access=http,mux=ts,url=:4710},select="program=4710",dst=std{access=http,mux=ts,url=:4711},select="program=4711"}'

DVB-T stream
vlc --ttl 12 --ts-es-id-pid -I dummy --programs=2221,2225,2226,2227,2228,2229 dvb: --dvb-adapter=2 --dvb-frequency=770000000 --dvb-guard=32 dvb-code-rate-hp=3 --dvb-fec=3 dvb-code-rate-lp=3 dvb-modulation=16 --dvb-bandwidth=8 --sout-standard-access=udp --sout-standard-mux=ts --sout '#duplicate{dst=std{access=http,mux=ts,url=:12221},select="program=2221",dst=std{access=http,mux=ts,url=:12225},select="program=2225",dst=std{access=http,mux=ts,url=:12226},select="program=2226",dst=std{access=http,mux=ts,url=:12227},select="program=2227",dst=std{access=http,mux=ts,url=:12228},select="program=2228",dst=std{access=http,mux=ts,url=:12229},select="program=2229"}'

RTE 1 Terrestrial
vlc -I dummy pvr:/dev/video2:frequency=535250 --sout '#duplicate{dst=std{access=http,mux=ts,url=:53525}'

TV3 Terrestrial
vlc -I dummy pvr:/dev/video1:frequency=583250 --sout '#duplicate{dst=std{access=http,mux=ts,url=:58325}'

RTE Radio via sat
vlc --ttl 12 --ts-es-id-pid -I dummy --programs=9611,9612,9613,9614 dvb: --dvb-frequency=10744000 --dvb-srate=22000000 --dvb-voltage=18 --sout-standard-access=udp --sout-standard-mux=ts --sout '#duplicate{dst=std{access=http,mux=ts,url=:9611},select="program=9611",dst=std{access=http,mux=ts,url=:9612},select="program=9612",dst=std{access=http,mux=ts,url=:9613},select="program=9613",dst=std{access=http,mux=ts,url=:9614},select="program=9614"}'

BBC News sat and some bbc sat radio

vlc --ttl 12 --ts-es-id-pid -I dummy --programs=6704,6751,6752,6753 dvb: --dvb-adapter=1 --dvb-frequency=11953500 --dvb-srate=27500000 --dvb-voltage=18 --sout-standard-access=udp --sout-standard-mux=ts --sout '#duplicate{dst=std{access=http,mux=ts,url=:6704},select="program=6704",dst=std{access=http,mux=ts,url=:6751},select="program=6751",dst=std{access=http,mux=ts,url=:6752},select="program=6752",dst=std{access=http,mux=ts,url=:6753},select="program=6753"}'

CNN Sat
vlc --ttl 12 --ts-es-id-pid -I dummy --programs=7140,7141 dvb: --dvb-adapter=1 --dvb-frequency=12051000 --dvb-srate=27500000 --dvb-voltage=13 --sout-standard-access=udp --sout-standard-mux=ts --sout '#duplicate{dst=std{access=http,mux=ts,url=:7140},select="program=7140",dst=std{access=http,mux=ts,url=:7141},select="program=7141"}'

more DVB-T
vlc --ttl 12 --ts-es-id-pid -I dummy --programs=1101,1102,1103,1104,1226,1227,1228,1229,1230,1231,1232,1233 dvb: --dvb-adapter=2 --dvb-frequency=738000000 --dvb-guard=32 dvb-code-rate-hp=3 --dvb-fec=3 dvb-code-rate-lp=3 dvb-modulation=16 --dvb-bandwidth=8 --sout-standard-access=udp --sout-standard-mux=ts --sout '#duplicate{dst=std{access=http,mux=ts,url=:11101},select="program=1101",dst=std{access=http,mux=ts,url=:11102},select="program=1102",dst=std{access=http,mux=ts,url=:11103},select="program=1103",dst=std{access=http,mux=ts,url=:11104},select="program=1104",dst=std{access=http,mux=ts,url=:11226},select="program=1226",dst=std{access=http,mux=ts,url=:11227},select="program=1227",dst=std{access=http,mux=ts,url=:11228},select="program=1228",dst=std{access=http,mux=ts,url=:11229},select="program=1229",dst=std{access=http,mux=ts,url=:11230},select="program=1230",dst=std{access=http,mux=ts,url=:11231},select="program=1231",dst=std{access=http,mux=ts,url=:11232},select="program=1232",dst=std{access=http,mux=ts,url=:11233},select="program=1233"}'

RTE2 Terra
vlc -I dummy pvr:/dev/video2:frequency=567250 --sout '#duplicate{dst=std{access=http,mux=ts,url=:56725}'

TG4 Terrestrial vlc -I dummy pvr:/dev/video0:frequency=743250 --sout '#duplicate{dst=std{access=http,mux=ts,url=:7432}'

Monday, May 12, 2008

nokia cable

You can also use Nokia DLR-3P data cable. Just cut off connector and wire RED to J2 pin 1 (+3.3V), GREEN to J2 pin 2 (RXD), GRAY to J2 pin 3 (TXD) and BLACK+SHIELD to J2 pin 4 (GND). Since this cable is normally powered by phone you need to connect J2 pin 1.

tftpd in leopard and osx

Copy the file you wish to serve to:

/private/tftpboot

Then:

sudo launchctl

From the launchd% prompt run:

load -F /System/Library/LaunchDaemons/tftp.plist
start com.apple.tftpd


stop com.apple.tftpd
unload load -F /System/Library/LaunchDaemons/tftp.plist

vlc stream astra

rte radio feeds from astra

vlc --ttl 12 --ts-es-id-pid -I dummy --programs=9611,9612,9613,9614 dvb: --dvb-frequency=10744000 --dvb-srate=22000000 --dvb-voltage=18 --sout-standard-access=udp --sout-standard-mux=ts --sout '#duplicate{dst=std{access=http,mux=ts,url=:9611},select="program=9611",dst=std{access=http,mux=ts,url=:9612},select="program=9612",dst=std{access=http,mux=ts,url=:9613},select="program=9613",dst=std{access=http,mux=ts,url=:9614},select="program=9614"}'

dvb-t ireland vlc

vlc dvb: --dvb-adapter=0 --dvb-frequency=738000000 --dvb-guard=32 dvb-code-rate-hp=3 --dvb-fec=3 dvb-code-rate-lp=3 dvb-modulation=16 --dvb-bandwidth=8


stream with ip like this


vlc --ttl 12 --ts-es-id-pid -I dummy --programs=1101,1102,1103,1104,1226,1227,1228,1229,1230,1231,1232,1233 dvb: --dvb-adapter=2 --dvb-frequency=738000000 --dvb-guard=32 dvb-code-rate-hp=3 --dvb-fec=3 dvb-code-rate-lp=3 dvb-modulation=16 --dvb-bandwidth=8 --sout-standard-access=udp --sout-standard-mux=ts --sout '#duplicate{dst=std{access=http,mux=ts,url=:11101},select="program=1101",dst=std{access=http,mux=ts,url=:11102},select="program=1102",dst=std{access=http,mux=ts,url=:11103},select="program=1103",dst=std{access=http,mux=ts,url=:11104},select="program=1104",dst=std{access=http,mux=ts,url=:11226},select="program=1226",dst=std{access=http,mux=ts,url=:11227},select="program=1227",dst=std{access=http,mux=ts,url=:11228},select="program=1228",dst=std{access=http,mux=ts,url=:11229},select="program=1229",dst=std{access=http,mux=ts,url=:11230},select="program=1230",dst=std{access=http,mux=ts,url=:11231},select="program=1231",dst=std{access=http,mux=ts,url=:11232},select="program=1232",dst=std{access=http,mux=ts,url=:11233},select="program=1233"}'

dazzle stick and Heron

PCTV 330e

sudo -i

apt-get install build-essential mercurial

hg clone http://mcentral.de/hg/~mrec/userspace-drivers
cd userspace-drivers
./build.sh

cd ..

hg clone http://mcentral.de/hg/~mrec/em28xx-userspace2
cd em28xx-userspace2
./build.sh

/etc/init.d/media-daemon start

modprobe em28xx-dvb