User Tools

Site Tools



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

Link to this comparison view

Both sides previous revision Previous revision
open_source:ccgx:commandline [2021-03-03 10:14]
mvader [4.4 vreg: changing settings from the command line]
open_source:ccgx:commandline [2021-03-03 11:46] (current)
mvader [4.4 vreg: changing settings from the command line]
Line 344: Line 344:
 </code> </code>
-Example of switching a solar charger off, and then on+Switching all devices on VE.Can off (carefulwhen having NMEA2000-out enabled, or having an Inverter RS, also AC will be switched off!):
 <code> <code>
-OFF: (vreg 0x0200, value 4) +vreg -c socketcan:can0 -s 0x0200 un32:0x000004 
-ccgx:~# vreg -n 0x45 -s 0x0200 un8:0x04 +</code>
-# NAD 0x45, reg=0x200 +
-0x04 0x00 0x00 0x00 +
-ON(vreg 0x0200, value 1) +switching a specific device off
-root@ccgx:~# vreg -n 0x45 -s 0x0200 un8:0x01 +<code> 
-# NAD 0x45reg=0x200 +vreg -c socketcan:can0 -s 0x0200 un32:0x000004 -n 0x24 
-0x01 0x00 0x00 0x00  +</code> 
-root@ccgx:~# vreg -n 0x45 -s 0x0200 un8:0x03+Note that in above example the VREG data field (un32) is padded with zeros; current firmware requires thatfuture fw won't any more.
-Gets can be broadcasted, run this command, and press ctrl-C to make it stop listen for responses:+Switch a specific device on: 
 +vreg -c socketcan:can0 -s 0x0200 un32:0x000001 -n 0x24 
 +Seeing which devices are off and which are on goes like this. Press ctrl-C to stop the command.
 vreg -c socketcan:can0 -g 0x200 -r vreg -c socketcan:can0 -g 0x200 -r
-root@einstein:~# vreg -c socketcan:can0 -g 0x0200 -r 
-# reminder, there are no error indications when broadcasting! 
-# NAD 0x24, reg=0x200 
-0x01 0x00 0x00 0x00  
-# NAD 0x25, reg=0x200 
-0x01 0x00 0x00 0x00  
-# NAD 0x26, reg=0x200 
-0x01 0x00 0x00 0x00  
-and so forth 
 </code> </code>
 ===== 5. VE.Direct products ===== ===== 5. VE.Direct products =====
open_source/ccgx/commandline.txt · Last modified: 2021-03-03 11:46 by mvader