Changes between Initial Version and Version 1 of gateworks_linux_test_commands


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • gateworks_linux_test_commands

    v1 v1  
     1= Gateworks Linux Example Test Commands =
     2Following is a list of commands that are available in the BSP from Gateworks that can be used in order to test the functionality of the product. Users can use these commands to further the functionality of there application.
     3
     4== PCI ==
     5=== Find available devices on the PCI Bus ===
     6{{{
     7lspci -v
     8}}}
     9
     10== USB ==
     11=== Find available devices on the USB Bus ===
     12{{{
     13lsusb -v
     14}}}
     15
     16
     17=== Manual Bring up madwifi Access Point ===
     18This should only be used to bring up access point manually, please use webgui to configure more advanced functions and be persistent across reboots:
     19
     20{{{
     21wlanconfig ath0 create wlandev wifi0 wlanmode ap
     22iwconfig ath0 essid test
     23ifconfig ath0 up
     24}}}
     25
     26== RTC ==
     27=== Read Time from RTC ===
     28{{{
     29hwclock -r
     30}}}
     31
     32=== Write current Time to RTC ===
     33{{{
     34hwclock -w
     35}}}
     36
     37== HWMON ==
     38=== Read Voltage ===
     39Different voltages can be read from the board, just change in0 to any of in0 - in12[[BR]]
     40The voltages read are current voltage * 1000
     41{{{
     42cat /sys/class/hwmon/hwmon0/device/in0_label
     43cat /sys/class/hwmon/hwmon0/device/in0_input
     44}}}
     45
     46=== Read Temperature ===
     47The temp read is current temp * 10
     48{{{
     49cat /sys/class/hwmon/hwmon0/device/temp0_input
     50}}}
     51
     52=== Set Fan Setpoint ===
     53The fan controller has 5 setpoints ranging from 50% on to 100% on, corresponding with fan0_point0 (50%) to fan0_poing5 (100%)
     54=== Read Current Setpoint ===
     55The setpoint read is current setpoint * 10
     56{{{
     57cat /sys/class/hwmon/hwmon0/device/fan0_point0
     58}}}
     59=== Write new Setpoint ===
     60Value to write is new temperatore * 10
     61{{{
     62echo 450 > /sys/class/hwmon/hwmon0/device/fan0_point0
     63}}}
     64
     65== GPIO ==
     66=== Read GPIO ===
     67Read the state of a GPIO Pin where "x" is the gpio number
     68{{{
     69gpioctl get x
     70}}}
     71
     72=== Set Direction of GPIO ===
     73{{{
     74gpioctl dirout x
     75gpioctl dirin x
     76}}}
     77
     78=== Set Output of GPIO ===
     79{{{
     80gpioctl clear x
     81gpioctl set x
     82}}}
     83
     84=== Check GPIO ===
     85
     86{{{
     87cat /sys/kernel/debug/gpio
     88}}}
     89
     90=== Set GPIO ===
     91
     92{{{
     93echo 0 > /sys/class/gpio/gpio10/value #set low
     94echo 255 > /sys/class/gpio/gpio10/value #set high
     95}}}
     96
     97== I2C ==
     98=== Detect all available i2c devices ===
     99{{{
     100i2cdetect -f -y 0
     101}}}
     102
     103=== Read i2c address ===
     104Where "x" is the device id, and "y" is the wanted address
     105{{{
     106i2cget -f -y 0 x y
     107}}}
     108
     109=== Write i2c Address ===
     110Where "x" is the device id, and "y" is the wanted address to write and "z" is the value to write
     111{{{
     112i2cset -f -y 0 x y z
     113}}}
     114
     115== Kernel Modules ==
     116=== Find modules loaded by kernel ===
     117{{{
     118lsmod
     119}}}