Data storage for Groov epic

I have a mobile data application in which I will not have network access. I thought I could use the USB ports to write out a data file and store the data for later processing.

Is there anyway to store about 250MB of data without adding another computer to the mix?

While you can not access the USB ports for data storage, you can easily access the local 3Gb of user file space on the EPIC.

From PAC Control, you can open a com handle to the file space and read and write to there.
From Node-RED you can use a File Node to read and write from the local file space.

In either case, you can then FTP the file to an FTP server for long term storage and processing once you are back to a location where the EPIC has network.

1 Like

That sounds like more than enough! :sunglasses: I am new to OPTO22 and I am trying to read TCP data now through a comm handle. Is there any sample code on how to open one to the file space?

Beno - I read your “sketch” on how to use comm handles in charts and will be trying it today to unpack a hex message string.

I am trying to learn quickly.

Yup, we have a sample right here;
https://www.opto22.com/support/resources-tools/downloads/1642_optotutorial_file_management_and_ftp-zip

Doc and sample code.

Well I wasn’t aware of the restriction on the USB port, I guess I just assumed it would be same as R/S series in this respect. Unfortunately I told someone that it did access the USB ports, although, the primary reason for this feature is to allow for adding a USB drive and then using the strategy to load a new strategy and reboot.

I found that Mikrotik routers have a USB port that can be used for this purpose and then using the FTP commands in Epic and install and reboot or restart. Is it still possible to do this (with any FTP device) on Epic?

I know that Kyle said that restricting access to the ports was for security reasons, but why not give the developer that choice to decide if they want “to restrict , or not restrict”? It seems to me this would be a pretty simple change…?

USB access is on the road map, we just need to decide a few issues first.

As far as uploading a new strategy from a USB stick, this is also on the roadmap, but is not as straight forward as just copying a file over and rebooting.

Look for both of these features in future firmware updates.

Ok, so right now you simply cannot move a strategy patch into Epic and then install and run it?
If not, when? My project starts n November.

If that is not an option up front, then how can I make this happen? I assume I could use a batch file on the associated PC and run command line?

Also, is it possible to run C code or batch file from the shell to stop Pac control, and load new strategy and start it?

Another idea is, will it be possible to run shell programs to access the USB?

I guess I want to be clear on one other thing. Is the user file space accessible from FTP internally and externally?
I get my LC tomorrow.

While I’m on the subject Beno…

I gather you have become a fan of Mikrotik and I thought I should mention here that most of the Mikrotik routers/switches come with a USB port on them. I have found that using this for a flash drive works pretty conveniently and the capability of fire wall rules for FTP is endless. It even has the capability of formatting the drive as well.

Hi ben, im trying to storage data from a Epic Pr2 via FTP but I couldn’t create it, The error it generates is file not found on server, but I ran the same program on an R1 and it worked without problems, I don’t know if I have to make a special configuration in the EPIC.

Hi Jorge. Welcome to the Opto forums.

Yes, the R1 uses a different path / file structure than the EPIC.

You will need to setup your file comm handle something like this:

“file:r,/home/dev/unsecured/filename.txt”
“file:w,/home/dev/unsecured/filename.txt”

Don’t forget the EPIC uses a Linux file system, so no spaces in file names (that’s the big one, there are a few other suggested rules).

I was already able to create the file temporarily in the epic, but it does not send it to the ftp server, which does register the connection attempt, the code I use to send it is the following.

SetCommunicationHandleValue(“file:a,/home/dev/unsecured/FTP.txt”,chGarzaHandle);
Estado_Archivo = OpenOutgoingCommunication(chGarzaHandle);
if (Estado_Archivo == 0) then
DelaySec (1.0);
SetCommunicationHandleValue(“ftp:xxx.xxx.xxx.xxx:21,anonymous,”,chGarzaFTP);
Estado_Archivo = OpenOutgoingCommunication(chGarzaFTP);
delaysec (5);
if (Estado_Archivo == 0) then
Estado_Archivo = SendCommunicationHandleCommand(chGarzaFTP, “appe:/home/dev/unsecured/FTP.txt,FTP.txt”);
if (Estado_Archivo == 0) then
Estado_Archivo = SendCommunicationHandleCommand(chGarzaHandle, “delete”);
endif
DelaySec (1.0);

Estado_Archivo = CloseCommunication(chGarzaFTP);

endif

Estado_Archivo = CloseCommunication(chGarzaHandle);
endif

Ah, sorry, your original post said ‘couldn’t create it’… That threw me off.

What version of EPIC firmware and what version of PAC Control do you have?
Both of those had FTP bug fixes some time back, but it’s possible you are using older versions with the issue in them.

At first I couldn’t, but with the change of instructions you gave me I was able to do it
(“file:w,/home/dev/unsecured/filename.txt”)

but now it does not send the file to the FTP Server after creating it internally in epic.

EPIC Firmware Version 3.6.0-b.32
PAC Control 10.5b

thanks for your attention

Hi Jorge, did you resolve the EPIC FTP problem,
I also met the same problem.

1 Like

Welcome to the forums!

Are you using PAC Control?
What firmware version is your EPIC running?
What is the error you are seeing?

Not exactly, I created the file at this address of the EPIC file:w,/home/dev/unsecured/T_FTP.txt, and then with NodeRed precisely this node “node-red-contrib-ftp: ftp in”, take the file from the path and sent it to the FTP address I wanted.

PAC Control:R10.2A
EPIC:3.6.0-b.32

Error: Check IP & Port when connect to EPIC from PAC Debug Mode

That does not sound like an FTP error.
That sounds like a PAC Control or PAC Terminal issue. (Perhaps even a local Windows firewall issue).

1 Like

I created 1 file each day and sample 1 point every 15 min. on EPIC: “/home/dev/unsecured/FTP.txt,” with Node-Red and PAC Control.

I need to get the EPIC files to PC via FTP, the program operates correctly in PAC R1 (data stored in Micro SD card), but in EPIC, Maybe I need to install FTP server on EPIC

1 Like