PVC2300 - Alternative to Motion Detection Event / FTP Upload

Hi Cisco Community,
My apologies if I am not posting this in the correct section / allowed to post here.
I've got a PVC2300 mounted inside a pelco enclosure that is positioned 6 meters high. Sometimes the motion detection event doesn't work to well (this is due to the fact that its in an enclosure and pointed out towards the ocean at a beach location).
Also the motion detection event is pretty much useless at night without surrounding illumination.
In Australia we also have severe lack of broadband speed and also download allowance, therefore it is not practical to broadcast streaming video (we would get charged excessive fees for exceeding download quotas and only one person could view the camera at any one time).
I've written a custom windows service that reads the PVC2300's MJPEG stream over http at a specified interval and saves a single .JPG file in which the windows service uploads the .JPG file to a specified website. This means that you will always get an updated image from the camera every 5 minutes, rather than based on motion detection. It would have been nice if cisco / linksys implemented this within the camera's firmware (maybe in a future version?).
Anyway, communities share things with each other, so i've made the software freely available to anyone who wishes to use it. I would appreciate any feedback from Cisco / Linksys.
http://www.airbiscuit.com.au/pvc2300-service.html - PVC2300 Windows Service
http://www.airbiscuit.com.au/camera.aspx - The actual PVC2300 in operation
Regards,
David Zielinski

You came to the right place and thats a very cool post IMO.
First, thanks for using Cisco Small Business products and you can look forward enhancements and options in our line, of course.  I think I noticed your other post mentioning you are in Australia?  We have a few really top BU folks (TMEs and Biz Dev) down under and they are very active in the BU solutions area for Small Business.   Do you know Leah Davis and Dave Harper (they are Participants on this community as well)? 
In any event, I think compressed streaming is a very valid design idea and we are actually looking at similar partners in the US experimenting with the same.  In one Partners case he has a lightweight application (java) that runs on your mobile and allows all the mobile streams to come compressed from a server farm.
Typical use case is a Day Care where 15 parents want to watch the same camera, and the compression benefit becomes crucial in scale.   But your case is a financial one (therefore good too) where you would have to pay for streaming video. 
While we dont offer this today (the external managed service that is), I am sure you have played with the camera GUI and realize you can try some of the following to reduce bandwidth
1- lower quality of video (resolution, FPS, illuminate Audio, etc)
2- reduce motion detection size (seconds)
3- Purchase a local NSS2100 or NSS3x00 to store High Quality video on the LAN and only alert for motion via email (not realy friendly for remote monitoring I admit).
For sensitivity in an enclosure, have you played with Sensitivity settings thresholds in the Camera GUI under motion detection?
For night illumination without an external IR Illuminator, have you tried the 'night schedule', which activates (or deactivates) the IR Cut Filter?
For the periodic updates, I'll let Davin Oishi comment as he is about ready to announce the PVC300 and I know it offers a browser based periodic refresh and I am not sure how far he has extended that to an API for external access.....
Thanks for your post
Steve DiStefano
Systems Engineer in the US field channel
RTP, N.C.

Similar Messages

  • PVC2300: Motion detect. suddenly not working

    Hi!
    Installed a PVC2300 last week, and everything was working well. But after adjusting its possition a bit this morning, the motion detection has stopped working.
    Feel like I've tried everything to get it working again. Tried several changes in the settings, adjusting the threshold, reinstall the newest firmware (v.1.1.0), restore to factory settings, deleting stored videos, changing to full screen detection, but still no luck.
    The camera is monitoring an open area. A person can walk across the area and not beeing detected by the camera, but sometimes records sequences where nothing happens.
    Any idea?

    Wow, that was alot of work to try to determine the cause.  I was thinking something like light in the new position (especailly cause you say its recording when nothing happens).   Can you try positioning it in the original position and see if it works better in that environment? 
    Do you use the camera GUI itself to paint the windows with sensitivity thresholds for motion detection using Internet Explorer with ActiveX?
    Do you notice anything in the LOG file of the camera when there is motion that meets the criteria you set (it should always say motion detected and then FTP or HTTP or FTP  logs depending on where you send the motion clips) itself.
    Steve

  • Pvc2300: false positive with motion detection

    Hello!
    I bought 3 pvc 2300 cameras. I tried motion detection with camera's software and with "Active webcam" software and I received a lot of false positive mails.
    1. with camera's software, I set event with motion detection & sent mail, but I receive a lot of mail when there isn't motion (I saw registrations and images)
    2. with Active WebCam software I use Linksys cameras and Panasonic Cameras. With Panasonic cameras all is ok. With Linksys cameras, about every hours there is a black frame, so I receive a mail from motion detection. Black frame arrive about every hours, after 60 minutes from last black frame. That is very strange!
    I changed sensitivity, check frequency, number of frame at second, but I have same problem.
    Can you help me?
    Thanks
    Mary

    I have 2 Panasonic cameras too and I need one software to manage all cameras.
    sensitivity: on active webcam software, I changed sensitivity of motion detection
    frequency check: on active webcam software, I changed from check motion every 0,1 second to every 5 seconds
    number of frame: on Linksys software I changed Max Frame Rate from 15 fps to 6 fps.

  • WVC210 Motion detection.

    Hello again.
    I can't switch off the motion detection using the push-button on web page (see pic). It's works fine (I receive the intrusion file by e-mail) but when I click on pulse, the motion detection don't stop the service.
    Please, help me!!
    Tks.

    Hi Paolo,
    I have a WVC210 and took a peek at this when I saw your post.
    I am actually running motion detection from the FREE SWVMS16 on a separate PC and also streaming FTP motion detection from the camera to an NSS, because as you probably observed, the email file attachments are alot and cost money (since they are so big) if they come to your mobile :-(
    So just wanted to mention that that to me is the prefered way to manage up to 16 cameras and can be used remotely as well (just beware of the WAN bandwidth requirements).
    But that button with the pulsing man on it.   That button really only is used"to have the camera moved to the  previously defined Motion Detection area" per the on line help.
    As you probably learned, to enable and disable motion detection, you have to switch focus to a different screen.
    But the SWVMS16 has this button as you require.  Where you can see the cameras and can enable/disable, while watching them all.
    perhaps you should try this (again, its free).  You download it from the same place you find camera Firmware.
    let me know what you think?
    Steve D

  • Motion Detection on Linksys WVC54GCA

    Sorry if this is in the wrong section.
    I would appreciate if someone could help me with this.
    I am trying to configure this camera to record onto my network drive via FTP on a schedule - for example  9 - 5 each day.
    Can recording be done based on these entered times or does motion have to be detected?
    I have copied a screenshot of my settings at below url:
    http://img23.imageshack.us/img23/15/settingsr.jpg
    I have tried with passive mode enabled and disable and tried recording with a shorter internal between start and end times.
    FTP credentials are correct, along with IP. I can access both locally and via the internet.
    Thanks for your help.

    The motion detection should be enable and the motion will be detected with-in the specified period of time.

  • Problems With FTP Upload in Leopard 10.5.3-4

    Hi, I experience a strange problem with ftp upload speed in 10.5.3-4. When I start upload a file to my trusted ftp server the upload speed starts to decrease from 300 kb/sec to 35 -40 kb/sec. It remains normal for 1-2 minutes (about 300 kb/sec) and then smoothly decreases to 35 -40 kb/sec. Pressing Stop and then Resume in Cyberduck makes speed normal for 1-2 minutes and then it starts to decrease again. It does not depend on ftp-client, it does not matter if I use either Cyberduck, Transmit or Fetch. It happens if I use either ethernet or airport connection. I have my old Powerbook with 10.4.11, it's connected to the same router with the same settings and the same time upload speed remains stable about 300 kb/sec.
    But when I transfer files from my Macbook to my old Powerbook via ftp everything is fine. And when I transfer files to ftp server of my local ISP it's also fine.
    Please, help me, I have to upload big 100 Mb files very often and it's significant difference for me 30 or 300 kb/sec
    Boris

    I'm afraid it's not just the Duck or FTP, Boris....It's many many Apps...and protocols... 10.5 appears to have ;broken',a number of file transfer protocols and Apps... (Wired and KDX are two that come to mind- precisely the same symptoms, AND some others) Apple's own 'built-in' FTP appears OK Mac-Mac, oddly enough.
    There's obviously some kind of weird Copy-Paste problem too.
    It's obviously 'fixable' or a workaround is available because several s/w mobs have released 'fixes for 10.5 file transfer Bug'
    The rest of us will just have to wait while another unannounced,unacknowledged, gaping hole in the Mac OS is quietly fixed and our expensive s/w sits unusable...
    Not really good enough, is it ?
    Like: Not being able to automatically detect a part file transfer on FTP and Auto-resume from whence you left off: something we thought was pretty cool- back in about 1984.... and absolutely essential in 86 or so.
    Boris:You will almost certainly find that it happens whatever the client-server server setup and applications or Medium... I've seen precisely what you describe happen with Airport, Cable, 10/100/1000' local' LAN...
    - and watching your throughput drop from 300K to 300 BYTES/Sec is NO FUN.
    I've spent a lot of time and money convincing potential 'Switchers' of the superiority of the Mac way over the last 20 years or so...
    I'm getting pretty tired at defending the indefensible: 'SkoolBoy Misstakes' in a 24 year old 'superior Computer.- Not Good enough, Apple.

  • WVC54GCA motion detection in utility setup not working

    After reading this answer that basically says that if you use the web-based advanced setup for motion detection, your recording is limited to only 5 sec., I disabled motion detection in the web GUI, and decided to setup motion detection in the utiity setup windows.
    I can't make it work correctly:  I have firmware V1.00R24:
    This is what I do: I check Enable Motion Detection Recording in the Network Camera screen. In Preferences, I set the Recording Path, set 10 secs Motion Detection record before and after motion detection.  I have 15 GB of available disk space.
    Under Recording Schedule, if I set a schedule, say, daily from 7am to 7:30am (or any other interval), it will record for the whole duration independently of any movement or lack of movement in the field.  If I don't set a recording schedule, it won't record anything.
    I am not interested in triggering emails or FTPs, which apparently can be done only with the Web GUI anyway.  I just want to record 10 secs before and after every instance of detected movement.
    Am I missing something?
    Thanks for any suggestion.

    Well, I am still struggling with this motion detection.
    @Carrot: Linksys seems to say that the 5 second limitation is only for the web-based setup, which I didn't use. If you read this answer from their knowledge base, you will see they recommend using the utility to obtain longer recording times.  In any case, when I follow their recommendation, I don't even get 5 seconds.  The only thing that gets recorded are the intervals I specify in Recording Schedule, and then it records everything, motion or no motion.  Without entering a recording schedule, nothing gets recorded.
    In any case, if you have any specific third party software in mind that would do a better job with motion detection, please let me know.  I have been using successfully YawCam, which works with USB webcams, but I haven't found a way to make it work with this IP camera.
    I may endup using my own video software (using avisynth) to detect movement from full recordings.

  • Broken WVC54GCA Motion Detection

    Does anyone know how to get the motion detection in the WVC54GCA to work correctly, without  triggering contstantly
    I have setup my camera to detect motion, and it appears to trigger (false positive) endlessly.  Using R24 (also tried R22) when I turn the threshold to max/min or midway, or have fullscreen, 1,2 or 3 detection windows I will receive an emailed output at the frequency defined by the gap between triggers.  It doesnt matter whether I ask for JPG output or Video (all files types) I fill my inbox very quickly, to the point where I have to turn off the motion detection, rendering the reason for purchase pointless.  Like an idiot, I do have two of these cameras, so its also unlikely to be simply a faulty unit.
    (I also have a  WVC54GC earlier camera, which does trigger properly, but the ASF files generated are flakey to say the least)
    The only thing I haven't tried is sending via FTP, but frankly I can't see how that will impact motion detection.
    1. Does anyone know how to get around this? or have had success with automated motion detection capture and send ?
    2. Are there any Linksys Cisco employees reading this that can confirm the firmware is still bing written and when the fixed version will be released, or should I eBay these to some hapless unfortunat, and buy Axis instead?
    I realise my words are somewhat provocatory, but at least they are not fictional, unlike the marketting behind this camera, and I aslo believe I have the right to buy a functional product.
    Thanks for reading
    Richard

    When you Enable Motion Detection on your Camera to capture JPEG files to be mailed on your E-mail, whats is the Interval Time you have set on your Camera. You may increase the Interval Time. Have you tried to Downloading the Latest Software from the Linksys website. You try downloading the latest software from the linksys website and try installing on your computer. Once you reinstall the software on your computer after this you can enable the Motion Detection on the software and check how it works.

  • Live! Cam Voice Shuts Down When Using Motion Detection Feature

    I'm running XP Media Center 2002.
    I just installed Live! Cam Voice. Started using it and is was fine out of the box. I updated the drivers and i also decided to update the drivers for my SoundBlaster Audigy 2 ZS.
    The problem only seemed to occur when using the Motion Detection. Shortly after using it, I'd get a Microsoft error prompting the WebCam Center to shut down.
    First I uninstalled the software and reinstalled it using the original drivers on the supplied disk. I still had the problem. So i rolled back the drivers on my sound card. That seems to have fixed the problem... Thought you'd want to know.
    To be clear the Cam driver I'm using is .0.8.206. I believe this is the one that came w/ the install disk. Hope this helps anyone else who's experienced similar problems.....

    I have the same problem. I only get 6-7 fps max. I've never seen anything above 0 fps which is a disgrace. My computer is and Athlon64 X2 4800 with 2GB RAM so it's nothing to do with spec. This behaviour was the same in driver version .0.8 as well as the latest one... .0.02 or something.
    Also, since the last driver update, the whitebalance and focus when on automatic is dreadful. I'm not impressed.

  • Start recording video at a set time of day and off at a set time of day, and or can start rec video when motion detected, till no motion detected for a set period

    is there an app for iphone which can be set to start recording video at a set time of day and off at a set time of day, and or can start rec video when motion detected, till no motion detected for a set period. basically someone is vandalising my vehicle and i really really want to catch the mongrel
    thanks for any suggestions

    Nope.

  • Help with ftp upload problem

    Hi I am using a ftp class (known as FTPConnection) that i found on this site: http://www.nsftools.com/tips/JavaFtp.htm , and they only have an example of how to download a File through FTP and not upload one. I am in the proccess of making an FTP upload applet, and need some help on getting upload to work. I also need it to work on both a Pc and mac, so that may be attributing to the problem becuase i am currently on a mac which uses file:// instead of C:\\. Ill post the ftp class, and a snippet of my code that tries to upload a selected file.
    FTPConnection
    /* <!-- in case someone opens this in a browser... --> <pre> */
    * File:   FTPConnection.java
    * Author: Bret Taylor <[email protected]>
    * URL: http://www.stanford.edu/~bstaylor/cs/ftpconnection/FTPConnection.java.shtml
    * see also <a href="http://www.nsftools.com/tips/JavaFtp.htm">http://www.nsftools.com/tips/JavaFtp.htm</a>
    * $Id$
    * Parts of this code were adopted from a variety of other FTP classes the
    * author has encountered that he was not completely satisfied with.  If you
    * think more thanks are due to any particular author than is given, please
    * let him know.  With that caveat, this class can be freely distributed and
    * modified as long as Bret Taylor is given credit in the source code comments.
    * Modified by Julian Robichaux -- http://www.nsftools.com
    * Added constructors, logout(), listFiles(), listSubdirectories(), getAndParseDirList(),
    * processFileListCommand(), and overloaded getFullServerReply().
    * Also added StringBuffer parameter options to transferData() and executeDataCommand()
    * and did a few other little things.
    import java.io.*;
    import java.net.*;
    import java.util.*;
    * <p>A wrapper for the network and command protocols needed for the most common
    * FTP commands.  Standard usage looks something like this:</p>
    * <pre> FTPConnection connection = new FTPConnection();
    * try {
    *     if (connection.connect(host)) {
    *         if (connection.login(username, password)) {
    *             connection.downloadFile(serverFileName);
    *             connection.uploadFile(localFileName);
    *         connection.disconnect();
    * } catch (UnknownHostException e) {
    *     // handle unknown host
    * } catch (IOException e) {
    *     // handle I/O exception
    * }</pre>
    * <p>Most FTP commands are wrapped by easy-to-use methods, but in case clients
    * need more flexibility, you can execute commands directly using the methods
    * <a href="#executeCommand(java.lang.String)">executeCommand</a> and
    * <a href="#executeDataCommand(java.lang.String,
    * java.io.OutputStream)">executeDataCommand</a>,
    * the latter of which is used for commands that require an open data port.</p>
    * @author Bret Taylor
    * @author Julian Robichaux
    * @version 1.01
    public class FTPConnection extends Object {
         * If this flag is on, we print out debugging information to stdout during
         * execution.  Useful for debugging the FTP class and seeing the server's
         * responses directly.
        private static boolean PRINT_DEBUG_INFO = false;
         * The socket through which we are connected to the FTP server.
        private Socket connectionSocket = null;
         private String username;
         private String password;
         private String host;
         * The socket output stream.
        private PrintStream outputStream = null;
         * The socket input stream.
        private BufferedReader inputStream = null;
         * The offset at which we resume a file transfer.
        private long restartPoint = 0L;
         * Added by Julian: If this flag is on, we're currently logged in to something.
        private boolean loggedIn = false;
         * Added by Julian: This is the line terminator to use for multi-line responses.
        public String lineTerm = "\n";
         * Added by Julian: This is the size of the data blocks we use for transferring
         * files.
        private static int BLOCK_SIZE = 4096;
         * Added by Julian: After you create an FTPConnection object, you will call the
         * connect() and login() methods to access your server. Please don't forget to
         * logout() and disconnect() when you're done (it's only polite...).
        public FTPConnection ()
             // default constructor (obviously) -- this is just good to have...
         * Added by Julian: Allows you to specify if you want to send debug output to
         * the console (true if you do, false if you don't).
        public FTPConnection (boolean debugOut)
             PRINT_DEBUG_INFO = debugOut;
         public FTPConnection (String user, String pw, String host_)
             username=user;
              password=pw;
              host=host_;
              PRINT_DEBUG_INFO = false;
         * Prints debugging information to stdout if the private flag
         * <code>PRINT_DEBUG_INFO</code> is turned on.
        private void debugPrint(String message) {
            if (PRINT_DEBUG_INFO) System.err.println(message);
         * Connects to the given FTP host on port f, the default FTP port.
        public boolean connect(String host)
            throws UnknownHostException, IOException
            return connect(host, 21);
         * Connects to the given FTP host on the given port.
        public boolean connect(String host, int port)
            throws UnknownHostException, IOException
            connectionSocket = new Socket(host, port);
              connectionSocket.setSoTimeout(10000);
            outputStream = new PrintStream(connectionSocket.getOutputStream());
            inputStream = new BufferedReader(new
                           InputStreamReader(connectionSocket.getInputStream()));
            if (!isPositiveCompleteResponse(getServerReply())){
                disconnect();
                return false;
            return true;
         * Disconnects from the host to which we are currently connected.
         static boolean URLexists(String URLName)
              try
                   HttpURLConnection.setFollowRedirects(false);
                   // note : you may also need
                   // HttpURLConnection.setInstanceFollowRedirects(false)
                   HttpURLConnection con =
                   (HttpURLConnection) new URL(URLName).openConnection();
                   con.setRequestMethod("HEAD");
                   return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
              catch (Exception e)
                   e.printStackTrace();
                   return false;
         public String getSimpleFileName(File f)
              String path=f.getPath();
              String fileName=path.replace("\\", "/");
              int slashPos = fileName.lastIndexOf("/");
              fileName=fileName.substring(slashPos+1);
              return fileName;
         public String verifyFileName(String name)
              int count=0;
              //String url="http://chris-malcolm.com/images/"+URLEncoder.encode(name).replace("+", "%20");
              while (URLexists("http://chris-malcolm.com/images/"+URLEncoder.encode(name).replace("+", "%20"))==true)
              count++;
              name=FileExt(name)[0]+"-"+count+"."+FileExt(name)[1];
              return name;
         public String[] FileExt(String fileName)
            int dotPos = fileName.lastIndexOf(".");
              fileName=fileName.replace("\\", "/");
              int slashPos = fileName.lastIndexOf("/");
              String extension, name;
              if (slashPos==fileName.length()-1)
                   fileName=fileName.substring(0, fileName.length()-1);
                   slashPos=fileName.lastIndexOf("/");
                   extension="/";
                   name=fileName.substring(slashPos+1);
              else if(dotPos==-1)
                   name=fileName.substring(slashPos+1);
                   extension="";
              else
                   extension = fileName.substring(dotPos+1);
                   name=fileName.substring(slashPos+1, dotPos);
                   String[] output={name, extension};
                   return output;
              String[] output={name, extension};
              return output;
        public void disconnect()
            if (outputStream != null) {
                try {
                      if (loggedIn) { logout(); };
                    outputStream.close();
                    inputStream.close();
                    connectionSocket.close();
                } catch (IOException e) {}
                outputStream = null;
                inputStream = null;
                connectionSocket = null;
         * Wrapper for the commands <code>user [username]</code> and <code>pass
         * [password]</code>.
        public boolean login(String username, String password)
            throws IOException
            int response = executeCommand("user " + username);
            if (!isPositiveIntermediateResponse(response)) return false;
            response = executeCommand("pass " + password);
            loggedIn = isPositiveCompleteResponse(response);
            return loggedIn;
         * Added by Julian: Logout before you disconnect (this is good form).
        public boolean logout()
            throws IOException
            int response = executeCommand("quit");
            loggedIn = !isPositiveCompleteResponse(response);
            return !loggedIn;
         * Wrapper for the command <code>cwd [directory]</code>.
        public boolean changeDirectory(String directory)
            throws IOException
            int response = executeCommand("cwd " + directory);
            return isPositiveCompleteResponse(response);
         * Wrapper for the commands <code>rnfr [oldName]</code> and <code>rnto
         * [newName]</code>.
        public boolean renameFile(String oldName, String newName)
            throws IOException
            int response = executeCommand("rnfr " + oldName);
            if (!isPositiveIntermediateResponse(response)) return false;
            response = executeCommand("rnto " + newName);
            return isPositiveCompleteResponse(response);
         * Wrapper for the command <code>mkd [directory]</code>.
        public boolean makeDirectory(String directory)
            throws IOException
            int response = executeCommand("mkd " + directory);
            return isPositiveCompleteResponse(response);
         * Wrapper for the command <code>rmd [directory]</code>.
        public boolean removeDirectory(String directory)
            throws IOException
            int response = executeCommand("rmd " + directory);
            return isPositiveCompleteResponse(response);
         * Wrapper for the command <code>cdup</code>.
        public boolean parentDirectory()
            throws IOException
            int response = executeCommand("cdup");
            return isPositiveCompleteResponse(response);
         * Wrapper for the command <code>dele [fileName]</code>.
        public boolean deleteFile(String fileName)
            throws IOException
            int response = executeCommand("dele " + fileName);
            return isPositiveCompleteResponse(response);
         * Wrapper for the command <code>pwd</code>.
        public String getCurrentDirectory()
            throws IOException
            String response = getExecutionResponse("pwd");
            StringTokenizer strtok = new StringTokenizer(response);
            // Get rid of the first token, which is the return code
            if (strtok.countTokens() < 2) return null;
            strtok.nextToken();
            String directoryName = strtok.nextToken();
            // Most servers surround the directory name with quotation marks
            int strlen = directoryName.length();
            if (strlen == 0) return null;
            if (directoryName.charAt(0) == '\"') {
                directoryName = directoryName.substring(1);
                strlen--;
            if (directoryName.charAt(strlen - 1) == '\"')
                return directoryName.substring(0, strlen - 1);
            return directoryName;
         * Wrapper for the command <code>syst</code>.
        public String getSystemType()
            throws IOException
            return excludeCode(getExecutionResponse("syst"));
         * Wrapper for the command <code>mdtm [fileName]</code>.  If the file does
         * not exist, we return -1;
        public long getModificationTime(String fileName)
            throws IOException
            String response = excludeCode(getExecutionResponse("mdtm " + fileName));
            try {
                return Long.parseLong(response);
            } catch (Exception e) {
                return -1L;
         * Wrapper for the command <code>size [fileName]</code>.  If the file does
         * not exist, we return -1;
        public long getFileSize(String fileName)
            throws IOException
            String response = excludeCode(getExecutionResponse("size " + fileName));
            try {
                return Long.parseLong(response);
            } catch (Exception e) {
                return -1L;
         * Wrapper for the command <code>retr [fileName]</code>.
        public boolean downloadFile(String fileName)
            throws IOException
            return readDataToFile("retr " + fileName, fileName);
         * Wrapper for the command <code>retr [serverPath]</code>. The local file
         * path to which we will write is given by <code>localPath</code>.
        public boolean downloadFile(String serverPath, String localPath)
            throws IOException
            return readDataToFile("retr " + serverPath, localPath);
         * Wrapper for the command <code>stor [fileName]</code>.
        public boolean uploadFile(String fileName)
            throws IOException
            return writeDataFromFile("stor " + fileName, fileName);
         * Wrapper for the command <code>stor [localPath]</code>. The server file
         * path to which we will write is given by <code>serverPath</code>.
        public boolean uploadFile(String serverPath, String localPath)
            throws IOException
            return writeDataFromFile("stor " + serverPath, localPath);
         * Set the restart point for the next download or upload operation.  This
         * lets clients resume interrupted uploads or downloads.
        public void setRestartPoint(int point)
            restartPoint = point;
            debugPrint("Restart noted");
         * Gets server reply code from the control port after an ftp command has
         * been executed.  It knows the last line of the response because it begins
         * with a 3 digit number and a space, (a dash instead of a space would be a
         * continuation).
        private int getServerReply()
            throws IOException
            return Integer.parseInt(getFullServerReply().substring(0, 3));
         * Gets server reply string from the control port after an ftp command has
         * been executed.  This consists only of the last line of the response,
         * and only the part after the response code.
        private String getFullServerReply()
            throws IOException
            String reply;
            do {
                reply = inputStream.readLine();
                debugPrint(reply);
            } while(!(Character.isDigit(reply.charAt(0)) &&
                      Character.isDigit(reply.charAt(1)) &&
                      Character.isDigit(reply.charAt(2)) &&
                      reply.charAt(3) == ' '));
            return reply;
         * Added by Julian: Returns the last line of the server reply, but also
         * returns the full multi-line reply in a StringBuffer parameter.
        private String getFullServerReply(StringBuffer fullReply)
             throws IOException
            String reply;
            fullReply.setLength(0);
            do {
                reply = inputStream.readLine();
                debugPrint(reply);
                fullReply.append(reply + lineTerm);
            } while(!(Character.isDigit(reply.charAt(0)) &&
                      Character.isDigit(reply.charAt(1)) &&
                      Character.isDigit(reply.charAt(2)) &&
                      reply.charAt(3) == ' '));
              // remove any trailing line terminators from the fullReply
              if (fullReply.length() > 0) 
                   fullReply.setLength(fullReply.length() - lineTerm.length());
            return reply;
         * Added by Julian: Gets a list of files in the current directory.
         public String listFiles()
              throws IOException
              return listFiles("");
         * Added by Julian: Gets a list of files in either the current
         * directory, or one specified as a parameter. The 'params' parameter
         * can be either a directory name, a file mask, or both (such as
         * '/DirName/*.txt').
         public String listFiles(String params)
              throws IOException
              StringBuffer files = new StringBuffer();
              StringBuffer dirs = new StringBuffer();
              if (!getAndParseDirList(params, files, dirs))
                   debugPrint("Error getting file list");
              return files.toString();
         * Added by Julian: Gets a list of subdirectories in the current directory.
         public String listSubdirectories()
              throws IOException
              return listSubdirectories("");
         * Added by Julian: Gets a list of subdirectories in either the current
         * directory, or one specified as a parameter. The 'params' parameter
         * can be either a directory name, a name mask, or both (such as
         * '/DirName/Sub*').
         public String listSubdirectories(String params)
              throws IOException
              StringBuffer files = new StringBuffer();
              StringBuffer dirs = new StringBuffer();
              if (!getAndParseDirList(params, files, dirs))
                   debugPrint("Error getting dir list");
              return dirs.toString();
         * Added by Julian: Sends and gets the results of a file list command,
         * like LIST or NLST.
        private String processFileListCommand(String command)
            throws IOException
            StringBuffer reply = new StringBuffer();
            String replyString;
            // file listings require you to issue a PORT command,
            // like a file transfer
              boolean success = executeDataCommand(command, reply);
              if (!success)
                   return "";
            replyString = reply.toString();
            // strip the trailing line terminator from the reply
            if (reply.length() > 0)
                 return replyString.substring(0, reply.length() - 1);
            }  else  {
                 return replyString;
          * Added by Julian: Gets a directory list from the server and parses
          * the elements into a list of files and a list of subdirectories.
         private boolean getAndParseDirList(String params, StringBuffer files, StringBuffer dirs)
              throws IOException
              // reset the return variables (we're using StringBuffers instead of
              // Strings because you can't change a String value and pass it back
              // to the calling routine -- changing a String creates a new object)
              files.setLength(0);
              dirs.setLength(0);
              // get the NLST and the LIST -- don't worry if the commands
              // don't work, because we'll just end up sending nothing back
              // if that's the case
              String shortList = processFileListCommand("nlst " + params);
              String longList = processFileListCommand("list " + params);
              // tokenize the lists we got, using a newline as a separator
              StringTokenizer sList = new StringTokenizer(shortList, "\n");
              StringTokenizer lList = new StringTokenizer(longList, "\n");
              // other variables we'll need
              String sString;
              String lString;
              // assume that both lists have the same number of elements
              while ((sList.hasMoreTokens()) && (lList.hasMoreTokens())) {
                   sString = sList.nextToken();
                   lString = lList.nextToken();
                   if (lString.length() > 0)
                        if (lString.startsWith("d"))
                             dirs.append(sString.trim() + lineTerm);
                             debugPrint("Dir: " + sString);
                        }  else if (lString.startsWith("-"))  {
                             files.append(sString.trim() + lineTerm);
                             debugPrint("File: " + sString);
                        }  else  {
                             // actually, symbolic links will start with an "l"
                             // (lowercase L), but we're not going to mess with
                             // those
                             debugPrint("Unknown: " + lString);
              // strip off any trailing line terminators and return the values
              if (files.length() > 0)  {  files.setLength(files.length() - lineTerm.length());  }
              if (dirs.length() > 0)  {  dirs.setLength(dirs.length() - lineTerm.length());  }
              return true;
         * Executes the given FTP command on our current connection, returning the
         * three digit response code from the server.  This method only works for
         * commands that do not require an additional data port.
        public int executeCommand(String command)
            throws IOException
            outputStream.println(command);
            return getServerReply();
         * Executes the given FTP command on our current connection, returning the
         * last line of the server's response.  Useful for commands that return
         * one line of information.
        public String getExecutionResponse(String command)
            throws IOException
            outputStream.println(command);
            return getFullServerReply();
         * Executes the given ftpd command on the server and writes the results
         * returned on the data port to the file with the given name, returning true
         * if the server indicates that the operation was successful.
        public boolean readDataToFile(String command, String fileName)
            throws IOException
            // Open the local file
            RandomAccessFile outfile = new RandomAccessFile(fileName, "rw");
            // Do restart if desired
            if (restartPoint != 0) {
                debugPrint("Seeking to " + restartPoint);
                outfile.seek(restartPoint);
            // Convert the RandomAccessFile to an OutputStream
            FileOutputStream fileStream = new FileOutputStream(outfile.getFD());
            boolean success = executeDataCommand(command, fileStream);
            outfile.close();
            return success;
         * Executes the given ftpd command on the server and writes the contents
         * of the given file to the server on an opened data port, returning true
         * if the server indicates that the operation was successful.
        public boolean writeDataFromFile(String command, String fileName)
            throws IOException
            // Open the local file
            RandomAccessFile infile = new RandomAccessFile(fileName, "r");
            // Do restart if desired
            if (restartPoint != 0) {
                debugPrint("Seeking to " + restartPoint);
                infile.seek(restartPoint);
            // Convert the RandomAccessFile to an InputStream
            FileInputStream fileStream = new FileInputStream(infile.getFD());
            boolean success = executeDataCommand(command, fileStream);
            infile.close();
            return success;
         * Executes the given ftpd command on the server and writes the results
         * returned on the data port to the given OutputStream, returning true
         * if the server indicates that the operation was successful.
        public boolean executeDataCommand(String command, OutputStream out)
            throws IOException
            // Open a data socket on this computer
            ServerSocket serverSocket = new ServerSocket(0);
            if (!setupDataPort(command, serverSocket)) return false;
            Socket clientSocket = serverSocket.accept();
            // Transfer the data
            InputStream in = clientSocket.getInputStream();
            transferData(in, out);
            // Clean up the data structures
            in.close();
            clientSocket.close();
            serverSocket.close();
            return isPositiveCompleteResponse(getServerReply());   
         * Executes the given ftpd command on the server and writes the contents
         * of the given InputStream to the server on an opened data port, returning
         * true if the server indicates that the operation was successful.
        public boolean executeDataCommand(String command, InputStream in)
            throws IOException
            // Open a data socket on this computer
            ServerSocket serverSocket = new ServerSocket(0);
            if (!setupDataPort(command, serverSocket)) return false;
            Socket clientSocket = serverSocket.accept();
            // Transfer the data
            OutputStream out = clientSocket.getOutputStream();
            transferData(in, out);
            // Clean up the data structures
            out.close();
            clientSocket.close();
            serverSocket.close();
            return isPositiveCompleteResponse(getServerReply());   
         * Added by Julian: Executes the given ftpd command on the server
         * and writes the results returned on the data port to the given
         * StringBuffer, returning true if the server indicates that the
         * operation was successful.
        public boolean executeDataCommand(String command, StringBuffer sb)
            throws IOException
            // Open a data socket on this computer
            ServerSocket serverSocket = new ServerSocket(0);
            if (!setupDataPort(command, serverSocket)) return false;
            Socket clientSocket = serverSocket.accept();
            // Transfer the data
            InputStream in = clientSocket.getInputStream();
            transferData(in, sb);
            // Clean up the data structures
            in.close();
            clientSocket.close();
            serverSocket.close();
            return isPositiveCompleteResponse(getServerReply());   
         * Transfers the data from the given input stream to the given output
         * stream until we reach the end of the stream.
        private void transferData(InputStream in, OutputStream out)
            throws IOException
            byte b[] = new byte[BLOCK_SIZE];
            int amount;
            // Read the data into the file
            while ((amount = in.read(b)) > 0) {
                out.write(b, 0, amount);
         * Added by Julian: Transfers the data from the given input stream
         * to the given StringBuffer until we reach the end of the stream.
        private void transferData(InputStream in, StringBuffer sb)
            throws IOException
            byte b[] = new byte[BLOCK_SIZE];
            int amount;
            // Read the data into the StringBuffer
            while ((amount = in.read(b)) > 0) {
                sb.append(new String(b, 0, amount));
         * Executes the given ftpd command on the server and writes the results
         * returned on the data port to the given FilterOutputStream, returning true
         * if the server indicates that the operation was successful.
        private boolean setupDataPort(String command, ServerSocket serverSocket)
            throws IOException
            // Send our local data port to the server
            if (!openPort(serverSocket)) return false;
            // Set binary type transfer
            outputStream.println("type i");
            if (!isPositiveCompleteResponse(getServerReply())) {
                debugPrint("Could not set transfer type");
                return false;
            // If we have a restart point, send that information
            if (restartPoint != 0) {
                outputStream.println("rest " + restartPoint);
                restartPoint = 0;
                // TODO: Interpret server response here
                getServerReply();
            // Send the command
            outputStream.println(command);
            return isPositivePreliminaryResponse(getServerReply());
         * Get IP address and port number from serverSocket and send them via the
         * <code>port</code> command to the ftp server, returning true if we get a
         * valid response from the server, returning true if the server indicates
         * that the operation was successful.
        private boolean openPort(ServerSocket serverSocket)
            throws IOException
            int localport = serverSocket.getLocalPort();
            // get local ip address
            InetAddress inetaddress = serverSocket.getInetAddress();
            InetAddress localip;
            try {
                localip = inetaddress.getLocalHost();
            } catch(UnknownHostException e) {
                debugPrint("Can't get local host");
                return false;
            // get ip address in high byte order
            byte[] addrbytes = localip.getAddress();
            // tell server what port we are listening on
            short addrshorts[] = new short[4];
            // problem:  bytes greater than 127 are printed as negative numbers
            for(int i = 0; i <= 3; i++) {
                addrshorts[i] = addrbytes;
    if (addrshorts[i] < 0)
    addrshorts[i] += 256;
    outputStream.println("port " + addrshorts[0] + "," + addrshorts[1] +
    "," + addrshorts[2] + "," + addrshorts[3] + "," +
    ((localport & 0xff00) >> 8) + "," +
    (localport & 0x00ff));
    return isPositiveCompleteResponse(getServerReply());
    * True if the given response code is in the 100-199 range.
    private boolean isPositivePreliminaryResponse(int response)
    return (response >= 100 && response < 200);
    * True if the given response code is in the 300-399 range.
    private boolean isPositiveIntermediateResponse(int response)
    return (response >= 300 && response < 400);
    * True if the given response code is in the 200-299 range.
    private boolean isPositiveCompleteResponse(int response)
    return (response >= 200 && response < 300);
    * True if the given response code is in the 400-499 range.
    private boolean isTransientNegativeResponse(int response)
    return (response >= 400 && response < 500);
    * True if the given response code is in the 500-5

    ok i tried explaining th eproblem in the previous post, but i apologize if my explanation was poor. anyways, i tried to look into it further by doing a printStackTrace() and believe it may be a read error. here is my new updated snippet, and also a link to a screenshot ([click here for screenshot|http://img143.imageshack.us/my.php?image=picture4qr0.png]) of what the error looks like on my end. it seems like a socket is not being read, or maybe it is initialized properly. Again I apologize if my problem is vague, but I do appreciate your input. thanks.
    updated code snippet
    public void uploadFiles()
              statusLabel.setVisible(true);
              errorLabel.setVisible(true);
              uploadButton.setVisible(false);
              footer.setVisible(false);
              holdingPanel.setVisible(false);
              pbar.setVisible(true);
              pbar = new JProgressBar();
              pbar.setMinimum(0);
              float Total=0;
              for (int i=0; i<fileLengths.size(); i++)
                   if(((java.lang.Boolean)model.getValueAt(i,1)).toString().equals("true"))
                        Total+=Float.parseFloat((String)fileLengths.get(i));
              pbar.setMaximum((int)Total);
              String info="";
              try
                   ftp=new FTPConnection(false);
                   ftp.connect("ftp.chris-malcolm.com");
                   if (ftp.login("chrismal", "***"))
                        statusLabel.setText("Status: Connected.");
                        info+="Successfully logged in!\n";
                        info+="System type is: " + ftp.getSystemType()+"\n";
                        info+="Current directory is: " + ftp.getCurrentDirectory()+"\n";
                        if (ftp.changeDirectory("/www/images/"))
                             info+="directory changed to: " + ftp.getCurrentDirectory()+"\n";
                                                 try
                             for (int i=0; i<allFiles.size(); i++)
                                  if(((java.lang.Boolean)model.getValueAt(i,1)).toString().equals("true"))
                                       String f=client.verifyFileName((String)model.getValueAt(i,0));
                                       String f2=""+((File)allFiles.get(i)).getPath();
                                       info+="filename: "+f2+"\n";
                                       if (ftp.uploadFile(f2))
                                            statusLabel.setText("Status: Uploading "+f+" - "+i+" of "+calculateTotalFiles()+" files(s)");
                                            pbar.setValue(Integer.parseInt((String)fileLengths.get(i)));
                                       else
                                            errorLabel.setText("Error occured while uploading"+f2+"\n");
                        catch(Exception de) 
                             StringWriter sw = new StringWriter();
                                  PrintWriter pw = new PrintWriter(sw);
                                  de.printStackTrace(pw);
                                  pw.close();
                                  //errorLabel.setText("<html>ERROR:"+sw.toString().replace("\n", "<br>")+"</html>");
                                  info+="Error: "+de.getMessage()+"\n";
                                  info+="Trace: "+sw+"\n";
                             try { ftp.disconnect(); statusLabel.setText("Status: disconnected.");}  catch(Exception e2)  {};
                        else
                             info+="could not change directory\n";
                   else
                        info+="could not login";
              catch (Exception e)
                   StringWriter sw = new StringWriter();
                                  PrintWriter pw = new PrintWriter(sw);
                                  e.printStackTrace(pw);
                                  pw.close();
                                  info+="Error: "+e.getMessage()+"\n";
                                  info+="Trace: "+sw+"\n";
                   try { ftp.disconnect();  statusLabel.setText("Status: disconnected.");}  catch(Exception e2)  {};
              errorLabel.setText("ERROR:"+info);
              JOptionPane.showMessageDialog(this, info, "test", JOptionPane.PLAIN_MESSAGE);
              try { ftp.disconnect(); statusLabel.setText("Status: disconnected.");}  catch(Exception e2)  {};
         Edited by: cjm771 on Jul 13, 2008 7:23 PM

  • Base filtering engine is preventing FTP uploads

    Using win 8.1. Ftp uploads (from any ftp program, filezilla, winscp and with knowhow cloud backup) stalls after 2-3 files have been uploaded.  A single large file will upload but not multiple small files. If I boot into windows safe mode the problem
    does not occur, ftp works fine, always.  In normal mode by eliminating one running component at a time I found that the base filtering engine appeared to be the only problem.  If base filtering was running the ftp problem occurred, if not then ftp
    was fine.
    Can one repair or replace the base filtering engine?.    I found this as it relates to win 7
    FROM ONE OF YOUR OTHER THREADS:
    you may download and apply the BFE service registry fix (#11) in this page: Miscellaneous Registry Fixes for Windows 7/XP/Vista - The Winhelponline Blog: LINK REMOVED (could not submit, Body text cannot contain images or links until we are able to verify
    your account.)
    Is that applicable for this problem in win 8.1?
    I do understand the BFE is an important security issue.  I have also scanned my system for viruses, I use defender (computer associates) anti virus and firewall, and spybot for malware.  I can't specifically pinpoint the occurrence of the problem with
    the installation of any specific new software program.  I have disabled the defender  firewall and virus software and that does not solve the problem. Disabling base filtering engine results in a functioning ftp, enabling results in
    a stalled ftp.
    Any help would be appreciated.

    Try this suggestion
    http://social.technet.microsoft.com/Forums/en-US/d8e59632-fca9-4bbd-b748-881af144706a/access-denied-base-filter-engine?forum=winservergen
    1. Browse to the location for the BFE service in the registry (HKLM\System\CurrentControlSet\Services\BFE\Parameters\Policy), right click and select permissions.
    2. In the "Permissions for Policy" window, click advanced | Add.
    3. Once the "Select Users, Computers or Group" box appears, change the "From this location:" to point to the local machine name.
    4. After changing the search location, enter "NT Service\BFE" in the "Enter the object name to select" box and click "Check names" - this will allow you to add the BFE account.
    5. Give the following privileges to the BFE account:
    Query Value
    Set Value
    Create Subkey
    Enumerate Subkeys
    Notify
    Read Control
    After adding the BFE account to the registry key, please try to start the Base Filtering Engine service.

  • I am running OS 10.7.5 on a Macbook. Problems with ftp upload

    I am running OS 10.7.5 on a Macbook. I am trying to upload to an ftp server. The connection is established with no problem but any attempt to upload files times out. This is an intermittent problem. I have been using fetch as an ftp client quuite successfully for a long time. The problem starts when there is trouble with the broadband connection. The ftp upload then falls over. I have managed to re-establish it in the past by setting up the connections from scratch. This has not worked this time. The same thing happens with two other clients that I have, so it is not specifically related to fetch. I can uplad files from PC's and by using my iphone's 3g connection as a personal hotspot. The problem seems to lie with the way the macs (the same thing happens on an older mac also running OSX) communicate with the router. I have tried with and without passive mode.
    Please can anyone help. It is driving me to distraction.
    Oh and I have just downloaded the latest security update.

    For anyone else with the same problem.
    My husband discovered the problem is with the MTU, maximum transmission unit . This article describes the problem and solution very clearly
    http://www.macgurulounge.com/manually-managing-mtu-size-in-mac-os-x/
    Our router was running at 1492 and the mac at 1500. I found that resetting to 1400 cured the problem.
    I hope this is helpful to other folk having the same problem

  • Help with motion detection preset on a WVC210

    Hi, I am really out of ideas. Is it possible to set the home position as my motion detection area? I can't seem to be able to make my camesa stay at its home position. I set my camera to go back to my home position after 1 minute of idling, the the camera keep going somewhere else. I noticed that the area it goes to is the same area that my camera goes to when I clicked on the motion icon (the one with the man running. Can I overwrite that position? I tried deleting all my presets, recalibrated the camera and even resetting my camera a few times already. I really need help cause the area that the camera choose as my motion area is not what I need. Thank you in avanced to all that take the time to answer me.

    Hi, yes I can manually tilt up or down. I have the camera facing down on the stairs to the entrance of my house and saved as a home position. I went in to the motion detection section and made sure the position is the same as my home position (I hit apply just to be sure). I set my camera to go back to my motion detection area when idle for 5 minutes (I tried different values already). Within 5 minutes the camera would tilt back to the center (facing the street), but it seems that the panning position was saved. I can move the camera around. When I hit the home position the camsera would go back to where I want, but when I hit the motion button the camera would be in the same panning position, but with a different tilt position center). The reason I know its the center is because I tried resetting my default home position and it would go back to the center pan/tilt position. It seems the camera would not accept any tilt position other then the center... I can give you access to my camera if you would like. I greatly appreciate your time and effort in helping me.

  • Charter FTP Upload

    So, after talking with charter (who basically told me to get bent, talk to apple...), i'm of the persuasion that there seems to be a problem with Charter's Personal Web Space FTP Upload system, and Mac OS X. Here's the 411:
    I go to ftp://webpages.charter.net, Mac OS X takes over and initializes an FTP connection with Charter. I type my user name and password in, and i get this great window that shows me my webspace (which is clear because i haven't uploaded anything yet). delighted that it works and it will be so much more conveineint to simply drag and drop my files from the computer to the new Charter FTP window i give one file a whirl.
    Mac OS X says:
    +"The Item "any old friggin thing" could not be moved because "webpages.charter.net" cannot be modified"+
    "OK..." i say, "We'll see about THAT business..." and off i go to the Get info window to change the permissions so that i CAN change. no such luck, it doesn't even have a drop down, it says "You can only read".
    What the heck?!
    I try a third party FTP client and i can transfer files the old Anarchie way, ALL DAY LONG, NO PROBLEM. Why in the world can't i do the same thing from the Mac OS X FTP window? It makes no sense...
    Help... Me... PLEASE!!!!

    Sorry to report, but Charter was right... FTP from the Finder is read Only... cannot Write, long standing issue... they tell me it's because of the inherent lack of Security via FTP, (it indeed is, but...).
    Your choices are using a 3rd party Client, (which I prefer, TransmitX here, but lots like the free CyberDuck), or using Terminal to do it.

Maybe you are looking for

  • Taking white MacBook from US to UK. Do I need a power converter?

    I recently purchased a white 13" MacBook for college, which is in the UK. Am I going to need a power converter for my MacBook when I go to the UK? The voltage in the US is 110V, and the voltage in the UK is 220V. Thanks!

  • How to test E- filing GB scenario with live server.

    Hi, XI ver: 7 E-Filing ver: 1.0, patch 10 I am trying to configure e-filing for GB based on the configuration guide. After importing the latest XI content for E-Filing and HR, I have configured the outbound and inbound interfaces in ID. After complet

  • Message app font not loading

    In Message app on my iMac alongside the name of the message contact there's a line of dingbats indicating I have a font conflict issue. I have no idea which font is missing. Also the contact name above the message is highlighted in red indicating ano

  • Disassembly Production order.

    Hi, I have one requirement of disassembly production order, where our client gets customer returned product which can not be repaired and send it back. the Business process is when they receive this kind of product, they will disassemble the product

  • AVCHD ph 1080p files - CC, levels, grade, MB Looks...issues

    I am testing CS5 PPRO with some AVCHD ph 1080p files that I shot myself. Applying  any of these effects .... Levels, 3- Way C.C, Curves, FAst CC,  MB Looks etc ...and I am getting real issues! Basically its un workeable for me.  The effects are unres