ERPlan

From VentureResearchWiki
Jump to navigation Jump to search

BOARD SETUP[edit | edit source]

latest RELEASE is 20131017

U-boot[edit | edit source]

After reboot keep pressing the space-bar until prompt "VAR-SOM-AM35 #"

bootp
mw.b 0x80000000 0xff 0x1c0000
tftp 0x80000000 u-boot-vrreader-am35-20131017.bin
nand erase 0x80000 1c0000
nand write 0x80000000 0x80000 1c0000
reset

kernel[edit | edit source]

  • Keep pressing the space-bar until prompt "VAR-SOM-AM35 #"
## Do this only if there isn't one set already ## setenv ethaddr [MAC in format 00:50:c2:7c:57:01, F8:DC:7A:00:A7:C8]
setenv get_kernel nand read.i 0x80000000 0x280000 0x400000
setenv bootargs_fs mem=256M console=ttyO2,115200n8 noinitrd rw rootfstype=ubifs ubi.mtd=4 root=ubi0:rootfs eth=$ethaddr
setenv boot_fs run get_kernel\; setenv bootargs \$bootargs_fs\; bootm 0x80000000
setenv bootcmd run boot_fs
setenv bootdelay 1
printenv ethaddr 
save
reset
  • Keep pressing the space-bar until prompt "VAR-SOM-AM35 #"
bootp
mw.b 0x80000000 0xFF 0x500000
tftp 0x80000000 uImage-vrreader-am35-20131017.bin
nand erase 0x280000 0x500000
nand write 0x80000000 0x280000 0x400000
setenv bootargs console=ttyO2,115200n8 root=/dev/nfs rw ip=dhcp nfsroot=192.168.19.128:/srv/nfs/image eth=$ethaddr
bootm 0x80000000

filesystem[edit | edit source]

wget http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/vr/vr-prefirstrun.sh -O /tmp/vr-prefirstrun.sh
sh /tmp/vr-prefirstrun.sh vrreader-am35 20131017
type password "0291" where needed

provisioning[edit | edit source]

first run[edit | edit source]

wget http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/vr/vr-firstrun.sh -O - | sh


opkg update
opkg install vrfrv2-linux-event
wget http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/vr/checkReaderCnx_VR.sh -O /home/user/checkReaderCnx_VR.sh
wget http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/vr/checkINETCnx_VR.sh -O /home/user/checkINETCnx_VR.sh
wget http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/vr/BIST_VR.sh -O /home/user/BIST_VR.sh
Login Information[edit | edit source]
username: root
password: rfid4ever_vr

board testing[edit | edit source]

sh /home/user/BIST_VR.sh VRLAB PROVIS

done with board

nc localhost 2020
set analoginputs enabled
set petriggerthld 4ft
set an1file /sys/bus/i2c/devices/3-0049/in4_input
set triggerinput 5
set triggerlevel 1 0 0 0 1 0 0 0
commit

Wi-Fi[edit | edit source]

opkg install wireless-tools ralink-usb-module wpa-supplicant

append the following to vr-setup-gpio

# ADS1015 analog
if [ ! -f /sys/bus/i2c/devices/3-0049/in4_input ]; then
echo ads1015 0x49 > /sys/bus/i2c/devices/i2c-3/new_device
fi
# silence wireless debug messages
iwpriv ra0 set Debug=0
# sbs-battery
if [ ! -f /sys/bus/i2c/devices/3-000b/power_supply/sbs-battery-0/present ]; then
echo sbs-battery 0x0b > /sys/bus/i2c/devices/i2c-3/new_device
fi
   

edit /etc/network/interfaces and comment out all the wireless interface lines

# Wireless interfaces
# auto ra0
# iface ra0 inet dhcp
#        wireless_mode managed
#        wpa-driver wext
#        wpa-conf /etc/wpa_supplicant.conf

-- this isn't needed -- remove other wifi ralink drivers

-- opkg remove kernel-module-rt2800lib kernel-module-rt2800usb kernel-module-rt2x00lib kernel-module-rt2x00usb

copy over Wi-Fi connection file

scp venture@10.19.6.1:~/vr/system-connections/Wi-Fi-vrtest /etc/NetworkManager/system-connections/Wi-Fi
chmod 600 /etc/NetworkManager/system-connections/Wi-Fi
/etc/init.d/NetworkManager restart

may want to reboot once here make sure you get an IP address and can ping out.

Battery[edit | edit source]

Setup Battery module

opkg update
opkg install kernel-module-sbs-battery
modprobe sbs-battery

setup in rfid service

nc localhost 2020
SET BATTERYFILE /sys/class/power_supply/sbs-battery-0
COMMIT

add to end of /usr/sbin/vr-setup-gpio

# add battery
modprobe sbs-battery
echo sbs-battery 0x0b > /sys/bus/i2c/devices/i2c-3/new_device

test battery

get bat

Test battery

cat /sys/class/power_supply/sbs-battery-0/status
cat /sys/class/power_supply/sbs-battery-0/capacity
cat /sys/class/power_supply/sbs-battery-0/current_now
cat /sys/class/power_supply/sbs-battery-0/voltage_now