Difference between revisions of "HowTo"
m (Protected "HowTo" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading]) |
|||
Line 1: | Line 1: | ||
− | + | == Howto: Use fsck.cgi == | |
+ | |||
+ | # Start your browser and use this address --> http://kiss_IP | ||
+ | # Go to the modules section and select e2fsck module | ||
+ | # In the E2FSCK MODULE you have to press link in the bottom of the page | ||
+ | # In the E2FSCK PREPARE you have to press on link in the bottom of the page | ||
+ | # It appear the html message its time to send me a PM | ||
+ | # Close your browser | ||
+ | # Telnet to kiss and use these commands: | ||
+ | <pre> | ||
+ | cd systempart | ||
+ | killall httpd | ||
+ | killall ftpd | ||
+ | umount /hdd | ||
+ | ./fsck -x 32000 -X /systempart/bmcache -pvf /dev/discs/disc0/part2 | ||
+ | </pre> | ||
+ | After that all is done, reboot the player from the frontpanel | ||
+ | |||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=6254 Discussion] | ||
+ | |||
+ | == Howto: Run fsck from shortcut on your PC with Tera Term 2 == | ||
+ | |||
+ | I've made script that runs fsck on your kiss hdd. It runs via telnet with a program called Tera Term and its depending on the great Martin B FW with telnet and fsck. | ||
+ | |||
+ | To get this working you need: | ||
+ | # [http://hp.vector.co.jp/authors/VA002416/teraterm.html Tera Term 2.3] installed on your computer | ||
+ | # Fsck and reboot tools in your /systempart folder on your DP-558 (The tools can be copied from in /hdd/stage2/bin folder) | ||
+ | # A /systempart/bmcache folder on your DP-558 | ||
+ | # A Tera Term macro/script file that runs fsck: | ||
+ | ## Copy this to notepad and save it as a *.ttl file (eg fsck.ttl) replacing kiss-ip with the ip of your kiss: | ||
+ | <pre> | ||
+ | show -1 | ||
+ | connect 'kiss-ip' | ||
+ | setdlgpos 200 200 | ||
+ | statusbox 'Connecting to DP-558...' 'Kiss fsck' | ||
+ | wait '/ #' | ||
+ | statusbox 'Preparing fsck...' 'Kiss fsck' | ||
+ | sendln 'cd /systempart' | ||
+ | wait '/systempart #' | ||
+ | sendln 'killall httpd' | ||
+ | wait '/systempart #' | ||
+ | sendln 'killall ftpd' | ||
+ | wait '/systempart #' | ||
+ | sendln 'umount /hdd' | ||
+ | wait '/systempart #' | ||
+ | sendln './fsck -x 32000 -X /systempart/bmcache -pvf /dev/discs/disc0/part2' | ||
+ | statusbox 'Running fsck...' 'Kiss fsck' | ||
+ | wait '/systempart #' | ||
+ | sendln './reboot' | ||
+ | statusbox 'Fsck finished, restarting DP-558...' 'Kiss fsck' | ||
+ | Pause 5 | ||
+ | closett | ||
+ | </pre> | ||
+ | ## you can leave out the closett at the end of the file if you want to leave the telnet window open - to enable you to see the output of the fsck | ||
+ | # A shortcut that starts the Tera Term macro/script file | ||
+ | ## You start the script with ttpmacro.exe (found in the Tera Term install folder) | ||
+ | ## Shortcut example: "c:\program files\ttermpro\ttpmacro.exe fsck.ttl" | ||
+ | |||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=7076 Discussion] | ||
+ | |||
+ | == Howto: Set protection on Stage2 == | ||
+ | ===TELNET / FTP === | ||
+ | # Telnet to kiss | ||
+ | # Type in "passwd" so you set a password for root | ||
+ | # Test this password by typing in "login" and see if this work | ||
+ | # Add the following lines to inetd.conf to password protect FTP/TELNET: | ||
+ | |||
+ | <pre> | ||
+ | ftp stream tcp nowait root /bin/ftpd ftpd -b -H -w -E | ||
+ | telnet stream tcp nowait root /sbin/telnetd telnetd -l /hdd/stage2/bbox/login | ||
+ | </pre> | ||
+ | |||
+ | ===HTTP / KML=== | ||
+ | '''When you protect HTTP, your local stage2 KML-page won't work !!!''' | ||
+ | |||
+ | To enable password protect HTTP, remove "protect/" from the first line and it should result in the following: | ||
+ | |||
+ | <pre> | ||
+ | /:admin:admin | ||
+ | </pre> | ||
+ | |||
+ | <pre> | ||
+ | To make the changes active you have to restart the inetd. | ||
+ | |||
+ | Type "top" to get the PID# of inetd | ||
+ | Type kill -1 <PID # of inetd> to restart the service | ||
+ | </pre> | ||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=8597 Discussion] | ||
+ | |||
+ | == Howto: KiSS as remote player == | ||
+ | |||
+ | === winamp === | ||
+ | |||
+ | With this cgi you can stream whatever is playing on your PC's winamp to your KiSS player. Using the PC's mouse and life playlists makes listening to your audio finaly a pleasure (and your KiSS the promised media player). | ||
+ | |||
+ | What you need on you PC: | ||
+ | # Winamp | ||
+ | # [http://www.shoutcast.com/download/broadcast.phtml#download SHOUTcast DSP Plug-In for Winamp] | ||
+ | # [http://www.shoutcast.com/download/serve.phtml SHOUTcast Server] | ||
+ | |||
+ | What you need on your KiSS: | ||
+ | # martinb stage2 firmware | ||
+ | # CGI code is already included as of stage2RF! (nothing to do here) | ||
+ | |||
+ | Using it (Do everything only on your PC, no need to turn on TV): | ||
+ | # Start winamp with DSP plugin (default port 8000, default password: changeme) | ||
+ | # Start the Shoutcast server | ||
+ | # Browse to http://kissip/cgi/shoutplay.cgi to start the KiSS media player. (Note: Nothing but the main menu will be visible on TV) | ||
+ | |||
+ | *[http://patiju.heim.at/KiSS/shoutplay.jpg Screenshot] of Winamp/Shoutcast part | ||
+ | |||
+ | The interface is very basic, but so far worked fine for me. Suggestions improvements welcome, I can update the code. | ||
+ | |||
+ | Current issues: | ||
+ | # The kiSS mediaplayer stores 15 sec of music, therefore not really live. | ||
+ | # When nothing is being played, the connection stops, and has to be re-started once you are playing again. | ||
+ | |||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=6373 Discussion] | ||
+ | |||
+ | === xmms (Linux) === | ||
+ | |||
+ | It took me some time to figure this out but the streaming also works on my Debian Linux box using the XMMS player. | ||
+ | |||
+ | Good change you can get this working on Ubuntu the same way. | ||
+ | |||
+ | First install the packages | ||
+ | <pre> | ||
+ | icecast-server | ||
+ | xmms | ||
+ | xmms-liveice | ||
+ | </pre> | ||
+ | |||
+ | '''The configuration files''' | ||
+ | |||
+ | In the /etc/icecast/ directory you find the icecast-server configuration files all with extension .dist. | ||
+ | |||
+ | Copy (or move) all those files -without- this extension to activate them | ||
+ | |||
+ | (you need to be root for this or use sudo): | ||
+ | |||
+ | <pre> | ||
+ | # cp /etc/icecast/icecast.conf.dist /etc/icecast/icecast.conf | ||
+ | </pre> | ||
+ | |||
+ | Do the same for the other files. | ||
+ | |||
+ | '''The access control horror''' | ||
+ | |||
+ | So you think you got it set up and now you can't get access to your icecast admin webpage. | ||
+ | |||
+ | For my workstation at internal IP 192.168.2.5 I did two things to make this work: | ||
+ | |||
+ | 1) /etc/icecast/icecast.conf | ||
+ | Lookup server_name part and edit as needed, note for this example I used my local workstation IP: | ||
+ | <pre> | ||
+ | #hostname disabled | ||
+ | port 8000 | ||
+ | port 8001 | ||
+ | server_name 192.168.2.5 | ||
+ | </pre> | ||
+ | |||
+ | 2) /etc/hosts.allow | ||
+ | Here I enabled access to the icecast 8000 port for my workstation (127.0.0.1) and my local network '192.168.2.*': | ||
+ | <pre> | ||
+ | 8000: 127.0.0.1 LOCAL : ALLOW | ||
+ | 8000: 192.168.2. | ||
+ | </pre> | ||
+ | |||
+ | Now restart your icecast server and try to access your admin page: | ||
+ | <pre> | ||
+ | # /etc/init.d/icecast-server restart | ||
+ | </pre> | ||
+ | |||
+ | and point your webbrowser to: | ||
+ | <pre> | ||
+ | http://127.0.0.1:8000/admin | ||
+ | </pre> | ||
+ | |||
+ | '''streaming.. & encrypted passwords sooo easy''' | ||
+ | |||
+ | Well if you know it -then- its easy the big amount of text in the configuration file | ||
+ | '/etc/icecast/icecast.conf' | ||
+ | is confusing. | ||
+ | |||
+ | Look up the 'Server passwords' part in the '/etc/icecast/icecast.conf' file. | ||
+ | |||
+ | This is what I used for my local experiment to get xmms-liveice to be able to connect to the icecast server: | ||
+ | |||
+ | <pre> | ||
+ | # tGTqNUb YXjIENHpFiRV2 | ||
+ | encoder_password YXjIENHpFiRV2 | ||
+ | admin_password YXjIENHpFiRV2 | ||
+ | oper_password YXjIENHpFiRV2 | ||
+ | </pre> | ||
+ | |||
+ | How does this work ? | ||
+ | |||
+ | *) Most important REMOVE ALL CHARACTER AFTER THE PASSWORD, ALSO THE COMMENTS, EVERYTHING!! | ||
+ | |||
+ | The plaintext password in this example is 'tGTqNUb'. | ||
+ | |||
+ | This is the password which I did put in the xmms-liveice plugin. | ||
+ | |||
+ | The 'YXjIENHpFiRV2' part is the crypted password set for all icecast access. | ||
+ | |||
+ | Again.. do not put any character behind this password, no comments, nothing or it will not work. | ||
+ | |||
+ | You can generate your own password with: | ||
+ | |||
+ | <pre> | ||
+ | makepasswd -crypt | ||
+ | </pre> | ||
+ | |||
+ | This will output a random password followed by the encrypted password. | ||
+ | |||
+ | Note: the default password 'hackme' also work donno, but only if you remove the -complete- ' # hackme' comment part. | ||
+ | |||
+ | Again restart your icecast-server, see command above. | ||
+ | |||
+ | '''xmms-liveice plugin settings''' | ||
+ | |||
+ | So at this stage you should have access to your icecast admin page and have an encrypted passwords setup :P | ||
+ | Now the last part, the xmms-liveice plugin. | ||
+ | For me xmms did crash many times before I did figure this out. | ||
+ | |||
+ | This is what I think made it work: | ||
+ | # Audio format tab | ||
+ | Be sure to fill in the 'Executable name:' field for lame e.g. /usr/bin/lame | ||
+ | (or where you did install lame) | ||
+ | # Server tab | ||
+ | For my experiment I used: | ||
+ | <pre> | ||
+ | Server address: 127.0.0.1 | ||
+ | Server port: 8000 | ||
+ | Encoder Password: tGTqNUb | ||
+ | check the 'Use x-Audiocast Headers checkbox | ||
+ | Fill in a Stream Mountpoint e.g.: /mystream.mp3 | ||
+ | </pre> | ||
+ | |||
+ | Ok now apply your settings and enable the plugin. | ||
+ | |||
+ | Start playing a playlist and check if you see your stream appear on the icecast admin page: | ||
+ | |||
+ | <pre> | ||
+ | http://127.0.0.1:8000/admin?mode=sources | ||
+ | </pre> | ||
+ | |||
+ | Note if the stream is there you should be able to connect to it (finally ;) | ||
+ | |||
+ | For my experiment I pointed a webbrowser on another Linux box on my network to: | ||
+ | |||
+ | http://192.168.2.5:8000/mystream.mp3 | ||
+ | |||
+ | '''The last step to your Kiss DP-558''' | ||
+ | |||
+ | If the above works, you can finally try to get your stream on your Kiss DP-558 player. | ||
+ | Startup your webbrowser and point it to: | ||
+ | |||
+ | http://<your_kiss_player_ip>/cgi-bin/shoutplay.cgi | ||
+ | |||
+ | Then click the "Play with cmdplayer" button. | ||
+ | |||
+ | Watch some messages going by and the stream should play :P | ||
+ | |||
+ | // The other button "Play with MediaPlayer" did not work for me. | ||
+ | |||
+ | // Ah I remember 1 last thing I have a firewall running on my box (192.168.2.5), so I had to enable access to port '8000' for my local network. | ||
+ | |||
+ | // Not all stuff is this hard on Linux. This 'icecast-server' is just an old package. The newer 'icecast2' package does install much better. But I could not make this new 'icecast2' server work with my Kiss DP-558 player. | ||
+ | |||
+ | == Howto: Samba mounting windows and linux shares == | ||
+ | I found an kiss compiled version of smbmount (from http://www.jacek.it.pl/kiss/smbfs/ ) | ||
+ | |||
+ | I tried it yesterday and managed to play files direct from my FreeBSB box without the need for any streaming server software. It works to windows shares too. | ||
+ | |||
+ | |||
+ | Make sure you have the stage2 firmware first (or you wont get past step 1) | ||
+ | |||
+ | To install : | ||
+ | |||
+ | # telnet into your kiss player | ||
+ | # cd /hdd/stage2/bin | ||
+ | # wget http://www.task10.com/kiss/smbmount.tar.gz | ||
+ | # tar xvzf smbmount.tar.gz | ||
+ | # rm smbmount.tar.gz | ||
+ | # You can easily edit the mount script by using the cgiscript supplied with the phase2 firmware | ||
+ | <pre> | ||
+ | http://<IP-Address>/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/bin/smbmnt.sh | ||
+ | </pre> | ||
+ | |||
+ | Make sure that you correct the following: | ||
+ | #the IP address | ||
+ | #the sharename | ||
+ | #the username | ||
+ | #the password | ||
+ | |||
+ | If you want to access a passwordless windows share use the following options | ||
+ | /hdd/stage2/bin/smbmount //192.168.0.1/share /hdd/video/mnt -o username=guest,guest | ||
+ | |||
+ | |||
+ | Add the following to the initscript | ||
+ | <pre> | ||
+ | http://<IP-Address>/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/initscript | ||
+ | |||
+ | /hdd/stage2/bin/smbmnt.sh | ||
+ | WAIT /bin/klcd SMBMNT | ||
+ | |||
+ | Reboot or run the following command, ignore all the errors... it still worked for me | ||
+ | /hdd/stage2/bin/smbmnt.sh | ||
+ | </pre> | ||
+ | |||
+ | To browse the files in your share just go into the menu, 2nd option down "Harddisk" the pick "Video files" and then go into "mnt" | ||
+ | |||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=6226&postdays=0&postorder=asc&highlight=log+debug&start=0 Discussion] | ||
+ | |||
+ | == Howto: smbclient with autoinstall (Stage2RF) == | ||
+ | |||
+ | install: | ||
+ | |||
+ | go to webconsole | ||
+ | click on update | ||
+ | click on update.cgi | ||
+ | type in "smbup" and press enter | ||
+ | create a mountpoint dir (for example type in "mkdir /hdd/stage2/mnt") | ||
+ | you need to insmod smbfs | ||
+ | (so type in "insmod smbfs" within telnet | ||
+ | |||
+ | the usage for smbmount is: | ||
+ | |||
+ | ./smbmount //192.168.20.2/public /hdd/stage2/mnt -o username=guest,password=pass | ||
+ | |||
+ | |||
+ | ==========================> here is the original part, needs update when stage2_rh is released | ||
+ | |||
+ | |||
+ | I found an kiss compiled version of smbmount (from [http://www.jacek.it.pl/kiss/smbfs/ here]) | ||
+ | |||
+ | I tried it yesterday and managed to play files direct from my FreeBSD box without the need for any streaming server software. It works windows shares too. | ||
+ | |||
+ | Make sure you have the stage2 firmware first (or you wont get past step 1) | ||
+ | |||
+ | To install: | ||
+ | |||
+ | <pre> | ||
+ | cd /hdd/stage2/bin | ||
+ | wget http://www.task10.com/kiss/smbmount.tar.gz | ||
+ | tar xvzf smbmount.tar.gz | ||
+ | rm smbmount.tar.gz | ||
+ | </pre> | ||
+ | |||
+ | You can easily edit the mount script by using the cgiscript supplied with the phase2 firmware: | ||
+ | |||
+ | *http://nnn.nnn.nnn.nnn/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/bin/smbmnt.sh | ||
+ | |||
+ | Make sure that you correct the following: | ||
+ | # IP address | ||
+ | # Sharename | ||
+ | # Username | ||
+ | # Password | ||
+ | |||
+ | If you want to access a passwordless windows share use the following options: | ||
+ | |||
+ | <pre> | ||
+ | /hdd/stage2/bin/smbmount //192.168.0.1/share /hdd/video/mnt -o username=guest,guest | ||
+ | </pre> | ||
+ | |||
+ | Add the following to the initscript (http://nnn.nnn.nnn.nnn/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/initscript): | ||
+ | |||
+ | <pre> | ||
+ | /hdd/stage2/bin/smbmnt.sh | ||
+ | WAIT /bin/klcd SMBMNT | ||
+ | </pre> | ||
+ | |||
+ | Cool reboot or run the following command, ignore all the errors... it still worked for me | ||
+ | |||
+ | <pre> | ||
+ | /hdd/stage2/bin/smbmnt.sh | ||
+ | </pre> | ||
+ | |||
+ | To browse the files in your share just go into the menu, 2nd option down "Harddisk" the pick "Video files" and then go into "mnt" | ||
+ | |||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=6226 Discussion] | ||
+ | |||
+ | == Howto: Change the FTPD == | ||
+ | |||
+ | <pre> | ||
+ | cd /hdd/stage2/bin | ||
+ | mv ftpd ftpd.org | ||
+ | wget http://url_to_server_with_ftpd/ftpd | ||
+ | chmod 777 ftpd | ||
+ | </pre> | ||
+ | |||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=6168 Discussion] | ||
+ | |||
+ | == Howto: FTP(Filezilla settings) == | ||
+ | |||
+ | You have to adjust/check this setting in Filezilla when transfering files: | ||
+ | # Edit, Settings | ||
+ | # File transfer settings | ||
+ | # ASCII/Binary, Default transfer type has to be BINARY!!! | ||
+ | |||
+ | == Howto: Basic CGI == | ||
+ | |||
+ | === Use Linux LF and not Windows CR+LF in your CGI scrips... === | ||
+ | |||
+ | Do you use Windows? Then maybe you will have a Windows vs Linux problem when you try your CGI scripts! | ||
+ | |||
+ | To see this "problem" for your self, do this: | ||
+ | # Copy the file ftp://<your-ip>/stage2/download.init to your Windows PC | ||
+ | # Open the file with Notepad | ||
+ | # Then you should see something like this: | ||
+ | <pre> | ||
+ | #!/bin/hush#□#□ stage2 initscript download first setup□/bin/lcd INIT... | ||
+ | </pre> | ||
+ | # The □ characters are [Enter] in Linux language (line feed = LF). | ||
+ | # You can not change them to a Windows [Enter] character (Carriage Return = CR plus a LF), then it will not work. | ||
+ | # If you write the CGI on your Windows PC, you need to convert the CRs+LFs (Windows) to LFs (Linux). | ||
+ | |||
+ | |||
+ | So then you can try one of these tricks: | ||
+ | # Copy and paste the □ from download.init and replace your normal Windows [Enter] | ||
+ | # Use Linux to write the file | ||
+ | # Download a editor that can convert Windows to Linux, e.g. [http://www.editpadpro.com/editpadlite.html Edit Pad Lite] (but I can not guarantee that it will not destroy your computer) can do this: | ||
+ | ## Open the Windows file | ||
+ | ## Choose the menu Convert - To UNIX (LF only) | ||
+ | ## Save the file | ||
+ | # Use [http://www.iconv.com/dos2unix.htm this] or [http://www.fileformat.info/convert/text/dos2unix.tr this] online converter. | ||
+ | # martinb: "I advise to use the internal editprogram > Just open your file (press the edit config link on the html menu and you know how this work) then simply delete all the lines and paste it from your "notepad" then it will work", e.g: | ||
+ | ## Put your file on the 558, e.g on /hdd/stage2/htmlroot/cgi/ (or where you like) | ||
+ | ## From your PC, surf to http://192.168.0.100/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/htmlroot/cgi/test.cgi (change the ip "192.168.0.100" to the IP of your 558 and change "/hdd/stage2/htmlroot/cgi/test.cgi" to the path and file you like to use) | ||
+ | ## Not 100% that this will work in Windows OS... | ||
+ | # The most common method for transferring files between systems is to use FTP (File Transfer Protocol). This is a communication program that allows data (files) to be transferred reliably between two systems. FTP has several types or modes of transferring files: Binary, Ascii and sometimes Auto. | ||
+ | ## ascii - When a file is transferred, CR/LF conversion will be performed on the file. This means files copied from Windows to Linux will have the CR character stripped so the remote copy will be in Linux text format. Files copied from Linux to Windows will have a CR inserted before each LF character so the destination copy will be in Windows text format. | ||
+ | ## binary - When a file is transferred, all data in the file is transferred unchanged. The source and destination files will be exact copies of each other. | ||
+ | ## Auto - This mode tries to determine if the file to be transferred is text (i.e. a script) or non-text (i.e. pdf, zip or raw data). How it determines this may be program dependent, some will look at the file contents and others will look at the file extension. If it determines it's text it uses ascii file transfer otherwise it used binary file transfer. Note: this method may not always work and could result in scripts being transferred in binary so no CR/LF conversion will be performed. So use with caution. | ||
+ | |||
+ | PS: Don't forget to do a "chmod 777 test.cgi" (change "test.cgi" to your filename) on your file, otherwise it will not work. | ||
+ | |||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=7942 Discussion] | ||
+ | |||
+ | |||
+ | Form more info about CGI: | ||
+ | *http://hoohoo.ncsa.uiuc.edu/cgi/ | ||
+ | |||
+ | === Test/use your own CGI === | ||
+ | |||
+ | To test/use your own CGI, do this: | ||
+ | # FTP the cgi file to stage2/htmlroot/cgi/ | ||
+ | # telnet to the kiss | ||
+ | # Do a "cd /hdd/stage2/htmlroot/cgi" | ||
+ | # type "chmod 777 filename.cgi" (this make the CGI executable) | ||
+ | |||
+ | === Execute commands with exec.cgi === | ||
+ | |||
+ | You can also use the command: http://ipkiss/cgi/exec.cgi if you want to execute command (I recommend to use the exec.cgi, its written in C and doesn't use much memory) | ||
+ | |||
+ | |||
+ | |||
+ | == Learn more about this firmware == | ||
+ | === uClinux === | ||
+ | uClinux 2.4.17 | ||
+ | |||
+ | Here you can read more info about [http://www.uclinux.org/index.html uClinux] | ||
+ | |||
+ | === UNIX for DOS users === | ||
+ | |||
+ | Maybe [http://www.yolinux.com/TUTORIALS/unix_for_dos_users.html this page] can help a little bit? But please be careful with delete and remove-functions! And not all commands listed are available on the DP-558! | ||
+ | |||
+ | === Handy/common commandline commands for linux === | ||
+ | |||
+ | This is a list of some handy/common recipes for the command line in Linux. | ||
+ | |||
+ | We can not use all commands (yet)....but I think it's handy | ||
+ | |||
+ | *http://www.pixelbeat.org/cmdline.html | ||
+ | |||
+ | === Crosscompiler === | ||
+ | |||
+ | If you want to install the crosscompiler I recommend these links | ||
+ | *http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=6150 | ||
+ | *http://www.uclinux.org/pub/uClinux/arm-elf-tools/ | ||
+ | *http://www.jacek.it.pl/kiss/index_en.html links | ||
+ | |||
+ | === Busybox === | ||
+ | busybox httpd/1.35 6-Oct-2004 | ||
+ | |||
+ | Have a look for the used [http://www.busybox.net/downloads/BusyBox.html busybox-commands]. But be aware, the implemented busybox-version is: | ||
+ | |||
+ | <pre> | ||
+ | / # busybox | ||
+ | BusyBox v1.00-pre3 (2005.05.28-19:13+0000) multi-call binary | ||
+ | |||
+ | Usage: busybox [function] [arguments]... | ||
+ | or: [function] [arguments]... | ||
+ | |||
+ | BusyBox is a multi-call binary that combines many common Unix | ||
+ | utilities into a single executable. Most people will create a | ||
+ | link to busybox for each function they wish to use, and BusyBox | ||
+ | will act like whatever it was invoked as. | ||
+ | |||
+ | Currently defined functions: | ||
+ | [, basename, bunzip2, busybox, bzcat, cat, chmod, cmp, cp, df, | ||
+ | dirname, dmesg, echo, egrep, env, expr, false, fgrep, free, ftpget, | ||
+ | ftpput, grep, gzip, hush, ifconfig, insmod, kill, killall, lash, | ||
+ | ln, ls, lsmod, makedevs, md5sum, mkdir, mknod, more, mount, mv, | ||
+ | ping, ps, realpath, rm, rmdir, rmmod, sh, sleep, strings, sync, | ||
+ | tar, telnetd, test, top, touch, true, umount, uptime, wc, wget, | ||
+ | which, yes | ||
+ | |||
+ | / # | ||
+ | </pre> | ||
+ | |||
+ | === Hush === | ||
+ | |||
+ | Hush is part of the [http://www.busybox.net/download.html busybox]. | ||
+ | |||
+ | In cvs we currently have lash, hush, msh, ash. For all size comparisons below, I am leaving BB_FEATURE_COMMAND_EDITING disabled. Enabling it will add about 8k to the size of each shell. | ||
+ | |||
+ | Also quite small (just 18k) and it has very complete Bourne shell grammar. It handles if/then/else/fi just fine, but doesn't handle loops like for/do/done or case/esac and such. It also currently has a problem with job control. | ||
+ | |||
+ | ===lash=== | ||
+ | Very small (adds just 10k) and quite usable as a command prompt, but it is not suitable for any but the most trivial scripting since it does not understand Bourne shell grammer. It does handle pipes, redirects, and job control though. Adding in command editing makes it quite nice as a command prompt. | ||
+ | |||
+ | ===msh=== | ||
+ | The minix shell (adds just 30k) is quite complete and handles things like for/do/done, case/esac and all the things you expect a Bourne shell to do. It is not always pedantically correct about Bourne shell grammar (try running the shell testscript, tests/sh.testcases, on it and compare vs bash), but for most things it works quite well. It also uses only vfork, so it can be used on uClinux systems. I just added this, so there is still room to shrink it further... | ||
+ | |||
+ | ===ash=== | ||
+ | This adds about 60k in the default configuration (I need to review vodz' latest update, perhaps he has made it smaller again) and is the most complete and most correct shell included with busybox. This was also recently added, and both Vladimir and I have been working on it. There are a number of configurable things at the top of ash.c as well. The Posix math stuff is currently disabled, but I intend to fix it up when I get some time. | ||
+ | |||
+ | *[http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=6163 Discussion] | ||
+ | |||
+ | --[[User:X3m|X3m]] 09:05, 29 June 2007 (CEST) |
Latest revision as of 15:37, 13 July 2012
Contents
- 1 Howto: Use fsck.cgi
- 2 Howto: Run fsck from shortcut on your PC with Tera Term 2
- 3 Howto: Set protection on Stage2
- 4 Howto: KiSS as remote player
- 5 Howto: Samba mounting windows and linux shares
- 6 Howto: smbclient with autoinstall (Stage2RF)
- 7 Howto: Change the FTPD
- 8 Howto: FTP(Filezilla settings)
- 9 Howto: Basic CGI
- 10 Learn more about this firmware
Howto: Use fsck.cgi
- Start your browser and use this address --> http://kiss_IP
- Go to the modules section and select e2fsck module
- In the E2FSCK MODULE you have to press link in the bottom of the page
- In the E2FSCK PREPARE you have to press on link in the bottom of the page
- It appear the html message its time to send me a PM
- Close your browser
- Telnet to kiss and use these commands:
cd systempart killall httpd killall ftpd umount /hdd ./fsck -x 32000 -X /systempart/bmcache -pvf /dev/discs/disc0/part2
After that all is done, reboot the player from the frontpanel
Howto: Run fsck from shortcut on your PC with Tera Term 2
I've made script that runs fsck on your kiss hdd. It runs via telnet with a program called Tera Term and its depending on the great Martin B FW with telnet and fsck.
To get this working you need:
- Tera Term 2.3 installed on your computer
- Fsck and reboot tools in your /systempart folder on your DP-558 (The tools can be copied from in /hdd/stage2/bin folder)
- A /systempart/bmcache folder on your DP-558
- A Tera Term macro/script file that runs fsck:
- Copy this to notepad and save it as a *.ttl file (eg fsck.ttl) replacing kiss-ip with the ip of your kiss:
show -1 connect 'kiss-ip' setdlgpos 200 200 statusbox 'Connecting to DP-558...' 'Kiss fsck' wait '/ #' statusbox 'Preparing fsck...' 'Kiss fsck' sendln 'cd /systempart' wait '/systempart #' sendln 'killall httpd' wait '/systempart #' sendln 'killall ftpd' wait '/systempart #' sendln 'umount /hdd' wait '/systempart #' sendln './fsck -x 32000 -X /systempart/bmcache -pvf /dev/discs/disc0/part2' statusbox 'Running fsck...' 'Kiss fsck' wait '/systempart #' sendln './reboot' statusbox 'Fsck finished, restarting DP-558...' 'Kiss fsck' Pause 5 closett
- you can leave out the closett at the end of the file if you want to leave the telnet window open - to enable you to see the output of the fsck
- A shortcut that starts the Tera Term macro/script file
- You start the script with ttpmacro.exe (found in the Tera Term install folder)
- Shortcut example: "c:\program files\ttermpro\ttpmacro.exe fsck.ttl"
Howto: Set protection on Stage2
TELNET / FTP
- Telnet to kiss
- Type in "passwd" so you set a password for root
- Test this password by typing in "login" and see if this work
- Add the following lines to inetd.conf to password protect FTP/TELNET:
ftp stream tcp nowait root /bin/ftpd ftpd -b -H -w -E telnet stream tcp nowait root /sbin/telnetd telnetd -l /hdd/stage2/bbox/login
HTTP / KML
When you protect HTTP, your local stage2 KML-page won't work !!!
To enable password protect HTTP, remove "protect/" from the first line and it should result in the following:
/:admin:admin
To make the changes active you have to restart the inetd. Type "top" to get the PID# of inetd Type kill -1 <PID # of inetd> to restart the service
Howto: KiSS as remote player
winamp
With this cgi you can stream whatever is playing on your PC's winamp to your KiSS player. Using the PC's mouse and life playlists makes listening to your audio finaly a pleasure (and your KiSS the promised media player).
What you need on you PC:
What you need on your KiSS:
- martinb stage2 firmware
- CGI code is already included as of stage2RF! (nothing to do here)
Using it (Do everything only on your PC, no need to turn on TV):
- Start winamp with DSP plugin (default port 8000, default password: changeme)
- Start the Shoutcast server
- Browse to http://kissip/cgi/shoutplay.cgi to start the KiSS media player. (Note: Nothing but the main menu will be visible on TV)
- Screenshot of Winamp/Shoutcast part
The interface is very basic, but so far worked fine for me. Suggestions improvements welcome, I can update the code.
Current issues:
- The kiSS mediaplayer stores 15 sec of music, therefore not really live.
- When nothing is being played, the connection stops, and has to be re-started once you are playing again.
xmms (Linux)
It took me some time to figure this out but the streaming also works on my Debian Linux box using the XMMS player.
Good change you can get this working on Ubuntu the same way.
First install the packages
icecast-server xmms xmms-liveice
The configuration files
In the /etc/icecast/ directory you find the icecast-server configuration files all with extension .dist.
Copy (or move) all those files -without- this extension to activate them
(you need to be root for this or use sudo):
# cp /etc/icecast/icecast.conf.dist /etc/icecast/icecast.conf
Do the same for the other files.
The access control horror
So you think you got it set up and now you can't get access to your icecast admin webpage.
For my workstation at internal IP 192.168.2.5 I did two things to make this work:
1) /etc/icecast/icecast.conf Lookup server_name part and edit as needed, note for this example I used my local workstation IP:
#hostname disabled port 8000 port 8001 server_name 192.168.2.5
2) /etc/hosts.allow Here I enabled access to the icecast 8000 port for my workstation (127.0.0.1) and my local network '192.168.2.*':
8000: 127.0.0.1 LOCAL : ALLOW 8000: 192.168.2.
Now restart your icecast server and try to access your admin page:
# /etc/init.d/icecast-server restart
and point your webbrowser to:
http://127.0.0.1:8000/admin
streaming.. & encrypted passwords sooo easy
Well if you know it -then- its easy the big amount of text in the configuration file '/etc/icecast/icecast.conf' is confusing.
Look up the 'Server passwords' part in the '/etc/icecast/icecast.conf' file.
This is what I used for my local experiment to get xmms-liveice to be able to connect to the icecast server:
# tGTqNUb YXjIENHpFiRV2 encoder_password YXjIENHpFiRV2 admin_password YXjIENHpFiRV2 oper_password YXjIENHpFiRV2
How does this work ?
- ) Most important REMOVE ALL CHARACTER AFTER THE PASSWORD, ALSO THE COMMENTS, EVERYTHING!!
The plaintext password in this example is 'tGTqNUb'.
This is the password which I did put in the xmms-liveice plugin.
The 'YXjIENHpFiRV2' part is the crypted password set for all icecast access.
Again.. do not put any character behind this password, no comments, nothing or it will not work.
You can generate your own password with:
makepasswd -crypt
This will output a random password followed by the encrypted password.
Note: the default password 'hackme' also work donno, but only if you remove the -complete- ' # hackme' comment part.
Again restart your icecast-server, see command above.
xmms-liveice plugin settings
So at this stage you should have access to your icecast admin page and have an encrypted passwords setup :P Now the last part, the xmms-liveice plugin. For me xmms did crash many times before I did figure this out.
This is what I think made it work:
- Audio format tab
Be sure to fill in the 'Executable name:' field for lame e.g. /usr/bin/lame (or where you did install lame)
- Server tab
For my experiment I used:
Server address: 127.0.0.1 Server port: 8000 Encoder Password: tGTqNUb check the 'Use x-Audiocast Headers checkbox Fill in a Stream Mountpoint e.g.: /mystream.mp3
Ok now apply your settings and enable the plugin.
Start playing a playlist and check if you see your stream appear on the icecast admin page:
http://127.0.0.1:8000/admin?mode=sources
Note if the stream is there you should be able to connect to it (finally ;)
For my experiment I pointed a webbrowser on another Linux box on my network to:
http://192.168.2.5:8000/mystream.mp3
The last step to your Kiss DP-558
If the above works, you can finally try to get your stream on your Kiss DP-558 player. Startup your webbrowser and point it to:
http://<your_kiss_player_ip>/cgi-bin/shoutplay.cgi
Then click the "Play with cmdplayer" button.
Watch some messages going by and the stream should play :P
// The other button "Play with MediaPlayer" did not work for me.
// Ah I remember 1 last thing I have a firewall running on my box (192.168.2.5), so I had to enable access to port '8000' for my local network.
// Not all stuff is this hard on Linux. This 'icecast-server' is just an old package. The newer 'icecast2' package does install much better. But I could not make this new 'icecast2' server work with my Kiss DP-558 player.
I found an kiss compiled version of smbmount (from http://www.jacek.it.pl/kiss/smbfs/ )
I tried it yesterday and managed to play files direct from my FreeBSB box without the need for any streaming server software. It works to windows shares too.
Make sure you have the stage2 firmware first (or you wont get past step 1)
To install :
- telnet into your kiss player
- cd /hdd/stage2/bin
- wget http://www.task10.com/kiss/smbmount.tar.gz
- tar xvzf smbmount.tar.gz
- rm smbmount.tar.gz
- You can easily edit the mount script by using the cgiscript supplied with the phase2 firmware
http://<IP-Address>/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/bin/smbmnt.sh
Make sure that you correct the following:
- the IP address
- the sharename
- the username
- the password
If you want to access a passwordless windows share use the following options /hdd/stage2/bin/smbmount //192.168.0.1/share /hdd/video/mnt -o username=guest,guest
Add the following to the initscript
http://<IP-Address>/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/initscript /hdd/stage2/bin/smbmnt.sh WAIT /bin/klcd SMBMNT Reboot or run the following command, ignore all the errors... it still worked for me /hdd/stage2/bin/smbmnt.sh
To browse the files in your share just go into the menu, 2nd option down "Harddisk" the pick "Video files" and then go into "mnt"
Howto: smbclient with autoinstall (Stage2RF)
install:
go to webconsole click on update click on update.cgi type in "smbup" and press enter create a mountpoint dir (for example type in "mkdir /hdd/stage2/mnt") you need to insmod smbfs (so type in "insmod smbfs" within telnet
the usage for smbmount is:
./smbmount //192.168.20.2/public /hdd/stage2/mnt -o username=guest,password=pass
==========================> here is the original part, needs update when stage2_rh is released
I found an kiss compiled version of smbmount (from here)
I tried it yesterday and managed to play files direct from my FreeBSD box without the need for any streaming server software. It works windows shares too.
Make sure you have the stage2 firmware first (or you wont get past step 1)
To install:
cd /hdd/stage2/bin wget http://www.task10.com/kiss/smbmount.tar.gz tar xvzf smbmount.tar.gz rm smbmount.tar.gz
You can easily edit the mount script by using the cgiscript supplied with the phase2 firmware:
Make sure that you correct the following:
- IP address
- Sharename
- Username
- Password
If you want to access a passwordless windows share use the following options:
/hdd/stage2/bin/smbmount //192.168.0.1/share /hdd/video/mnt -o username=guest,guest
Add the following to the initscript (http://nnn.nnn.nnn.nnn/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/initscript):
/hdd/stage2/bin/smbmnt.sh WAIT /bin/klcd SMBMNT
Cool reboot or run the following command, ignore all the errors... it still worked for me
/hdd/stage2/bin/smbmnt.sh
To browse the files in your share just go into the menu, 2nd option down "Harddisk" the pick "Video files" and then go into "mnt"
Howto: Change the FTPD
cd /hdd/stage2/bin mv ftpd ftpd.org wget http://url_to_server_with_ftpd/ftpd chmod 777 ftpd
Howto: FTP(Filezilla settings)
You have to adjust/check this setting in Filezilla when transfering files:
- Edit, Settings
- File transfer settings
- ASCII/Binary, Default transfer type has to be BINARY!!!
Howto: Basic CGI
Use Linux LF and not Windows CR+LF in your CGI scrips...
Do you use Windows? Then maybe you will have a Windows vs Linux problem when you try your CGI scripts!
To see this "problem" for your self, do this:
- Copy the file ftp://<your-ip>/stage2/download.init to your Windows PC
- Open the file with Notepad
- Then you should see something like this:
#!/bin/hush#□#□ stage2 initscript download first setup□/bin/lcd INIT...
- The □ characters are [Enter] in Linux language (line feed = LF).
- You can not change them to a Windows [Enter] character (Carriage Return = CR plus a LF), then it will not work.
- If you write the CGI on your Windows PC, you need to convert the CRs+LFs (Windows) to LFs (Linux).
So then you can try one of these tricks:
- Copy and paste the □ from download.init and replace your normal Windows [Enter]
- Use Linux to write the file
- Download a editor that can convert Windows to Linux, e.g. Edit Pad Lite (but I can not guarantee that it will not destroy your computer) can do this:
- Open the Windows file
- Choose the menu Convert - To UNIX (LF only)
- Save the file
- Use this or this online converter.
- martinb: "I advise to use the internal editprogram > Just open your file (press the edit config link on the html menu and you know how this work) then simply delete all the lines and paste it from your "notepad" then it will work", e.g:
- Put your file on the 558, e.g on /hdd/stage2/htmlroot/cgi/ (or where you like)
- From your PC, surf to http://192.168.0.100/cgi/edit.cgi?.submit=&action=open&filename=/hdd/stage2/htmlroot/cgi/test.cgi (change the ip "192.168.0.100" to the IP of your 558 and change "/hdd/stage2/htmlroot/cgi/test.cgi" to the path and file you like to use)
- Not 100% that this will work in Windows OS...
- The most common method for transferring files between systems is to use FTP (File Transfer Protocol). This is a communication program that allows data (files) to be transferred reliably between two systems. FTP has several types or modes of transferring files: Binary, Ascii and sometimes Auto.
- ascii - When a file is transferred, CR/LF conversion will be performed on the file. This means files copied from Windows to Linux will have the CR character stripped so the remote copy will be in Linux text format. Files copied from Linux to Windows will have a CR inserted before each LF character so the destination copy will be in Windows text format.
- binary - When a file is transferred, all data in the file is transferred unchanged. The source and destination files will be exact copies of each other.
- Auto - This mode tries to determine if the file to be transferred is text (i.e. a script) or non-text (i.e. pdf, zip or raw data). How it determines this may be program dependent, some will look at the file contents and others will look at the file extension. If it determines it's text it uses ascii file transfer otherwise it used binary file transfer. Note: this method may not always work and could result in scripts being transferred in binary so no CR/LF conversion will be performed. So use with caution.
PS: Don't forget to do a "chmod 777 test.cgi" (change "test.cgi" to your filename) on your file, otherwise it will not work.
Form more info about CGI:
Test/use your own CGI
To test/use your own CGI, do this:
- FTP the cgi file to stage2/htmlroot/cgi/
- telnet to the kiss
- Do a "cd /hdd/stage2/htmlroot/cgi"
- type "chmod 777 filename.cgi" (this make the CGI executable)
Execute commands with exec.cgi
You can also use the command: http://ipkiss/cgi/exec.cgi if you want to execute command (I recommend to use the exec.cgi, its written in C and doesn't use much memory)
Learn more about this firmware
uClinux
uClinux 2.4.17
Here you can read more info about uClinux
UNIX for DOS users
Maybe this page can help a little bit? But please be careful with delete and remove-functions! And not all commands listed are available on the DP-558!
Handy/common commandline commands for linux
This is a list of some handy/common recipes for the command line in Linux.
We can not use all commands (yet)....but I think it's handy
Crosscompiler
If you want to install the crosscompiler I recommend these links
- http://www.mpcclub.com/modules.php?name=Forums&file=viewtopic&t=6150
- http://www.uclinux.org/pub/uClinux/arm-elf-tools/
- http://www.jacek.it.pl/kiss/index_en.html links
Busybox
busybox httpd/1.35 6-Oct-2004
Have a look for the used busybox-commands. But be aware, the implemented busybox-version is:
/ # busybox BusyBox v1.00-pre3 (2005.05.28-19:13+0000) multi-call binary Usage: busybox [function] [arguments]... or: [function] [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use, and BusyBox will act like whatever it was invoked as. Currently defined functions: [, basename, bunzip2, busybox, bzcat, cat, chmod, cmp, cp, df, dirname, dmesg, echo, egrep, env, expr, false, fgrep, free, ftpget, ftpput, grep, gzip, hush, ifconfig, insmod, kill, killall, lash, ln, ls, lsmod, makedevs, md5sum, mkdir, mknod, more, mount, mv, ping, ps, realpath, rm, rmdir, rmmod, sh, sleep, strings, sync, tar, telnetd, test, top, touch, true, umount, uptime, wc, wget, which, yes / #
Hush
Hush is part of the busybox.
In cvs we currently have lash, hush, msh, ash. For all size comparisons below, I am leaving BB_FEATURE_COMMAND_EDITING disabled. Enabling it will add about 8k to the size of each shell.
Also quite small (just 18k) and it has very complete Bourne shell grammar. It handles if/then/else/fi just fine, but doesn't handle loops like for/do/done or case/esac and such. It also currently has a problem with job control.
lash
Very small (adds just 10k) and quite usable as a command prompt, but it is not suitable for any but the most trivial scripting since it does not understand Bourne shell grammer. It does handle pipes, redirects, and job control though. Adding in command editing makes it quite nice as a command prompt.
msh
The minix shell (adds just 30k) is quite complete and handles things like for/do/done, case/esac and all the things you expect a Bourne shell to do. It is not always pedantically correct about Bourne shell grammar (try running the shell testscript, tests/sh.testcases, on it and compare vs bash), but for most things it works quite well. It also uses only vfork, so it can be used on uClinux systems. I just added this, so there is still room to shrink it further...
ash
This adds about 60k in the default configuration (I need to review vodz' latest update, perhaps he has made it smaller again) and is the most complete and most correct shell included with busybox. This was also recently added, and both Vladimir and I have been working on it. There are a number of configurable things at the top of ash.c as well. The Posix math stuff is currently disabled, but I intend to fix it up when I get some time.
--X3m 09:05, 29 June 2007 (CEST)