User Tools

Site Tools


open_source:ccgx:commandline

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
open_source:ccgx:commandline [2019-01-22 10:43] – external edit 127.0.0.1open_source:ccgx:commandline [2019-04-15 21:10] – [5. VE.Direct products] mvader
Line 284: Line 284:
 Querying devices Querying devices
 Update end send Update end send
 +</code>
 +
 +==== 4.4 vreg: changing settings from the command line ====
 +
 +<code>
 +# vreg --help
 +vreg - Victron registers
 +
 +  -b,--bin
 +   Output in binary format.
 +
 +  -g,--get
 +   Get a register.
 +
 +  -n,--nad
 +   The NAD of the target device.
 +
 +  -r,--run
 +   Keep running.
 +
 +  -s,--set
 +   Set a register. Data is set with e.g. un16:2800 un16:12
 +
 +COMMON OPTIONS:
 +
 +  -c, --canbus
 +   Specifies the CAN-bus interface to use, formatted as [driver]:[channel].
 +   kvaser:1 will for example select the first Kvaser channel.
 +   -c ? will list the available gateways.
 +
 +  -d, --dump
 +   Dump the contents of the CAN bus frames. Specifying multiple times increases verbosity.
 +
 +  -h, --help
 +   Print this help.
 +
 +  --log-before <count>
 +   When set to non zero <count> number of log lines, which are
 +   not enabled themselves, are nevertheless shown before an
 +   log which is enabled. For example an error message will be
 +   preceeded by <count> warning and info messages which occured
 +   before the error. Combined with -v also warning messages will
 +   be preceeded by info messages
 +
 +  --log-after <count>
 +   Like -log-before, but temporarily enables tracing of disabled messages
 +   after a warning or error occured.
 +
 +  --silent
 +   Only listen, no messages or acks are sent
 +
 +  -v --verbose
 +   Enable log messages. Specifying multiple times increases verbosity.
 +
 +Victron Energy B.V.
 </code> </code>
 ===== 5. VE.Direct products ===== ===== 5. VE.Direct products =====
  
-List all services running:+==== 5.1 See connected devices ====
  
-  svstat /service/*+<code> 
 +svstat /service/| grep vedirect    
 +/service/vedirect-interface.ttyO2: up (pid 2020) 1210220 seconds, normally down 
 +/service/vedirect-interface.ttyO4: up (pid 2105) 1210218 seconds, normally down 
 +</code>
  
-Look for the product that you want to update, and claim the serial port:+==== 5.2 Firmware update ==== 
 + 
 +First stop the driver:
  
   /opt/victronenergy/serial-starter/stop-tty.sh /dev/ttyUSB0   /opt/victronenergy/serial-starter/stop-tty.sh /dev/ttyUSB0
Line 322: Line 383:
   /opt/victronenergy/serial-starter/start-tty.sh /dev/ttyUSB0   /opt/victronenergy/serial-starter/start-tty.sh /dev/ttyUSB0
  
 +==== 5.3 Changing settings & other remote commands ====
 +
 +See here: https://github.com/victronenergy/venus/wiki/dbus-api.
 +
 +That API allows to read and write VREGs. See MPPT, BMV and other HEX Protocol documents on our white paper section on the website for more information. Once you understood it all; its possible to reset a BMV too 100% with a one liner from the command line, ie "dbus -y com.victronenergy.battery.ttyO1 [find the right path] SetVreg [VREG] [DATA].
 +
 +The API will be used for a feature thats in progress: remotely changing settings of MPPTs, BMVs and other products connected to a GX device on the internet.
 ===== 6. Screenshot ===== ===== 6. Screenshot =====
  
open_source/ccgx/commandline.txt · Last modified: 2023-05-07 10:00 by mvader

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki