• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: 1 [2] 3 4
16  Linux Stuff / General Linux questions / Re: mjpg-streamer works for port 8080 but not html files on: February 12, 2013, 08:37:59 PM
I re-read the documentation.  It seems that the module output_http.so is a simple web server.  Using the option
" -w /var/www " when invoking the command serves the contents of the folder (using port 80?).  Using the option
" -p 8080" serves the webcam on port 8080.

None of the online docs I saw mentions how to integrate with an existing webserver like lighttpd or apache beyond
using http://<guruplug-ip>:8080/?action=stream

This works but I have more to learn about how to implement this so that I can see the feed remotely.  Opening port 8080
on my router firewall is possible, but I want to make sure I don't expose a vulnerability.
17  Linux Stuff / General Linux questions / Re: mjpg-streamer works for port 8080 but not html files on: February 09, 2013, 05:25:38 PM
What do they show?
The sample pages show text and graphics but blank boxes where the webcam snapshots or streaming should be

What does get returned?
Not sure I understand the question.  There is no video snapshot or stream.

Here is the description from the sample page
The image displayed here was grabbed by the input plugin. The HTTP request contains the GET parameters action=snapshot. This requests one single picture from the image-input. To display another example, just click on the picture.

The link for the image is

What browser are you using?

Iceweasel and Firefox

Have you used an HTTP headers extension to see what that reckons?

GET /?action=snapshot HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
If-Modified-Since: Sun, 03 Feb 2013 02:35:09 GMT
If-None-Match: "3995104888"

HTTP/1.1 304 Not Modified
Vary: Accept-Encoding
Content-Type: text/html
Last-Modified: Sun, 03 Feb 2013 02:35:09 GMT
Etag: "3995104888"
Date: Sat, 09 Feb 2013 23:25:26 GMT
Server: lighttpd/1.4.31
18  Linux Stuff / General Linux questions / Re: mjpg-streamer works for port 8080 but not html files on: February 06, 2013, 07:07:54 PM
I apologize for confusing everyone.  Let's remove SSL and port 443 from the discussion of the problem.

I modified my lighttpd.conf to allow connections to port 80 without password protection to test the setup.  The mjpg-
streamer demo pages still don't show video (using ) and I have checked paths, permissions
and log files with no hint of what is wrong.  I can see all of the html pages in my /var/www folder.

I also use the -p:8080 option for the http_output plugin and can see the video feed via that port so the webcam, V4L USB, etc.
are OK.  I prefer not to have to redirect ports when I connect to my server from outside.  It also bugs me that I can't figure out
what is wrong.
19  Linux Stuff / General Linux questions / mjpg-streamer works for port 8080 but not html files on: February 05, 2013, 06:56:27 PM
I compiled mjpg-streamer from source on a Wheezy install on my Server plus

Previously, I had this package running on Lenny and Squeeze with no problems.

Now, I follow the instructions here http://skillfulness.blogspot.com/2010/03/mjpg-streamer-documentation.html
but can't get the demo pages
to show webcam video but accessing the port
does work.

I am using port 443 (outside and inside my network) since my ISP blocks port 80.  From my internal network I can access the 8080 port by http
but when I enter the same address with https I get an error
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)

My lighttpd.conf looks like this

server.modules = (
#       "mod_rewrite",

server.document-root        = "/var/www"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
#server.port                 = 80

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm",
                                "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " #+ server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

fastcgi.server = ( ".php" => ((
                     "bin-path" => "/usr/bin/php5-cgi",
                     "socket" => "/tmp/php.socket"

dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"

$SERVER["socket"] == ":443" {
    ssl.engine                  = "enable"
    ssl.pemfile                 = "/root/certificate/server.pem"
    ssl.ca-file                 = "/root/certificate/server.crt"
## type of backend
# plain, htpasswd, ldap or htdigest
auth.debug = 2
auth.backend = "plain"
# filename of the password storage for plain
auth.backend.plain.userfile = "/etc/lighttpd/.lighttpdpassword"
## debugging
# 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
auth.require = ( "/" =>
"method" => "basic",
"realm" => "Password protected area",
"require" => "valid-user"

I have the mjpg-streamer provided sample html files in /var/www/mjpg-streamer and I invoke the binary with
/root/mjpg-streamer/mjpg_streamer -i "/root/mjpg-streamer/input_uvc.so" -o "/root/mjpg-streamer/output_http.so -p 8080 -w /var/www/mjpg-streamer"

I can see the html but not the video images.  Something is blocking video over https or is the directory the problem?  I chown www-data:www-data all of the html files.
20  Hardware and U-Boot firmware / Hardware / Re: another corrupted microSD? on: January 25, 2013, 08:25:09 PM
This is just a guess.

I used a Debian Squeeze installer for the new microSD and it partitioned swap space. My
previous uSD had Lenny without swap- that uSD lasted almost two years.

Perhaps NAND chips shouldn't have a swap partition?  I'm not using the plug for anything
that requires a lot of swap.  I shouldn't have just accepted the defaults.

Another possibility: Some posts I saw on the web claim there are counterfeit low-quality
uSD chips on the market. 

I decided to install Wheezy to an external eSATA drive.  So far it seems much more responsive
than the uSD.  At least it is easier to remember the steps I took to customize the system
after only three months.
21  Hardware and U-Boot firmware / Hardware / Re: another corrupted microSD? on: January 22, 2013, 07:09:03 PM
It looks like this is a lost cause. 

Here is the partition table

# fdisk -l /dev/sdc

Disk /dev/sdc: 3980 MB, 3980394496 bytes
123 heads, 62 sectors/track, 1019 cylinders
Units = cylinders of 7626 * 512 = 3904512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00087719

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          59      220160   83  Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 32, 33) logical=(0, 33, 3)
Partition 1 has different physical/logical endings:
     phys=(27, 136, 45) logical=(58, 0, 60)
Partition 1 does not end on cylinder boundary.
/dev/sdc2              59         962     3443712   83  Linux
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(27, 136, 46) logical=(58, 0, 61)
Partition 2 has different physical/logical endings:
     phys=(456, 65, 57) logical=(961, 19, 28)
Partition 2 does not end on cylinder boundary.
/dev/sdc3             962        1020      220161    5  Extended
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(456, 98, 25) logical=(961, 52, 29)
Partition 3 has different physical/logical endings:
     phys=(483, 202, 39) logical=(1019, 20, 26)
Partition 3 does not end on cylinder boundary.
/dev/sdc5             962        1020      220160   82  Linux swap / Solaris

When I mount the microSD I see

# du -sm  /media/image/
du: cannot access `/media/image/usr/share/man/man2/io_getevents.2.gz': Input/output error
du: cannot access `/media/image/usr/src/linux-headers-2.6.32-5-common/include/rdma': Input/output error
du: cannot access `/media/image/usr/src/linux-headers-2.6.32-5-common/include/linux/patchkey.h': Input/output error
du: cannot access `/media/image/usr/src/linux-headers-2.6.32-5-common/include/net/ipcomp.h': Input/output error
du: cannot access `/media/image/usr/src/linux-headers-2.6.32-5-common/include/asm-generic/mman-common.h': Input/output error
du: cannot access `/media/image/usr/src/linux-headers-2.6.32-5-common/include/video/mbxfb.h': Input/output error
du: cannot access `/media/image/usr/src/linux-headers-2.6.32-5-kirkwood/include/config/smsc': Input/output error
du: cannot access `/media/image/usr/src/linux-headers-2.6.32-5-kirkwood/include/config/snd/mona.h': Input/output error
138759609   /media/image/

Is the Guruplug destroying the MicroSD chips?   Anyone else have this problem?
22  Hardware and U-Boot firmware / Hardware / another corrupted microSD? on: January 22, 2013, 06:43:11 PM
Three months ago I replaced the 4GB microSD that came with my Gurplug Server Plus.  I installed the root fs on it and it
ran over a year until I kept getting I/O errors and it became unbootable.

I bought a Kingston 4GB card three months ago to replace the original and had a hard time recovering many of my files
from the original.  The new one is ext2 and I used instructions on the web to install Squeeze.

Now I can't ssh into the plug and when I use the JTAG I get weird errors about the shell interpreter.  I tried restarting the
ssh service and got a "file not found" error when I can see the file.  I removed the microSD and using a USB adapter I
try to fsck it and get

# fsck -a /dev/sdc
fsck from util-linux-ng 2.17.2
fsck.ext2: No medium found while trying to open /dev/sdc
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

I can see partitions.

[ 3751.484994] usb-storage: device scan complete
[ 3751.485778] scsi 5:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0272 PQ: 0 ANSI: 0
[ 3751.486402] sd 5:0:0:0: Attached scsi generic sg3 type 0
[ 3751.839501] sd 5:0:0:0: [sdc] 7774208 512-byte logical blocks: (3.98 GB/3.70 GiB)
[ 3751.840624] sd 5:0:0:0: [sdc] Write Protect is off
[ 3751.840633] sd 5:0:0:0: [sdc] Mode Sense: 0b 00 00 08
[ 3751.840638] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[ 3751.843365] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[ 3751.843372]  sdc: sdc1 sdc2 sdc3 < sdc5 >
[ 3751.849510] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[ 3751.849519] sd 5:0:0:0: [sdc] Attached SCSI removable disk

Is this microSD trash or is there hope of repairing it?  Anyone else having problems?

I have an older generation plug and have heavily modified it to deal with heat.
Removed internal power supply and now have external one.  Heatsinks on chips and
external fan that blows air over heatsinks.

23  Hardware and U-Boot firmware / U-Boot stuff / SOLVED: new uboot doesn't load from MicroSD on: October 30, 2012, 07:42:02 PM
When I ran usb tree, my SD showed up as number 3 and that was what I was mistakenly using.

This is what I should have done:

Marvell>> usb devices

USB device 0: Vendor: Generic  Rev: 9909 Prod: STORAGE DEVICE 
            Type: Removable Hard Disk
            Capacity: not available
Marvell>> usb partitions
## Unknown partition table

Partition Map for USB device 1  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1                 2048          440320      83
    2               442368         6887424      83
    3              7331838          440322       5 Extd
    5              7331840          440320      82

Partition Map for USB device 2  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1               625088       124679744       c

Device 1 is the SD card and device 2 is a usb stick

So I changed the device number to 1 and now the guruplug boots up.

bootcmd_usb=usb start; ext2load usb 1:1 0x00800000 /uImage; ext2load usb 1:1 0x01100000 /uInitrd
24  Hardware and U-Boot firmware / U-Boot stuff / new uboot doesn't load from MicroSD on: October 30, 2012, 06:44:54 PM
I looked at other posts describing problems with the DENX uboot and microSD but I see something different
when I try installing on my Guruplug Server Plus.  I had a previous version of uboot load from a microSD but
had to replace due to I/O errors corrupting it.

I followed these instructions to install Debian Squeeze on a new microSD


Everything went well until I tried booting from the new SD.  I tried both a USB boot and the SD instructions.

U-Boot 2011.12 (Mar 11 2012 - 18:53:15)

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... Device NOT ready
   Request Sense returned 02 3A 00
2 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

bootcmd=setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x00800000 0x01100000
bootcmd_mmc=mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd
bootcmd_usb=usb start; ext2load usb 0:1 0x00800000 /uImage; ext2load usb 0:1 0x01100000 /uInitrd
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
x_bootcmd_usb=usb start

I tried both usb and SD (it was unclear from the instructions whether Guruplug always sees SD as USB or just during install).

I don't understand why mmc init isn't in uboot help menu and I get "command not recognized."
25  General Category / General Discussion / undelete for Marvell 88F682X on: July 16, 2012, 07:30:54 PM
I accidentally deleted some mp3 files.  I searched for an undelete utility on the web and came across this

There is a binary version for
Marvell 88F628x Linux 2.6.32 Synology DS111, DS211, DS212+ NAS
When I untarred and tried to use it on my Guruplug Server plus, I get a permission denied error even though I
chmod a+x the binaries.  It is installed on a vfat formatted external usb.  I have a kernel but the error
suggests this is not the conflict.

Any ideas?
26  General Category / General Discussion / Re: Video Streaming - Dreamplug on: July 14, 2012, 07:11:58 AM

Try this http://tldp.org/HOWTO/Webcam-HOWTO/framegrabbers.html
or this https://www.linux.com/news/hardware/peripherals/8211-five-fun-ways-to-use-a-linux-webcam/
I don't have an IP camera and I don't know if these solutions will work with one.

I have a Guruplug server plus with the default Debian Lenny and a usb camera. I use this package
http://code.google.com/p/mjpg-streamer-mini2440/downloads/detail?name=mjpg-streamer-mini2440-bin-libjpeg62.tar.gz&can=4&q= to provide live video.  The mjpg streamer package from other sources are built against a different version of libjpeg from what is on the Guruplug.  If you have a usb camera you could use a shell script to grab images with this package.
27  General Category / General Discussion / photo album with external storage on: July 09, 2012, 07:00:17 PM
I have a Guruplug Server plus with the filesystem on  a 4GB microSD and have 64GB USB stick
mounted as vfat.

I set up the default Plogger photoalbum and everything seemed fine- I could upload pictures and
create albums.  I tried to move the folders for photos to the USB stick and leave symlinks to them
in the /var/www tree.  Now Plogger shows a mostly blank screen for the main page. Admin login shows
the filenames but the thumbnails are broken and  albums are blank. I moved the jpgs back to
/var/www but the page is still blank.

I tried a new install (RC1.0) from the Plogger website but get a php error

Notice: Undefined index: resize_option in /var/www/plogger/plog-load-config.php on line 138

It looks like there is no longer development of the Plogger project so I am giving up on it.

I found another app that looks equivalent:

Before I set up the mysql account and configure it, is there a way to have all of the large files for the picture
on the USB stick?  Since it is vfat, I know there are some permission issues.  I have it mounted like so:

LABEL=USB20FD   /media/usb0     vfat    rw,noexec,nodev,async,noatime,nodiratime,gid=33,umask=000 0 0
28  Linux Stuff / Kernel / updated patch for stable wifi client? on: September 05, 2011, 07:30:24 PM
I have a very stable (but slow) wireless client plug using the binaries distributed here http://www.plugcomputer.org/plugwiki/index.php/Setting_GuruPlug_to_be_a_stable_WiFi_Client

I came across this posting https://gist.github.com/961478.

Does it look like this patch could address the problems described here?

I would like to try a recent kernel on the plug to see if the slow data transfer improves.
29  Hardware and U-Boot firmware / U-Boot stuff / Re: plug does not boot when unattended, boot fine w/ console on: September 05, 2011, 07:03:36 PM
I have a similar problem.  If my plug loses power, it will hang at the Marvell prompt and I need to connect with serial terminal and issue a command to boot it.

It hangs with this error:
uap_sdio: probe of mmc0:0001:1 failed with error -1

I upgraded u-boot and have it boot from an SD card using the instructions from popon here


I would like to try adding the mmcinit commands but I can't figure out how to pass them to u-boot

Here is my configuration:
Marvell>> version
U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41)

Marvell>> printenv
bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
x_bootcmd_usb=usb start
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
bootargs=console=ttyS0,115200 root=0811 rootdelay=10
x_bootargs_root=ubi.mtd=2 root=0811 rootdelay=10

According to this tutorial http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html, should I have a bootcmd_mmc

setenv bootargs_console console=ttyS0,115200
setenv bootargs_root 'root=/dev/mmcblk0p2'
setenv bootcmd_mmc 'mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_mmc; bootm 0x00800000 0x01100000'

Could someone write out the steps to amend the mmcinit command to u-boot? 

Based on the original instructions that worked for me I would do this:

Marvell>> editenv x_bootargs_root
edit: ubi.mtd=2 root=0811 mmcinit mmcinit rootdelay=10
Marvell>> saveenv

30  Hardware and U-Boot firmware / Hardware / Re: eSATA drive success anyone? on: August 23, 2011, 06:58:13 PM
I changed the mount options suggested (actually I tried it with sync and got 4.9MB/sec)

When I changed the suggestion to async I get

# umount /dev/sdc1

# mount -o rw,noexec,nodev,async,noatime,nodiratime /dev/sdc1 /media/usb1

# time dd if=/dev/zero of=/media/usb1/test bs=1M count=40
40+0 records in
40+0 records out
41943040 bytes (42 MB) copied, 0.320133 s, 131 MB/s

real    0m0.449s
user    0m0.000s
sys     0m0.320s

That's more like it! 

Now to get udev to not mount the drive with the default settings.

If I understand correctly, external drives don't spin up fast enough for fstab to mount
them so they get mounted with the udev rules for external drives.
Pages: 1 [2] 3 4