• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Vesa Kauppinen
    3. Posts
    • Profile
    • Following 2
    • Followers 1
    • Topics 11
    • Posts 42
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by Vesa Kauppinen

    • RE: Reading the ModBus bus with the Patron

      Hi,

      How can i ask the holding register 1003 with mbpoll?

      @AVsetula said in Reading the ModBus bus with the Patron:

      To verify communication with all our Modbus devices, I recommend asking the holding register 1003, which is available for all Modbus devices Unipi and whith contains a unique identifier, according to which the device can also be recognized.

      Thank you!

      /Vesa

      posted in Other Peripherals
      Vesa Kauppinen
      Vesa Kauppinen
    • Patron's service mode and USB stick recovery no longer work.

      @Martin-Kudláček

      Hi,

      I have run apt update && apt upgrade

      Now, Patron's service mode and USB stick recovery no longer work.

      root@M527-sn60:~# cat /var/log/apt/history.log
      
      Start-Date: 2022-04-01  10:03:53
      Commandline: apt install git -y
      Requested-By: unipi (1000)
      Install: libnghttp2-14:arm64 (1.36.0-2+deb10u1, automatic), libsasl2-modules-db:arm64 (2.1.27+dfsg-1+deb10u2, automatic), libldap-2.4-2:arm64 (2.4.47+dfsg-3+deb10u6, automatic), git-man:arm64 (1:2.20.1-2+deb10u3, automatic), perl-modules-5.28:arm64 (5.28.1-6+deb10u1, automatic), git:arm64 (1:2.20.1-2+deb10u3), libsasl2-2:arm64 (2.1.27+dfsg-1+deb10u2, automatic), libperl5.28:arm64 (5.28.1-6+deb10u1, automatic), librtmp1:arm64 (2.4+20151223.gitfa8646d.1-2, automatic), libsasl2-modules:arm64 (2.1.27+dfsg-1+deb10u2, automatic), libldap-common:arm64 (2.4.47+dfsg-3+deb10u6, automatic), libgdbm6:arm64 (1.18.1-4, automatic), perl:arm64 (5.28.1-6+deb10u1, automatic), libgdbm-compat4:arm64 (1.18.1-4, automatic), patch:arm64 (2.7.6-3+deb10u1, automatic), libcurl3-gnutls:arm64 (7.64.0-4+deb10u2, automatic), liberror-perl:arm64 (0.17027-2, automatic)
      End-Date: 2022-04-01  10:04:11
      
      Start-Date: 2022-04-01  10:07:57
      Commandline: apt install jq -y
      Install: jq:arm64 (1.5+dfsg-2+b1), libjq1:arm64 (1.5+dfsg-2+b1, automatic), libonig5:arm64 (6.9.1-1, automatic)
      End-Date: 2022-04-01  10:07:59
      
      Start-Date: 2022-04-01  10:08:12
      Commandline: apt install sshpass -y
      Install: sshpass:arm64 (1.06-1)
      End-Date: 2022-04-01  10:08:12
      
      Start-Date: 2022-04-01  10:08:25
      Commandline: apt-get remove --auto-remove sshpass -y
      Remove: sshpass:arm64 (1.06-1)
      End-Date: 2022-04-01  10:08:26
      
      Start-Date: 2022-04-01  10:12:12
      Commandline: apt install curl
      Requested-By: unipi (1000)
      Install: libcurl4:arm64 (7.64.0-4+deb10u2, automatic), curl:arm64 (7.64.0-4+deb10u2)
      End-Date: 2022-04-01  10:12:13
      
      Start-Date: 2022-04-06  07:03:06
      Commandline: apt upgrade -y
      Requested-By: unipi (1000)
      Upgrade: zulu-kernel-image:arm64 (0.20220215~buster-zulu, 0.20220404~buster-zulu), zulu-unipi-kernel-modules:arm64 (1.106.0.20220215~buster-zulu, 1.108.0.20220404~buster-zulu), zlib1g:arm64 (1:1.2.11.dfsg-1, 1:1.2.11.dfsg-1+deb10u1), zulu-u-boot:arm64 (0.44~buster-zulu, 0.46~buster-zulu)
      End-Date: 2022-04-06  07:03:14
      root@M527-sn60:~#
      
      root@M527-sn60:~# uname -a
      Linux M527-sn60 5.10.35 #1 SMP PREEMPT Mon Apr 4 21:09:57 UTC 2022 aarch64 GNU/Linux
      

      Br,
      Vesa

      posted in Operating system
      Vesa Kauppinen
      Vesa Kauppinen
    • Patron: Get CPU serial number

      Ping @Martin-Kudláček

      If I want to find out the Patron CPU serial number, is it like this?

      cat /sys/devices/soc0/serial_number
      

      ...or

      cat /sys/devices/soc0/soc_uid
      

      Second question: If this is the serial number of the CPU, is it unique to all devices?

      Thank you!

      /Vesa

      posted in Other Peripherals
      Vesa Kauppinen
      Vesa Kauppinen
    • Wrong device model in EVOK (Patron)

      Hi,

      EVOK provides incorrect information on Patron:

      {
        "glob_dev_id": 1,
        "last_comm": 0.06514811515808105,
        "ver2": "0.1",
        "sn": 60,
        "circuit": "1",
        "model": "M527",
        "dev": "neuron", <-- Should be patron
        "board_count": 2
      }
      

      Could you fix this, please?

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • Reading the ModBus bus with the Patron

      Hi,

      I have tested to read the Kamstrup 803 meter on the Patron M527 via Modbus.

      However, I don't get any results from mbpoll.

      root@M527-sn60:~# mbpoll /dev/extcomm/0/1 -m rtu -P none -d 8 -s 1 -b 19200 -a 44
      mbpoll 1.4-12 - FieldTalk(tm) Modbus(R) Master Simulator
      Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
      This program comes with ABSOLUTELY NO WARRANTY.
      This is free software, and you are welcome to redistribute it
      under certain conditions; type 'mbpoll -w' for details.
      
      Protocol configuration: Modbus RTU
      Slave configuration...: address = [44]
                              start reference = 1, count = 1
      Communication.........: /dev/extcomm/0/1,      19200-8N1 
                              t/o 1.00 s, poll rate 1000 ms
      Data type.............: 16-bit register, output (holding) register table
      
      -- Polling slave 44... Ctrl-C to stop)
      Read output (holding) register failed: Connection timed out
      -- Polling slave 44... Ctrl-C to stop)
      Read output (holding) register failed: Connection timed out
      -- Polling slave 44... Ctrl-C to stop)
      Read output (holding) register failed: Connection timed out
      

      Same result on mbpoll /dev/extcomm/0/0 -m rtu -P none -d 8 -s 1 -b 19200 -a 44

      Br,
      Vesa

      posted in Other Peripherals
      Vesa Kauppinen
      Vesa Kauppinen
    • Axon M505 SWUpdate gives error

      Hi,

      Otherwise SWUpdate works fine, but the message section shows an error message:

      Software Update started !
      
      ERROR : Configuration file /etc/fw_env.config wrong or corrupted
      
      Installation in progress
      

      Do you have to worry about that?

      Br,
      Vesa

      posted in Axon series
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: After upgrading the M503, circuit 1 completely disappeared.

      Hi @martin-kudláček !

      Did you receive my email?

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: After upgrading the M503, circuit 1 completely disappeared.

      Hi @martin-kudláček

      I sent email to support@unipi.technology

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: After upgrading the M503, circuit 1 completely disappeared.

      @martin_triska said in After upgrading the M503, circuit 1 completely disappeared.:

      lsmod | grep unipi

      Hi @martin_triska,

      Thank you for your answer! I got the following answer:

      root@residevice:~# lsmod | grep unipi
      unipi                  94208  0
      industrialio           73728  1 unipi
      
      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: After upgrading the M503, circuit 1 completely disappeared.

      Hi @tomas_hora,

      Have you come up with new ideas in this regard?

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: After upgrading the M503, circuit 1 completely disappeared.

      @tomas_hora said in After upgrading the M503, circuit 1 completely disappeared.:

      dmesg | grep UNIPISPI

      The device is hundreds of miles away, so I can't watch the LEDs.

      dmesg | grep UNIPISPI doesn't output anything.

      /Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: After upgrading the M503, circuit 1 completely disappeared.

      Hi @tomas_hora

      root@residevice:/opt/unipi/tools# ./fwspi -i 0
      Boardset:     0 B-1000                         (v1.0)
      Baseboard:    0 B-1000                         (v1.0)
      Firmware: v5.31
      
      root@residevice:/opt/unipi/tools# ./fwspi -i 1
      Unable to create the arm[1] context
      
      root@residevice:/opt/unipi/tools# ./fwspi -i 2
      Unable to create the arm[2] context
      

      /Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • After upgrading the M503, circuit 1 completely disappeared.

      Hi,

      I did the following for the Neuron M503 with Raspbian Stretch Lite and old EVOK:

      sudo su 
      systemctl stop neurontcp && systemctl stop evok
      
      bash /opt/evok/uninstall-evok.sh
      rm -rf /var/www/evok
      rm /etc/systemd/system/evok.service
      
      sudo su 
      echo "deb https://repo.unipi.technology/debian stretch main" >> /etc/apt/sources.list.d/unipi.list
      wget https://repo.unipi.technology/debian/unipi_pub.gpg -O - | apt-key add
      apt update
      apt upgrade -y
      reboot
      
      sudo su
      apt install -y neuron-kernel unipi-firmware unipi-modbus-tools
      apt autoremove -y
      
      apt install nginx -y
      rm -f /etc/nginx/sites-enabled/default
      apt install evok -y
      systemctl enable evok
      reboot
      

      Firmware:

      root@residevice:/opt/unipi/tools# ./fwspi -i 0
      Boardset:     0 B-1000                         (v1.0)
      Baseboard:    0 B-1000                         (v1.0)
      Firmware: v5.31
      

      After update there is no circuit 1_ :

      root@residevice:~# wget http://localhost:8080/rest/all
      
      [{
      		"counter_modes": ["Enabled", "Disabled"],
      		"glob_dev_id": 1,
      		"modes": ["Simple", "DirectSwitch"],
      		"value": 0,
      		"circuit": "2_05",
      		"debounce": 50,
      		"counter": 0,
      		"counter_mode": "Enabled",
      		"dev": "input",
      		"mode": "Simple"
      	}, {
      		"counter_modes": ["Enabled", "Disabled"],
      		"glob_dev_id": 1,
      		"modes": ["Simple", "DirectSwitch"],
      		"value": 0,
      		"circuit": "2_04",
      		"debounce": 50,
      		"counter": 0,
      		"counter_mode": "Enabled",
      		"dev": "input",
      		"mode": "Simple"
      	}, {
      		"counter_modes": ["Enabled", "Disabled"],
      		"glob_dev_id": 1,
      		"modes": ["Simple", "DirectSwitch"],
      		"value": 0,
      		"circuit": "2_06",
      		"debounce": 50,
      		"counter": 0,
      		"counter_mode": "Enabled",
      		"dev": "input",
      		"mode": "Simple"
      	},
      	{
      		"counter_modes": ["Enabled", "Disabled"],
      		"glob_dev_id": 1,
      		"modes": ["Simple", "DirectSwitch"],
      		"value": 0,
      		"circuit": "2_01",
      		"debounce": 50,
      		"counter": 0,
      		"counter_mode": "Enabled",
      		"dev": "input",
      		"mode": "Simple"
      	},
      	{
      		"counter_modes": ["Enabled", "Disabled"],
      		"glob_dev_id": 1,
      		"modes": ["Simple", "DirectSwitch"],
      		"value": 0,
      		"circuit": "2_03",
      		"debounce": 50,
      		"counter": 0,
      		"counter_mode": "Enabled",
      		"dev": "input",
      		"mode": "Simple"
      	}, {
      		"counter_modes": ["Enabled", "Disabled"],
      		"glob_dev_id": 1,
      		"modes": ["Simple", "DirectSwitch"],
      		"value": 0,
      		"circuit": "2_02",
      		"debounce": 50,
      		"counter": 0,
      		"counter_mode": "Enabled",
      		"dev": "input",
      		"mode": "Simple"
      	},
      	{
      		"glob_dev_id": 1,
      		"modes": ["Simple"],
      		"value": 0,
      		"circuit": "2_05",
      		"pending": false,
      		"relay_type": "physical",
      		"dev": "relay",
      		"mode": "Simple"
      	}, {
      		"glob_dev_id": 1,
      		"modes": ["Simple"],
      		"value": 0,
      		"circuit": "2_04",
      		"pending": false,
      		"relay_type": "physical",
      		"dev": "relay",
      		"mode": "Simple"
      	}, {
      		"glob_dev_id": 1,
      		"modes": ["Simple"],
      		"value": 0,
      		"circuit": "2_01",
      		"pending": false,
      		"relay_type": "physical",
      		"dev": "relay",
      		"mode": "Simple"
      	},
      	{
      		"glob_dev_id": 1,
      		"modes": ["Simple"],
      		"value": 0,
      		"circuit": "2_03",
      		"pending": false,
      		"relay_type": "physical",
      		"dev": "relay",
      		"mode": "Simple"
      	},
      	{
      		"glob_dev_id": 1,
      		"modes": ["Simple"],
      		"value": 0,
      		"circuit": "2_02",
      		"pending": false,
      		"relay_type": "physical",
      		"dev": "relay",
      		"mode": "Simple"
      	},
      	{
      		"glob_dev_id": 1,
      		"unit": "V",
      		"value": 3.858161211013794,
      		"circuit": "2_04",
      		"range_modes": ["0.0", "2.5", "10.0"],
      		"modes": ["Voltage", "Current", "Resistance"],
      		"range": "10.0",
      		"dev": "ai",
      		"mode": "Voltage"
      	}, {
      		"glob_dev_id": 1,
      		"unit": "V",
      		"value": 3.7661192417144775,
      		"circuit": "2_01",
      		"range_modes": ["0.0", "2.5", "10.0"],
      		"modes": ["Voltage", "Current", "Resistance"],
      		"range": "10.0",
      		"dev": "ai",
      		"mode": "Voltage"
      	},
      	{
      		"glob_dev_id": 1,
      		"unit": "V",
      		"value": 3.1529541015625,
      		"circuit": "2_03",
      		"range_modes": ["0.0", "2.5", "10.0"],
      		"modes": ["Voltage", "Current", "Resistance"],
      		"range": "10.0",
      		"dev": "ai",
      		"mode": "Voltage"
      	}, {
      		"glob_dev_id": 1,
      		"unit": "V",
      		"value": 3.2787086963653564,
      		"circuit": "2_02",
      		"range_modes": ["0.0", "2.5", "10.0"],
      		"modes": ["Voltage", "Current", "Resistance"],
      		"range": "10.0",
      		"dev": "ai",
      		"mode": "Voltage"
      	}, {
      		"modes": ["Voltage"],
      		"value": 0.0,
      		"glob_dev_id": 1,
      		"dev": "ao",
      		"circuit": "2_04",
      		"unit": "V",
      		"mode": "Voltage"
      	},
      	{
      		"modes": ["Voltage"],
      		"value": 0.0,
      		"glob_dev_id": 1,
      		"dev": "ao",
      		"circuit": "2_01",
      		"unit": "V",
      		"mode": "Voltage"
      	}, {
      		"modes": ["Voltage"],
      		"value": 0.0,
      		"glob_dev_id": 1,
      		"dev": "ao",
      		"circuit": "2_03",
      		"unit": "V",
      		"mode": "Voltage"
      	}, {
      		"modes": ["Voltage"],
      		"value": 0.0,
      		"glob_dev_id": 1,
      		"dev": "ao",
      		"circuit": "2_02",
      		"unit": "V",
      		"mode": "Voltage"
      	},
      	{
      		"interval": 15,
      		"value": 57.75,
      		"circuit": "2812F9A708000074",
      		"address": "2812F9A708000074",
      		"time": 1570600764.403386,
      		"typ": "DS18B20",
      		"lost": false,
      		"dev": "temp"
      	}, {
      		"interval": 15,
      		"value": 41.55,
      		"circuit": "28DEBFA7080000E3",
      		"address": "28DEBFA7080000E3",
      		"time": 1570600765.947099,
      		"typ": "DS18B20",
      		"lost": false,
      		"dev": "temp"
      	},
      	{
      		"interval": 15,
      		"value": 1.95,
      		"circuit": "28753F5F070000BE",
      		"address": "28753F5F070000BE",
      		"time": 1570600769.176165,
      		"typ": "DS18B20",
      		"lost": false,
      		"dev": "temp"
      	},
      	{
      		"interval": 15,
      		"value": 50.55,
      		"circuit": "28FC53C107000006",
      		"address": "28FC53C107000006",
      		"time": 1570600770.86114,
      		"typ": "DS18B20",
      		"lost": false,
      		"dev": "temp"
      	},
      	{
      		"interval": 15,
      		"value": 52.75,
      		"circuit": "287E8DA9080000AD",
      		"address": "287E8DA9080000AD",
      		"time": 1570600767.631405,
      		"typ": "DS18B20",
      		"lost": false,
      		"dev": "temp"
      	},
      	{
      		"circuit": "2_01",
      		"value": 0,
      		"glob_dev_id": 1,
      		"dev": "wd",
      		"timeout": 5000,
      		"was_wd_reset": 0,
      		"nv_save": 0
      	}, {
      		"glob_dev_id": 1,
      		"last_comm": 0.03416609764099121,
      		"ver2": "1.0",
      		"sn": 104,
      		"circuit": "1",
      		"model": "M503",
      		"dev": "neuron",
      		"board_count": 1
      	}
      ]
      

      Suggestions?

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: How to disable and enable the 1Wire bus (M503)

      @martin-kudláček

      Hi...again

      One more stupid question: How do I reset 1-wire bus with mbpoll?

      I mean, how can i "convert" those commands:

      ./pollmb.py -p 502 -u 1 -f 5 -a 1001 -q 1 -d 1
      ./pollmb.py -p 502 -u 1 -f 5 -a 1001 -q 1 -d 0
      

      to mbpoll "format". I just don't understand how to read/write coils with mbpoll.

      Thank you!
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: How to disable and enable the 1Wire bus (M503)

      @martin-kudláček

      Okay. This clarified the case :)

      Thank you!

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: How to disable and enable the 1Wire bus (M503)

      @martin-kudláček

      Aaaaa...of course :D

      But what about this: either 11 or 3

      root@residevice:~# mbpoll -m tcp -a 0 127.0.0.1 -0 -1 -r 6
      mbpoll 1.2-6 - FieldTalk(tm) Modbus(R) Master Simulator
      Copyright (c) 2015 epsilonRT, All rights reserved.
      This software is governed by the CeCILL license <http://www.cecill.info>
      
      Protocol configuration: Modbus TCP
      Slave configuration...: address = [0]
                              start reference = 6, count = 1
      Communication.........: 127.0.0.1, port 502, t/o 1.00 s, poll rate 1000 ms
      Data type.............: 16-bit register, output (holding) register table
      
      -- Polling slave 0...
      [6]:    11
      
      root@residevice:~# mbpoll -m tcp -a 0 127.0.0.1 -0 -1 -r 6
      mbpoll 1.2-6 - FieldTalk(tm) Modbus(R) Master Simulator
      Copyright (c) 2015 epsilonRT, All rights reserved.
      This software is governed by the CeCILL license <http://www.cecill.info>
      
      Protocol configuration: Modbus TCP
      Slave configuration...: address = [0]
                              start reference = 6, count = 1
      Communication.........: 127.0.0.1, port 502, t/o 1.00 s, poll rate 1000 ms
      Data type.............: 16-bit register, output (holding) register table
      
      -- Polling slave 0...
      [6]:    3
      
      root@residevice:~# mbpoll -m tcp -a 0 127.0.0.1 -0 -1 -r 6
      mbpoll 1.2-6 - FieldTalk(tm) Modbus(R) Master Simulator
      Copyright (c) 2015 epsilonRT, All rights reserved.
      This software is governed by the CeCILL license <http://www.cecill.info>
      
      Protocol configuration: Modbus TCP
      Slave configuration...: address = [0]
                              start reference = 6, count = 1
      Communication.........: 127.0.0.1, port 502, t/o 1.00 s, poll rate 1000 ms
      Data type.............: 16-bit register, output (holding) register table
      
      -- Polling slave 0...
      [6]:    11
      

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: How to disable and enable the 1Wire bus (M503)

      @martin-kudláček

      Thanks for the good instructions! After enabling MWD, setting timeout and writing the settings:

      mbpoll -m tcp -a 0 127.0.0.1 -0 -1 -r 6
      mbpoll 1.2-6 - FieldTalk(tm) Modbus(R) Master Simulator
      Copyright (c) 2015 epsilonRT, All rights reserved.
      This software is governed by the CeCILL license <http://www.cecill.info>
      
      Protocol configuration: Modbus TCP
      Slave configuration...: address = [0]
                              start reference = 6, count = 1
      Communication.........: 127.0.0.1, port 502, t/o 1.00 s, poll rate 1000 ms
      Data type.............: 16-bit register, output (holding) register table
      
      -- Polling slave 0...
      [6]:    3
      

      ...or...

      mbpoll -m tcp -a 0 127.0.0.1 -0 -1 -r 114
      mbpoll 1.2-6 - FieldTalk(tm) Modbus(R) Master Simulator
      Copyright (c) 2015 epsilonRT, All rights reserved.
      This software is governed by the CeCILL license <http://www.cecill.info>
      
      Protocol configuration: Modbus TCP
      Slave configuration...: address = [0]
                              start reference = 114, count = 1
      Communication.........: 127.0.0.1, port 502, t/o 1.00 s, poll rate 1000 ms
      Data type.............: 16-bit register, output (holding) register table
      
      -- Polling slave 0...
      [114]:  3
      

      What does that result (3) mean? Its not 0, 1 or 2.

      Btw

      sudo systemctl stop unipitcp
      

      should be

      sudo systemctl stop neurontcp
      

      in Neuron M503...right??

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: How to disable and enable the 1Wire bus (M503)

      @martin-kudláček

      Yes. If you can give mbpoll example that would be great!

      :)

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: How to disable and enable the 1Wire bus (M503)

      @martin-kudláček

      Thank you!

      Can you give a noob example of how to set 'MWD Enable' to 1 with pollmb.py?

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen
    • RE: How to disable and enable the 1Wire bus (M503)

      @martin-kudláček

      Hi,

      That's what we've done with 1-Wire and it works.

      I mean, is it possible to do this same 'reset' for Modbus (RTU) itself? We sometimes lose a modbus device.

      Br,
      Vesa

      posted in Official API - Evok
      Vesa Kauppinen
      Vesa Kauppinen