User Tools

Site Tools


ve.can:changing_nmea2000_instances

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
ve.can:changing_nmea2000_instances [2020-06-27 21:26]
mvader [4. Changing Instance Using Maretron N2KAnalyzer]
ve.can:changing_nmea2000_instances [2020-06-28 21:36] (current)
mvader [5.2 New method - changing Data instance]
Line 16: Line 16:
  
   - Use [[http://​www.actisense.com/​|Actisense]] software & hardware. Can change both the device- and data-instances ​   - Use [[http://​www.actisense.com/​|Actisense]] software & hardware. Can change both the device- and data-instances ​
-  - Use [[https://​www.maretron.com/​|Maretron]] software & hardware. +  - Use [[https://​www.maretron.com/​|Maretron]] software & hardware. Can change device instance only
-  - From the [[open_source:​ccgx:​commandline|commandline]] ​of a [[venus-os:​start|GX device]]. Note that this is a software developer trick. Not for any day use.+  - From the commandline of a [[venus-os:​start|GX device]]. Note that this is a software developer trick. Not for any day use. Allows changing device instances as well as data instances.
  
 === Device instance, data instances and other instances === === Device instance, data instances and other instances ===
-There various types of instances. Please make sure to study [[https://​www.victronenergy.com/​live/​ccgx:​start#​marine_mfd_integration_by_nmea_2000|the NMEA2000-out chapter in the GX manual]] before continuing. 
  
-In summary, and as per NMEA2000 specification,​ it should not be necessary to change a data instance such as the DC instance. +There various types of instances, and for marine systems are two that matter in most cases: the Device instance ​as well as the Data instance. ​Please make sure to study [[https://www.victronenergy.com/live/ccgx:​start#​marine_mfd_integration_by_nmea_2000|the NMEA2000-out chapter in the GX manual]] before continuing. It also links to specific instructions for Raymarine, GarminFuruno, Simrad, B&G and Lowrance MFDs.
- +
-=== Required hardware === +
- +
-Changing the device instance requires an usb-canbus adapter ​to link the CAN-bus network to your computer: +
- +
-  * For Actisense, see the [[http://www.actisense.com/product/​nmea-2000-to-pc-interface-ngt-1/|Actisense NGT-1]] +
-  * For Maretronsee their [[https://​www.maretron.com/​products/​usb100.php|USB100]]+
  
 === Related information === === Related information ===
Line 40: Line 32:
  
 Note: make sure to use a recent Actisense driver. Otherwise the instance might not ‘stick’. Note: make sure to use a recent Actisense driver. Otherwise the instance might not ‘stick’.
 +
 +Requires the [[http://​www.actisense.com/​product/​nmea-2000-to-pc-interface-ngt-1/​|Actisense NGT-1]].
  
 Changing a device instance: Changing a device instance:
Line 51: Line 45:
  
 ===== 3. Changing a data instance with Actisense ===== ===== 3. Changing a data instance with Actisense =====
 +
 +Requires the [[http://​www.actisense.com/​product/​nmea-2000-to-pc-interface-ngt-1/​|Actisense NGT-1]].
  
 Changing a data instance: Changing a data instance:
Line 69: Line 65:
  
 WARNING: At Victron we do not understand what and how the Maretron software works with regards to this. We advise to use another tool, not Maretron, so that you know what you are doing, ie know what instance you are changing. So far, we have not been able to use Maretron software to change a data instance. And changing the other instance, the device instance can also be done straight from the Victron GX device its user interface. To change a data instance, for example to fix instance conflicts as reported by the Maretron software, we recommend to use Actisense. Not Maretron. WARNING: At Victron we do not understand what and how the Maretron software works with regards to this. We advise to use another tool, not Maretron, so that you know what you are doing, ie know what instance you are changing. So far, we have not been able to use Maretron software to change a data instance. And changing the other instance, the device instance can also be done straight from the Victron GX device its user interface. To change a data instance, for example to fix instance conflicts as reported by the Maretron software, we recommend to use Actisense. Not Maretron.
 +
 +This procedure requires a Maretron USB adapter.
  
 Open N2KAnalyzer and make sure that the "​Unique Instance"​ column is turned on (i.e. checked) using the Setup>​Columns menu item. Open N2KAnalyzer and make sure that the "​Unique Instance"​ column is turned on (i.e. checked) using the Setup>​Columns menu item.
Line 78: Line 76:
 {{:​ve.can:​maretronn2kanalyzeranalyzeinstancing.jpg?​850|}} ​   {{:​ve.can:​maretronn2kanalyzeranalyzeinstancing.jpg?​850|}} ​  
  
-===== 5. Changing the DeviceInstance ​from the CCGX command line ===== +===== 5. Changing the instances ​from the GX command line ===== 
-Instead of using Actisense or Maretron software, it is also possible to change the device ​instance from the Color Control ​shell. To get root access, follow these instructions:​ [[ccgx:​root_access]]+ 
 +==== 5.1 Introduction ​==== 
 +Instead of using Actisense or Maretron software, it is also possible to change the VE.Can aka N2K Device ​instance from the GX Device ​shell. To get root access, follow these instructions:​ [[ccgx:​root_access]]
 + 
 +Once logged into the shell, follow below instructions. More back ground information of the used commands such as dbus and dbus-spy is found by reading about root access document. 
 + 
 +==== 5.1 New method - changing a Device instance ==== 
 + 
 +All devices available on the canbus are enumerated under the com.victronenergy.vecan service. And for all devices that support the necessary can-bus commands, the Device instance can be changed. All Victron products support changing their Device instance; and most or all non-Victron products as well. 
 + 
 +<​code>​ 
 +# dbus -y com.victronenergy.vecan.can0 / GetValue 
 +value = { 
 + '​Devices/​00002CC001F4/​DeviceInstance':​ 0, 
 + '​Devices/​00002CC001F4/​FirmwareVersion':​ '​v2.60-beta-29',​ 
 + '​Devices/​00002CC001F4/​Manufacturer':​ 358, 
 + '​Devices/​00002CC001F4/​ModelName':​ 'Cerbo GX', 
 + '​Devices/​00002CC001F4/​N2kUniqueNumber':​ 500, 
 + '​Devices/​00002CC001F4/​Nad':​ 149, 
 + '​Devices/​00002CC001F4/​Serial':​ '​0000500',​ 
 + '​Devices/​00002CC005EA/​CustomName':​ '​Hub-1',​ 
 + '​Devices/​00002CC005EA/​DeviceInstance':​ 0, 
 + '​Devices/​00002CC005EA/​FirmwareVersion':​ '​v2.60-beta-29',​ 
 + '​Devices/​00002CC005EA/​Manufacturer':​ 358, 
 + '​Devices/​00002CC005EA/​ModelName':​ 'Color Control GX', 
 + '​Devices/​00002CC005EA/​N2kUniqueNumber':​ 1514, 
 + '​Devices/​00002CC005EA/​Nad':​ 11, 
 + '​Devices/​00002CC005EA/​Serial':​ '​0001514',​ 
 + '​Devices/​00002CC005EB/​CustomName':​ '​SmartBMV',​ 
 + [and so forth] 
 +</​code>​ 
 + 
 +To change them, do a SetValue call to the DeviceInstace path like below. Or, perhaps easier, use the dbus-spy tool. 
 + 
 +These lines read it, then changes it to 1, then reads it again: 
 +<​code>​ 
 +root@ccgx:​~#​ dbus -y com.victronenergy.vecan.can0 /​Devices/​00002CC005EB/​DeviceInstance GetValue 
 +value = 0 
 +root@ccgx:​~#​ dbus -y com.victronenergy.vecan.can0 /​Devices/​00002CC005EB/​DeviceInstance SetValue %1 
 +retval = 0 
 +root@ccgx:​~#​ dbus -y com.victronenergy.vecan.can0 /​Devices/​00002CC005EB/​DeviceInstance GetValue 
 +value = 1 
 + 
 +[note that numbers, like can0, and 00002CC005EB can ofcourse be different on your system]. 
 +</​code>​ 
 + 
 +==== 5.2 New method - changing Data instance ==== 
 + 
 +This applies only the NMEA2000-out feature. See links on top of page for what the NMEA2000 out feature is. 
 + 
 +The data instances used for the NMEA2000 out feature are stored in local settings. Here is a snippet of the lines, taken by using the dbus-spy tool that also allows changing entries: 
 + 
 +The Data instances are the "​Battery-",​ "​DCDetailed-",​ and so forth instances. 
 +<​code>​ 
 +Settings/​Vecan/​can0/​Forward/​battery/​256/​BatteryInstance0 ​      ​0 ​     <- Data instance for main voltage measurement 
 +Settings/​Vecan/​can0/​Forward/​battery/​256/​BatteryInstance1 ​      ​1 ​     <- Data instance for starter or mid-voltage measurement 
 +Settings/​Vecan/​can0/​Forward/​battery/​256/​Description2 ​                           
 +Settings/​Vecan/​can0/​Forward/​battery/​256/​IdentityNumber ​       15 
 +Settings/​Vecan/​can0/​Forward/​battery/​256/​Instance ​              1 
 +Settings/​Vecan/​can0/​Forward/​battery/​256/​Nad ​                 233      <- Source address - no need, also not good, to change this 
 +Settings/​Vecan/​can0/​Forward/​battery/​256/​SwitchInstance1 ​       0      <- Data instance for switchbank 
 +Settings/​Vecan/​can0/​Forward/​battery/​256/​SystemInstance ​        0 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​0/​DcDataInstance0 ​    0 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​0/​DcDataInstance1 ​    1 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​0/​Description2 ​        
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​0/​IdentityNumber ​    25 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​0/​Instance ​           0 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​0/​Nad ​               36 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​0/​SystemInsta ​        0 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​1/​DcDataInstance0 ​    ​0 ​     <- Battery voltage & current 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​1/​DcDataInstance1 ​    ​1 ​     <- PV voltage & current 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​1/​Description2 ​                                                  
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​1/​IdentityNumber ​    24 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​1/​Instance ​           0 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​1/​Nad ​               36 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​1/​SystemInstance ​     0 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​258/​DcDataInstance0 ​  0 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​258/​DcDataInstance1 ​  1 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​258/​Description2 ​                                                               
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​258/​IdentityNumber ​  23 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​258/​Instance ​         0 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​258/​Nad ​             36 
 +Settings/​Vecan/​can0/​Forward/​solarcharger/​258/​SystemInstance ​   0 
 +</​code>​ 
 +==== 5.3 Old method ==== 
 + 
 +(Only allows changing Device instances - not data instances as used in the NMEA2000-out function)
  
-Once logged into the shell, follow below instructions. Note that the example shown changes the device instance of a Skylla-i. The device instance of a VE.Can connected MultiPlus or Quattro can be changed as well. It will show as  ''​%%com.victronenergy.vebus.socketcan_can0_di0_xxxx%%''​. 
  
 Step 1. List the devices: Step 1. List the devices:
Line 107: Line 190:
 Device instance changed successful! Device instance changed successful!
  
- 
-===== DISQUS ===== 
-~~DISQUS~~ 
  
ve.can/changing_nmea2000_instances.txt · Last modified: 2020-06-28 21:36 by mvader