Products:
RAM/SN cellular router
Use Case / Problem Solved:
With the release of firmware 3.23/4.23, Red Lion introduced a new data logging feature on the SN/RAM Cellular modems. This new feature provides the ability to log various data points to an internal partition on the router or via an SD card (RAM9000 only) that can be later retrieved using HTTP or FTP. This guide is a walk through on how to format the SD card, setting up data logging, and data log retrieval. The SD card can also be used for uploading packages and firmware to the device, keeping config.xml files, and storage of stat files.
Required Software:
Windows PC
Required Firmware:
3.23/4.23 or higher
The following sections will be covered:
Part 1 – Formatting an SD Card
Part 2 – Setting up Data Logging
1. Log Setup
2. Data Points Set up
Part 3 – Retrieving Data Logs
1.1 Download via Web UI – Automation Menu
1.2 Download via Web UI – Services Menu
2. Download via FTP
Part 1 – Formatting an SD Card
NOTE: This relates to the RAM9000 series of cellular routers only. Please skip to part two if using an SN/RAM 6000 series router.
In this section, we will be formatting a new SD card for the purpose of data logging in the RAM 9000 Cellular routers. The RAM is capable of using a standard size SD card with a maximum capacity of 32 GB. A microSD card can also be used along with an adapter.
- On the front of the device, remove the screw and SD card cover to get access to the SD card slot.
- Insert the SD card into the slot
- Log into the SN/RAM Web UI
- Navigate to Services à SD Card Manager
NOTE: if the SD Card Manager page is already loaded prior to inserting the SD card, click the Refresh button under Browse Entire SD Card.
NOTE: If the SD Card is not being recognized, try to format the SD card by placing it a PC and formatting from the host OS such as Windows or MAC OS. If after formatting through a PC and the SD card is still not being recognized by the SN/RAM device, please contact support.
- When the SD card is recognized and mounted, the card will need to be formatted with the RAM’s directory structure. Click the Apply Directory Structure button to set up the SD card.
NOTE: This will completely erase the contents of the SD card. Remove any data from the card prior to formatting.
- A warning window will pop up as a reminder that the directory structure will be applied. Click OK to continue.
- Once the process is complete, a new window will be available showing the new directory structure. There will be a total of 5 new directories:
- configs – this directory is used to store config.xml files
- datalog – this directory is used to store the IO data logs
- firmware – this directory is used to place firmware files for upgrading
- packages – this directory is used to place zip packages and patches
- stats – this directory is used for storing gatherstat files
Files can be downloaded from this page as well as deleting files from the SD card. Click the appropriate button to perform the desired task.
- When the SD card needs to be removed, it is highly recommended to unmount the disk prior to removing from the RAM device. Removing the SD card without first unmounting the disk could result in a corrupted file system requiring a reformat of the disk. To unmount the SD card, click the Safe Unmount button under Unmount SD card at the top of the SD Card Manager page.
- Now that the SD card has been formatted with the correct directory structure, it is now ready for data logging.
Part 2 – Setting up Data Logging
1. Log Setup
- Navigate to Automation à Data Logger
- At the top of the Data Logger page, there are three buttons: [No Name], Add, and Remove. The reason the green button displays [No Name] is because the log file has yet to be given a name. Click the cursor into the Name Type the desired name of the log file.
- Once the name is typed into the Name field, it will automatically fill in the name into the green button at the top of the page. The name can only be alpha-numeric.
- From the Enable dropdown, choose whether to enable data logging. Default is Yes.
- In the Toggle Enable from IODB field, choose whether to use an IO register to determine when to start data logging. For example, if in the field, the register DI100 was entered, the RAM will only start to log data points if that register has gone high. Tag names may also be used in this field. If no register is entered, it will start logging immediately.
- In the Save Destination drop down, choose where the data logs should be saved: SD Card or Internal. If using a 6000 series cellular router, data can only be saved to the internal memory.
- In the Write Period (s) field, enter the time in seconds how often the data should be written to the data log file. For example, if 60 seconds are entered into the field, data points will be written to the data log once every minute. Default is 300 seconds.
- In the Log File Size (KB) field, enter how large the data file should be before it creates a new file. The maximum a file can be is 10240 KB or 10 MB and the smallest is 1 KB. The recommended file size is 2048 KB.
- In the Log Rotation Count, choose how many logs will be kept before start rotating out. For example, if 3 is entered, once there are a total of three files that meet the size of the Log File Size entered in the previous step, the oldest file will be overwritten with new data.
- In the Zip-compressed Log files drop down, choose if the data log files should be compressed or not. This can be beneficial when using an SD Card that has less than a Gigabyte of memory. Default is Yes.
- Once the data log is set up, we will need to set up which data points to log.
2. Data Points Set up
- The right side of the data logger page is where which data points to log can be chosen. There are two ways to enter data points: add a single point or add multiple points. Adding a single data point will only add one data point at a time where adding multiple points will make it much easier to add large blocks of data points at once.
- Data points can be entered by their tag name or by using the type and register location. Adding a data points using a tag name will autofill the rest of the fields. When the data point has been entered into its respective field, click the Add Point button and a new data point field will be added.
- To enter multiple data points at once, click the Add Multiple Points button.
- The Select Tags window will pop up.
- On the left hand side is a window with all the available data points. Select the desired data point by scrolling through the list and clicking the tag or filter for certain data points by entering text into the Filter text box.
- To review any data points from the Selected window, simply click the data point and it will be removed.
- Once all the data points have been selected, click the Select button.
- When all is set, click the Apply button.
To the top right of the Data Logger screen is a blue box labeled “Estimated Usage of Current Log”. This box will provide, based off of the Log File Size (KB) chosen earlier, the number of data points selected, Write Period, and Log Rotation Count, how long it will take to fill the log file. For example, writing 6 data points every second with a log size of 2.00 MB with only one Log in the rotation, the log will be full in approx. 20 hours, 48 min.
Part 3 – Retrieving Data Logs
This section will cover how to download data logs from the SN/RAM Cellular device. There are currently two ways to download data logs. This can be done using the SN/RAM’s web GUI or FTP. Both methods will be explained below. Note: There are several places to download data logs from the SN/RAM’s Web UI. Each area will be explained in section 1.
1.1 Download via Web UI – Automation Menu
- Log into the SN/ RAM’s web GUI locally over USB or Ethernet or over the Cellular link.
- Navigate to Automation – Data Logger
- At the bottom of the page, click the Show Logs button.
- In the Logs Saved to SD Card Window, click the desired log to be downloaded.
- Click the Download button at the bottom of the page.
- The CSV file will download to the default location on user’s PC.
- The contents of any file can also be viewed from inside web UI by clicking View at the bottom of the page.
- The data log can be downloaded from this window as well by clicking teh Download Entire File button.
- Click the Remove button to remove the data log file from the SD card.
- To return to the configuration page, click the Show Config button.
1.2: Download via Web UI – Services Menu
- Navigate to Services – SD Card Manager
- Under the Browse Entire SD Card window, expand the contents of the datalog “folder”.
- Click on the desired file to download. The Selected Files window will pop up displaying the file that will be downloaded to user’s PC. Note: Only one file can be downloaded at same time.
- Click Download to download to PC
- Files may be deleted from this menu as well by clicking on the file and selecting Delete File(s). Note: Multiple files can be deleted at once by clicking on each file.
2. Download via FTP
- Log into the SN/RAM web UI
- Navigate to Advanced – Expert Mode -- Configure Subsystem
- In the Select Sub-System to Configure dropdown, choose FTP Server.
- Click Start at the bottom of the page.
- Navigate to Network – Firewall – Port Allow/Forward Rules
- Under Service Access (Allow) Rules, click the + Add button.
- Set the following:
- Start port: 21
- Interface: All Untrusted
- Protocol: TCP
- Source (Whitelist): default
Note: It is recommended, if FTP will be enabled all the time, to create a whitelist (ACL) for this firewall rule.
- When done, click the Finish then Apply at the bottom of the page.
Note: To use Secure FTP to login to the modem and encrypt the connection, ensure SSH Server is enabled under Services – SSH/Telnet Server. If not, choose Yes from Enable SSH Server dropdown and click Apply.
- Open the desired FTP client software and log into the SN/RAM’s FTP Server using the following credentials:
- Username: jbmgatew
- Password: default password used for GUI access (unless previously changed by user)
- Once logged in, navigate to correct directory to download the file:
- When using SD card, the path is: /media/sdcard/datalog
- When using Internal memory, the path is: /datalog/
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement