Ftp to SNAP-PAC R2 from a wired pc


#1

Hi all,

I am trying to check the SD card content from a wired pc on the same network , but i cant see the sd card all I see is “Index of ftp://ip adress/” heading and blank page on chrome.( it works on firefox)
where as if I use wireless I can see the content.
Can someone tell me what can be the problem.

Also I am trying to save the file on the ftp server hosted on the wired pc ( i used same technique mentioned in ftp management)
I gave the loopback ipadress (127. something) it created the file but saved in snap storage.do i need to have a static ip or can i use the dynamic ip of my wired pc.

thanks.


#2

Hello PACBeginner,
Welcome to the OptoForums!
Yes, Firefox has a good ftp client in it, Chrome not so much. Check out [U][B]this post[/B][/U] (especially under “Other tools”) for more on that topic & comm handles in general.
For communicating to your ftp server on the PC, you can actually use the NAME of the PC rather than an IP address if you’d like. Just make sure your PAC has a DNS configured for it.
-OptoMary


#3

thank you very much for the reply… I am still very much confused with FTP server, here is what i did till now:

  1. Created a FTP server using FileZilla, ip address and port name were default 127.0.0.1 14147

  2. changed ch_FtpServer handles to have ftp://my computer name,SnapPac, snap as initial values

  3. un commented option 1. in Send file to Ftp server " sSendFile = “send:/” + sMonth + “/DataLog_” + sJday + “.txt,DataLog_” + sJday + “.txt”;

  4. Ran the strategy.

But files were not created on the server pc but created on Snap Pac.

both pc and snap are in same dns , PAC manager can see the snap and even i can run my strategy without any errors.

Any suggestion what can be wrong. its creating the file but in wrong location.


#4

On the PAC, you need to put the IP address of the PC.
127.0.0.1 is the local loopback IP address for any device you are on, so its the local address for the PC if you are on the PC and its the local address for the PAC if you are in OptoScript.


#5

You might also find [U][B]this tutorial[/B][/U] useful (even if you don’t have a Learning Center).
That page also has a link w/some sample strategies for file and ftp handles.


#6

Hi ,

Can you please more instruction, the user guide is very confusing.

  1. I gave the ip adress of the pc where I created the server( using 127.0.0.1 address), I also changed the file handle to reflect that address still I cant save the file.
  2. Do I create server with 127.0.0.1 address or something different?
  3. I tried running 1642_FileMgtFtp_after example, no luck in saving the files. strategy runs without error but no files were saved in FtpServer directory on my pc. I check firewall and everything.

#7

As Ben mentioned above, 127.0.0.1 is the “local loopback” address. In other words, that means “this device.” So unless you’re trying to create/use a file on the same device where your strategy is running, do NOT use that address for your ftp server, unless you just want to create a file on the hardware PAC (in which case, you could just use a file comm handle, instead of an ftp comm handle).

What’s the IP address of your PC/server?


#8

as mentioned in document I used 127.0.0.1
In 1642_optotutorial page 12 , point 4


what other setting do I have to change? I am really confuse as how to use the ftp.

  1. I created the server as mentioned in the documents.

  2. I gave ipaddress of my pc where I created that server ( using server address 127.0.0.1)

  3. I ran the example used in the same tutorial. files were not created in c:/FtpServer directory but created on PAC under directory named 4 as : 4/DataLog_98.txt

  4. If i use the ip of my pc in the server address , it complains " trying to connect to server"

  5. My strategy runs on the same computer where my server is as I assume ftp is only way to save data on the pc.


#9

For #5 above, do you mean you’re using SoftPAC or PAC Sim? If so, and you just want to write data locally, you don’t need ftp at all. You can just use the “file” comm handle type. Also, you don’t need to have an ftp server running on the PC for that.


#10

No I don’t have Soft Pac or PAC sim, ( Will it be helpful to have Soft Pac, as since I want my controller to continue running and collect data even if the pc is off, Can we achieve this thing with SoftPac to get continuous data and run controller independently?)
My current setup is as:

  1. I have SNAP-PAC-R2 with an ip address: 129.79.xx.xx

  2. I have windows 7 machine connected to the same switch ( have ip 129.79.xx.xx, gateway is also same). I run my strategy on that machine using PAC control basic , once I click “run strategy” the PAC controller collects data.

  3. Currently I am saving all the data in SD card, I want that data to be saved in a connected pc and SD card(for backup). My controller needs to be running 24/7 hence we need some way to get data every time effectively.

  4. I created a filezilla server as mentioned in the tutorial book on the same pc, and tried to test it with the example mentioned in 1642_opto tutorial . but it never save the data on the server. it save data on the PAC itself. I did change the ip address of the comm handle to pc ip address and turn off the firewall, still no luck in saving data.

  5. Is there any specific steps do i have to take in setting up the server?

  6. Can SoftPac make controller run independently( like we do currently , once strategy downloaded to the PAC it doesn’t need to be connected to the pc/network) and save data in pc and SD card( if pc communication fails).

Is there any other working example of FTP? or can anyone suggest me what can be wrong with my setup? it will be helpful if more information be given for setting up the ftp server and how can we use the example in guide to achieve ftp data transfer.


#11

Here is what I had tried:

I have SNAP-PAC-R2, using PAC control Basic ( both pc and pac are in network).

  1. Created Filezilla server. Tested it from command prompt using pc ip address, user: SnapPac, and snap as passwd. it worlks says user logged on.
    server have user SnapPac .

  2. Turned off all the firewall.

  3. used strategy 1642_FtpMgt_0. See attached .

  4. strategy runs fine, but didn’t save any data on server rather it creates a directory on PAC and saves data there. the “sMessage” variable in the strategy do have " communication failed " string, but I don’t understand with firewall off, server on what can be wrong? is the syntax for ftp command wrong?
    I used: ftp:129.79.xx.xx,21,SnapPac,snap

  5. Can someone please tell me what I am doing wrong in the strategy or in server? strategy attached with option: 1 un commented in “Send file to FTP server” script.

  6. I followed all the instruction in 1642 tutorial.

I am stuck here with the example not sure how can I make my strategy to work when the example itself doesn’t work.


#12

Hello PACBeginner,

I’ve forwarded your link to our support team – they’re the best equipped to help you sort this out, and see if the example needs an update. However, I do notice in #4 question, that your syntax is off – you should have a colon before the port number rather than a comma, e.g.:

ftp:129.79.xx.xx[B]:[/B]21,SnapPac,snap

Also be sure to look at the status codes returned from each command. They give a clue as to what’s gone wrong.

Hope that helps!
-Mary