LM-Syracuse-infield

From VentureResearchWiki
Jump to navigation Jump to search

LM-Syracuse Infield[edit | edit source]

Danny Units[edit | edit source]

Automated Setup[edit | edit source]

In lieu of the following steps for setting up a Danny unit in the field, the BASH script danny_20150409a.sh attached to this web page can be copied onto the reader and run, provided that the requisite files are in the /tmp directory on the reader. It may be necessary to manually delete some conflicting packages related to the RFID service if they do not have the names anticipated in this script.

Check RFID Service Version[edit | edit source]

echo "get version" | nc localhost 2020 | grep ACK
echo "get build" | nc localhost 2020 | grep ACK

Install HTTPs fixes[edit | edit source]

  • Download these packages to your PC:
http://embedded.ventureresearch.com/yocto/danny/ipk/all/ca-certificates_20130119-r0_all.ipk
http://embedded.ventureresearch.com/yocto/danny/ipk/armv7a-vfp-neon/libcurl5_7.26.0-r1_armv7a-vfp-neon.ipk
http://embedded.ventureresearch.com/yocto/danny/ipk/armv7a-vfp-neon/curl_7.26.0-r1_armv7a-vfp-neon.ipk
  • Download their cert to your PC:
http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/syracuse/LockheedMartinRootCertificationAuthority.crt
  • Use WinSCP to copy over all the above files under /var/tmp/
  • Then install and setup the certs
opkg install /tmp/libcurl5_7.26.0-r1_armv7a-vfp-neon.ipk
opkg install /tmp/curl_7.26.0-r1_armv7a-vfp-neon.ipk
opkg install /tmp/ca-certificates_20130119-r0_all.ipk
  • If opkg shows corrupted on any of the above packages, do
cd /var/lib/opkg
tar xzf /tmp/varlibopkg.tar.gz

Continue mv /tmp/LockheedMartinRootCertificationAuthority.crt /usr/share/ca-certificates/ and then edit the file nano /etc/ca-certificates.conf by adding LockheedMartinRootCertificationAuthority?.crt at the bottom. Then do update-ca-certificates

  • To test whether the cert setup worked, send the following curl command from the device and make sure it doesn’t end with error.

curl https://mstappswebdev1.us.lmco.com/

Install latest RFID Service[edit | edit source]

  • Pre-Req:

Download the new Firmware file here:

http://embedded.ventureresearch.com/yocto/danny/ipk/armv7a-vfp-neon/vrfrv2-linux-event-5.1-db_5.1.1-r1381_armv7a-vfp-neon.ipk

Download and install a copy of WinSCP

(M:\tools\WinSCP) OR
http://winscp.net/download/winscp556setup.exe
  • FW Upgrade Instructions for Syracuse:

Use WinSCP to transfer over the new firmware

  • Open winSCP and connect to the particular device over SCP
  • Copy over the .ipk file over to the device’s “/home/user” directory

Check build and upgrade application

  • Go back to the SSH window and run the following command to get the current firmware package:
opkg list-installed | grep vrfrv2-linux

You may see something like this:

vrfrv2-linux-config - 1.0-r1                 << Ignore this
vrfrv2-linux-event-beta - 1.0-r1381          << This is what you are looking for
vrfrv2-linux-event-db - 5.1-r978             << Ignore this
vrfrv2-linux-event-dbpurge - 5.1-r978        << Ignore this
  • Remove the package by typing:
opkg remove [package name]”. Example: opkg remove vrfrv2-linux-event-beta
  • Install the new firmware
cd /home/user
opkg install vrfrv2-linux-event-5.1-db_5.1.1-r1381_armv7a-vfp-neon.ipk

Setup RFID Service configuration[edit | edit source]

  • Do
nc localhost 2020

and issue the following commands.

SET SERVERURL https://mstappswebdev1.us.lmco.com/RFID/common/VRPostTrans.aspx
SET DBDELIVERY ENABLED
SET DEVICEID [db device id]
SET HEARTBEAT ENABLED
SET HEARTBEATTIMER 65530
SET ASYNCMETADATA SYS RFID DEVICEID HOSTNAME
COMMIT
COMMIT
EXIT
  • Restart the RFID service
/etc/init.d/rfid restart

Setup db-purge[edit | edit source]

  • Copy over the db-purge.sh script to /home/user/
http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/src/forkliftreader_linux/utils/db-purge.sh
  • Enable execute permissions.
chmod a+x /home/user/db-purge.sh
  • crontab -e (edit like you would edit vi)
  • Delete the lines with db-archive and instead replace with the following:
15 5 * * 0     /home/user/db-purge.sh

Disable monit logs[edit | edit source]

sed -i 's/^set logfile/# set logfile/g' /etc/monitrc

Disable lighttpd[edit | edit source]

update-rc.d -f lighttpd remove

Setup Logrotate[edit | edit source]

  • Download these files to the PC
http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/vr/syslog.conf
http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/vr/syslog.logrotate
  • Copy them over via WinSCP to the tmp directory
  • Copy these in their respective locations
mv /tmp/syslog.conf /etc/syslog.conf
mv /tmp/syslog.logrotate /etc/logrotate.d/syslog
echo "0 0 * * * /usr/sbin/logrotate -v /etc/logrotate.conf" >> /var/spool/cron/root

Edison (old phase 2) Units[edit | edit source]

Check RFID Service Version[edit | edit source]

echo "get version" | nc localhost 2020 | grep ACK
echo "get build" | nc localhost 2020 | grep ACK

Install HTTPs fixes[edit | edit source]

  • First test whether the cert setup works and make sure it doesn’t end with error.
curl https://mstappswebdev1.us.lmco.com/
  • If curl fails then copy over these two files
http://embedded.ventureresearch.com/yocto/danny/ipk/all/ca-certificates_20130119-r0_all.ipk
http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/syracuse/LockheedMartinRootCertificationAuthority.crt
  • Move the files above to /tmp via WinSCP
mv /tmp/LockheedMartinRootCertificationAuthority.crt /usr/share/ca-certificates/
echo LockheedMartinRootCertificationAuthority.crt >> /etc/ca-certificates.conf
update-ca-certificates

Install latest RFID Service[edit | edit source]

  • If RFID service version is older than 760 then download the following package
http://embedded.ventureresearch.com/ipk/armv7a-vfp-neon/vrfrv2-linux-event-gps2.95_5.0-r760_armv7a-vfp-neon.ipk
  • Move the package to /tmp via WinSCP
  • Upgrade application
cd /tmp
opkg install vrfrv2-linux-event-gps2.95_5.0-r760_armv7a-vfp-neon.ipk

Setup RFID Service configuration[edit | edit source]

SET SERVERURL https://mstappswebdev1.us.lmco.com/RFID/common/VRPostTrans.aspx
SET DBDELIVERY ENABLED
SET DEVICEID [db device id]
SET HEARTBEAT ENABLED
SET HEARTBEATTIMER 300
SET ASYNCMETADATA SYS RFID DEVICEID HOSTNAME

Setup db-purge[edit | edit source]

  • Copy over the db-purge.sh script to /home/user/

http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/src/forkliftreader_linux/utils/db-purge.sh

  • Enable execute permissions.
chmod a+x /home/user/db-purge.sh
  • crontab -e (edit like you would edit vi)
  • Delete the lines with db-archive and instead replace with the following:
15 5 * * 0     /home/user/db-purge.sh

Disable monit logs[edit | edit source]

sed -i 's/^set logfile/# set logfile/g' /etc/monitrc

Disable lighttpd[edit | edit source]

update-rc.d -f lighttpd remove

Setup Logrotate[edit | edit source]

sed -i 's/#ROTATESIZE=0/ROTATESIZE=100/' /etc/syslog-startup.conf
sed -i 's/#ROTATEGENS=3/ROTATEGENS=3/' /etc/syslog-startup.conf
/etc/init.d/syslog restart

Troubleshooting[edit | edit source]

If the memory is full when trying to copy files over, install packages, or unzip the opkg updates then do the following:

  1. Look for large log files in /www/logs and /var/log/
  2. Remove the large files (monit.log and lighttpd files can be removed)
  3. Reboot the device and try again