Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Dec 2014, 02:33
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Embedded Puppy controls ethernet camera, records on USB
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
QLeap


Joined: 07 Feb 2007
Posts: 6

PostPosted: Sat 22 Sep 2007, 00:36    Post subject:  Embedded Puppy controls ethernet camera, records on USB
Subject description: Does not always boot into X after power failure. Reward for solution
 

We are using Puppy Linux in an embedded mode on an e-Box 2300. The e-Box acts as an FTP server (running pureFTP) capturing images coming from an Ethernet camera. Custom software performs three basic functions:

1) Controls the camera by issuing commands.
2) Recording data from a USB GPS device
3) Moves images from CF memory to a USB memory stick

The software is written, but we are facing several technical issues that need to be resolved to successful run the software.

The e-Box runs as an embedded computer with no monitor, keyboard or mouse. Power can be cut to the e-Box at any time. In order to save data (images & GPS) we need to write it to the USB memory stick. We have observed, since power can be cut at any time, that we cannot store data on the bootable CF since Puppy seems to only preserve its file system when properly shutdown.

Another effect of unexpectedly cutting power is that Puppy does not always boot X-Windows. Our custom software start-up scripts are in /root/.xinitrc and when X-Windows doesn't boot, our software doesn't start.

We've tried putting the start-up scripts in /etc/rc.d/rc.local, however, software run from that file does not mount the USB memory stick.

We are looking for a Puppy Linux expert that can help us configure the OS so our software reliably runs upon after power-offs and boot-ups. We have recently won a contract to deliver an alpha system based on the e-Box and can pay for your expertise and consulting services.

Please contact me at jobs@EstrellaVerdeTechnology.com if you'd like to help.
Back to top
View user's profile Send private message 
richard.a


Joined: 15 Aug 2006
Posts: 510
Location: Adelaide, South Australia

PostPosted: Thu 04 Oct 2007, 08:39    Post subject:  

I'm wondering if the problem is related to filesystem damage and/or corruption when the power goes off - what you might call an improper shutdown?

It will probably run e2fsk (the e2 filesystem check-and-repair utility) but I have a gut feeling that it will stop at the prompt automatically at that point, not running X.

I have seen this identical situation many times on copying a pup_save.2fs or pup_save.3fs file to create a backup to do experimental work on a known configuration. The first time you boot to it, it tells you that it crashed last time you ran it, and asks you if you want to run Xorgwizard again.

I'm not the right person to ask to help you troubleshoot it, but that info may be enough to get a guru to scratch their heads and work a solution out for you Smile

Best of luck, mate,

Richard in Oz

_________________
Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?


Back to top
View user's profile Send private message 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Thu 04 Oct 2007, 15:35    Post subject: Re: Embedded Puppy controls ethernet camera, records on USB
Subject description: Does not always boot into X after power failure. Reward for solution
 

QLeap wrote:
Another effect of unexpectedly cutting power is that Puppy does not always boot X-Windows. Our custom software start-up scripts are in /root/.xinitrc and when X-Windows doesn't boot, our software doesn't start.
This is a feature, it is designed to stop a crash - reboot - crash... cycle if an invalid xorg.conf causes a crash, though its not very helpful in your situation.

There is a flag file /etc.XLOADED that only gets reset when X is shutdown properly. When xwin runs on boot it checks for the present of this file and reads its contents.

Your problem should be solved by simply adding
rm -f /etc/.XLOADED
to rc.local

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Thu 04 Oct 2007, 22:14    Post subject:  

Actually, we already worked this out. Starting X wasn't even needed, but the USB was only working right after running .xinitrc. He got that fixed with Raffy's help. Then I told him how to force the tmpfs to be copied whenever he wants, so it could be run whenever data needs to be "insured".

I don't know if I'm allowed to reveal what the project is about, but it's pretty cool Smile

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Thu 04 Oct 2007, 22:34    Post subject:  

Pizzasgood wrote:
Actually, we already worked this out.
And I hope you received your reward. Other than knowing that you did good Wink

This is the way Open Source can be self sustainable.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Thu 04 Oct 2007, 23:27    Post subject:  

Yep. I would have gotten more, but I was pretty busy (two tests that week) so Raffy beat me to the USB fix (something about running delayedrun and sleeping afterwards).

Oh well Smile

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
raffy

Joined: 25 May 2005
Posts: 4798
Location: Manila

PostPosted: Fri 05 Oct 2007, 09:31    Post subject: lots of possibilities  

Hey, so Pizza responded to the call. I had no idea that other members responded to this. Smile

His system has a number of possible improvements, for example, the use of ext2 partition in the CF drive, but in the end, what was important to him was preventing the loading of the X server.

It was quite frustrating for him, as all forum advice told him that X was not needed to mount the USB, but in 2.13, USB detection had been transferred to .xinitrc, placed in another file named "delayedrun".

_________________
Puppy user since Oct 2004. Want FreeOffice? Get the sfs (English only).
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Fri 02 Nov 2007, 00:19    Post subject: restarting X  

Hi there, glad to see puppy being used in some more commercial projects.

With regards to starting X I believe I may have (been helped considerably to) come up with a solution, have a look here and in the links within that post. I seem to think however that when puppy is booted with no monitor, it seems to think there is a different monitor plugged in and re-runs the xorgwizard at bootup. You might try starting the computer with no monitor and waiting until the bootup script has computed (IDE drive light has stopped blinking), then plugging in the monitor and setting up the monitor, that way the auto-hardware detect/profiler will automatically load that monitor when it detects there isnt one present from then on. You can use the same pup_save file to transfer between machines. Your best bet might be to hack the xorgwizard script to always use xvesa as I think this works for almost every monitor/card setup.

With regards to writing to a flash drive, you may find that as a solution this doesnt work well as, unless you have a very expensive flash drive, flash drives only have the capacity for a limited number of writes. If you are working with intruder systems then you will obviously be concerned with the computer capturing the last image before whoever it is cuts the power lines? You might be better off with a small laptop hard disk attached to a USB caddy, or possible even one of these. I own one and its been great so far. Pretty good price per gigabyte too.

Another script you might want to take a look at (recently discovered) is the /etc/sbin/savepuppyd. This handles the automatic saving of data onto flash, but like I say you may be better off with a micro hard drive.

Its also possible, with a web connection to "monitor" the camera by setting up a simple http (read web) server, that way with the correct permissions a person can log into the machine and view the camera.

Interesting project, let me know if I can be of any help. Great Britain (where Im from) apparently has half of the worlds cameras!

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Sat 03 Nov 2007, 00:26    Post subject:  

Actually, the power being cut refers to the operator cutting the power, not a crook. Actually, given how this is going to be used it would be very entertaining to watch a crook attempting to disable the device, without not doing what he wanted to avoid being recorded doing. Laughing

If I understood everything correctly, there isn't even a way for the user to turn it off nicely, short of bringing his own keyboard and jacking in. Otherwise, I assume it's wired through a standard toggle switch that you just flip. Either that, or the current dies automatically when the engine turns off.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Sat 03 Nov 2007, 12:08    Post subject:  

here is some info about converting a pup_save.2fs file into ext3 format, ext3 has better handling of power cuts?
_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Sun 04 Nov 2007, 00:28    Post subject:  

Well, it's running in mode 13, which means that the drive is only written to periodically. Then it was customized so that whenever it takes a picture it forces the drive to update. So theoretically there shouldn't be any issues unless it's turned off right after taking a picture, during the writing process.

Ext3 wouldn't hurt though.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1136s ][ Queries: 11 (0.0312s) ][ GZIP on ]