Fast Modbus/en: различия между версиями

Материал из Wiren Board
(Новая страница: «Events are transmitted in a list. If there have been multiple events in the device since the last query, they will be delivered in a single response during the next request. The packet size is limited to 256 bytes. If certain events could not fit into the transmission, they will be delivered in the next packet.»)
Метки: правка с мобильного устройства правка из мобильной версии
(не показаны 23 промежуточные версии этого же участника)
Строка 35: Строка 35:
Events are transmitted in a list. If there have been multiple events in the device since the last query, they will be delivered in a single response during the next request. The packet size is limited to 256 bytes. If certain events could not fit into the transmission, they will be delivered in the next packet.
Events are transmitted in a list. If there have been multiple events in the device since the last query, they will be delivered in a single response during the next request. The packet size is limited to 256 bytes. If certain events could not fit into the transmission, they will be delivered in the next packet.


If the register value changed multiple times between events, for example, if the click counter increased by several units, only one event will be generated, and the latest actual value of the counter will be passed during the poll.  
<div lang="ru" dir="ltr" class="mw-content-ltr">
Если между опросами событий значение регистра изменилось несколько раз, например, значение счетчика нажатий увеличилось на несколько единиц, то будет сгенерировано одно событие, а при опросе будет передано последнее актуальное значение счетчика.
</div>


If a device on the bus does not support the extension, it will still function and respond to standard queries. Similarly, if a device with Fast Modbus is polled by a master that is unaware of the extension, it will be polled using standard read and write functions.
<div lang="ru" dir="ltr" class="mw-content-ltr">
Если какое то устройство на шине не поддерживает расширение, то оно все равно будет работать и отвечать на стандартные запросы. Аналогично если устройство с Быстрым Modbus опрашивается мастером, который ничего не знает о расширении, оно будет опрашиваться стандартными функциями чтения и записи.
</div>


===Working with events===
<div lang="ru" dir="ltr" class="mw-content-ltr">
There are currently no special tools for working with events in the controller's web interface. Below are the available methods of configuration.
===Работа с событиями===
В веб-интерфейсе контроллера пока нет специальных инструментов для работы с событиями. Ниже описаны доступные способы настройки.
</div>


===How to disable events?===
<div lang="ru" dir="ltr" class="mw-content-ltr">
===Как отключить события?===
</div>


In templates for devices that support fast Modbus, event handling is enabled for all registers where event generation makes sense. In some cases, it may be necessary to disable events, for example, if the use of non-standard protocol functions is prohibited by the company's security policy. There are currently no specific tools for working with events in the controller's web interface. To disable events, you can do the following:
<div lang="ru" dir="ltr" class="mw-content-ltr">
#In the device template, change the value of the '''sporadic''' parameter to '''false'''.  
В шаблонах устройств, поддерживающих быстрый Modbus, включена работа по событиям для всех регистров, у которых генерация событий имеет смысл. В некоторых случаях может быть нужно отключить события, например, если использование нестандартных функций протокола запрещено на предприятии политикой безопасности. В веб-интерфейсе контроллера пока нет специальных инструментов для работы с событиями. Поэтому отключить события можно так:
#Completely disable channel polling. To do this, in the controller's web interface, set the polling interval for the parameter to "Do not poll".
#В шаблоне устройства у параметра '''sporadic''' сменить значение на '''false'''.  
<gallery mode="packed" heights="150px" caption="Disabling event polling">
#Отключить опрос канала совсем. Для этого в веб-интерфейсе контроллера в настройках serial-устройств установить период опроса параметра в значение «Не опрашивать».
Image: sporadic1.png | Set the '''sporadic''' parameter to '''false'''
<gallery mode="packed" heights="150px" caption="Отключение опроса событий">
Image: sporadic2_en.png | Set the polling interval to "Do not poll"
Image: sporadic1.png | Установить параметр '''sporadic''' в значение '''false'''
Image: sporadic2.png | Установить период опроса в значение «Не опрашивать»
</gallery>
</gallery>
</div>


===Event polling priority===
<div lang="ru" dir="ltr" class="mw-content-ltr">
[[File:priority_setting_en.png|500px|thumb|right|Setting event polling priority in the web interface of the Wiren Board controller]]
===Приоритет опроса событий===
Only one device can respond to an event request at a time. Therefore, if multiple devices generate events, the one with the lower slave ID will be the first to respond to the request. Devices perform arbitration to determine this, which is described in detail on [https://github.com/wirenboard/wb-modbus-ext-scanner/blob/main/protocol.md GitHub].
[[File:priority_setting.png|500px|thumb|right|Настройка приоритета опроса событий в веб-интерфейсе контроллера Wiren Board]]
На запрос событий одновременно может ответить только одно устройство. Поэтому если события сгенерировали несколько устройств, то первым на запрос ответит то, у которого меньше slave ID. Чтобы это выяснить устройства проводят арбитраж, который подробно описан на [https://github.com/wirenboard/wb-modbus-ext-scanner/blob/main/protocol.md github].
</div>


However, it is possible to assign a high priority to an individual device or multiple devices. In this case, devices with high priority will be polled ahead of others even if their slave ID is higher. If multiple devices have a high priority, arbitration will first be conducted among them, and then among devices with low priority.
<div lang="ru" dir="ltr" class="mw-content-ltr">
Однако можно установить высокий приоритет для отдельного устройства или нескольких устройств. В этом случае устройства с высоким приоритетом будут опрашиваться вперед остальных даже если их slave ID больше. Если несколько устройств имеют высокий приоритет, то арбитраж сначала будет проведен между ними, а потом между устройствами с низким приоритетом.
</div>


It is possible to set the priority in the web interface of the controller, in the settings of the serial device driver. If any value other than "In order" is specified for the polling period parameter, the register will have a high priority.  
<div lang="ru" dir="ltr" class="mw-content-ltr">
Установить приоритет можно в веб-интерфейсе контроллера, в настройках драйвера serial-устройств. Если в параметре период опроса '''указать любое значение отличное от «В порядке очереди»''', то регистр будет иметь высокий приоритет.
</div>


Please note that for event generating registers, the time specified in the polling interval field does not matter. Event queries will be executed every 50 ms. However, the actual response time to events will depend on the number of devices on the bus and events, as well as the presence of errors. Nevertheless, this time will be significantly shorter than when using standard commands.
<div lang="ru" dir="ltr" class="mw-content-ltr">
Обратите внимание, что для регистров генерирующих события не важно какое время указано в поле период опроса. Запрос событий будет выполняться каждые 50 мс. Но реальное время реакции на события будет зависеть от количества устройств на шине и событий, наличия ошибок. Тем не менее это время будет значительно меньше чем при опросе стандартными командами
</div>


===Support for events in firmware===
<div lang="ru" dir="ltr" class="mw-content-ltr">
The table below shows the devices and firmware versions that introduced support for events.
===Поддержка событий в прошивках===
{| border="1" class="wikitable"  
В таблице указаны устройства и версии прошивок, в которых появилась поддержка событий.
! Device || Firmware version with event support
{| border="1" class="wikitable"  
! Устройство || Версия прошивки, в которой появились события
|-
|-
| WB-MRx, WB-MWAC
| WB-MRx, WB-MWAC
Строка 71: Строка 90:
|-
|-
| WB-MDM3
| WB-MDM3
| 2.7.0 (in testing)
| 2.7.0 (в testing)
|-
|-
| WB-LED, WB-MRGBW-D
| WB-LED, WB-MRGBW-D
| 3.4.0
| 3.4.0
|-
|-
| WB-MSWx
| WB-MSWx
| 4.31.0 (in testing)
| 4.31.0 (в testing)
|-
|-
| WB-M1W2
| WB-M1W2
| 4.32.0 (in testing)
| 4.32.0 (в testing)
|-
|-
|}
|}
</div>


==Scanning devices on the bus==
<div lang="ru" dir="ltr" class="mw-content-ltr">
[[Image:Scan-screen.png|300px|thumb|right|Scanning devices on the ''Settings Scanning'' tab]]
==Сканирование устройств на шине==
Usually, an installation includes several slave devices on one RS-485 bus inside a panel or in the field. Each device has an address that the user can change. During installation, the addresses of slave devices are written down from the device casing and manually entered into the master configuration. This is not very convenient.
[[Image: Scan-screen.png |300px|thumb|right| Сканирование устройств на вкладке ''Настройки Сканирование'']]
To simplify device configuration, there is a bus scanning function. It was available in the Wiren Board controller even before the Quick Modbus extension was released. With the release of the extension, the ability to quickly scan the bus without waiting for a timeout for each non-existent address was added.
Обычно инсталляция содержит несколько slave-устройств в щите или в поле на одной шине RS-485. Каждое устройство имеет адрес, который пользователь может менять. При монтаже адреса slave-устройств переписываются с корпуса устройства и вносятся вручную в конфигурацию мастера. Это не очень удобно.
Чтобы упростить конфигурирование устройств есть функция сканирования шины. Она была доступна в контроллере Wiren Board и до выхода расширения Быстрый Modbus. С появлением расширения добавилась возможность быстро сканировать шину без необходимости выжидать таймаут для каждого несуществующего адреса.
</div>


Therefore, with the Fast Modbus extension, scanning works in two modes: fast and slow.  
<div lang="ru" dir="ltr" class="mw-content-ltr">
Поэтому с расширением Быстрый Modbus сканирование работает в двух режимах: быстрое и медленное.
</div>


In slow scanning, a script is used that iterates through all possible addresses on the bus and waits for a response from them within a certain time frame. The process takes several minutes and depends on the communication settings of the devices: speed, stop bits, etc. The slow scanning mode is preserved to support devices with older firmware versions.
<div lang="ru" dir="ltr" class="mw-content-ltr">
В медленном сканировании используется скрипт, который перебирает все возможные адреса на шине и ждет от них ответа в течение определенного времени. Процесс занимает несколько минут и зависит от настроек связи устройств: скорости, стоповых битов и т.п. Режим медленного сканирования сохранен для поддержки устройств со старыми версиями прошивок.
</div>


Quick scanning is performed much faster and allows to detect devices supporting Fast Modbus almost instantly. In quick scanning mode, the master sends a broadcast request to the bus, and devices respond with data about themselves one by one. The order is determined by the arbitration.
<div lang="ru" dir="ltr" class="mw-content-ltr">
Быстрое сканирование выполняется значительно быстрее и позволяет обнаруживать устройства поддерживающие Быстрый Modbus практически мгновенно. В режиме быстрого сканирования мастер отправляет широковещательный запрос в шину, а устройства по очереди отвечают данными о себе. Очередность определяет арбитраж.
</div>


The scanning function is available in the controller's web interface under the section '''Settings Scanning'''.  
<div lang="ru" dir="ltr" class="mw-content-ltr">
Функция сканирования доступна в веб-интерфейсе контроллера в разделе '''Настройки Сканирование'''.
</div>


Current scanning capabilities in the web interface:
<div lang="ru" dir="ltr" class="mw-content-ltr">
*displaying all Wiren Board devices connected to the controller,
Текущие возможности функции сканирования в веб-интерфейсе:
*detecting devices with identical addresses on the same bus,
*отображение всех устройств Wiren Board, подключенных к контроллеру,
*detecting devices with different communication parameters on the same bus.
*обнаружение устройств с одинаковыми адресами на одной шине,
*обнаружение устройств с разными параметрами связи на одной шине.
</div>


When the scanning function is launched in the controller's web interface, it first performs a quick scan, followed by a slow scan. This can be observed in the scanning status.
<div lang="ru" dir="ltr" class="mw-content-ltr">
При запуске функции сканирования в веб-интерфейсе контроллера сначала выполняется быстрое сканирование, затем — медленное. Это можно увидеть в статусе сканирования.
</div>


===Changing Modbus Device Addresses===
<div lang="ru" dir="ltr" class="mw-content-ltr">
For devices that support Fast Modbus, you can set new addresses by accessing the device using its unique serial number. This is convenient when multiple devices with the same address are detected on the bus.
===Изменение Modbus-адреса устройств===
Changing addresses is done using the ''wb-modbus-scanner'' utility and is currently not supported through the web interface. Detailed commands and the reference implementation of the utility are available in the [https://github.com/wirenboard/wb-modbus-ext-scanner utility's repository].
Для устройств, которые поддерживают Быстрый Modbus, можно задать новые адреса, обращаясь к устройству по уникальному серийному номеру. Это удобно когда на шине обнаружено несколько устройств с одинаковым адресом.
Изменение адресов выполняется с помощью утилиты ''wb-modbus-scanner'' и пока не поддерживается веб-интерфейсом. Описание расширенных команд и референсная реализация утилиты доступны в [https://github.com/wirenboard/wb-modbus-ext-scanner репозитории утилиты].
</div>


To change the device's address, connect to the controller via [[SSH]].
<div lang="ru" dir="ltr" class="mw-content-ltr">
Для смены адреса устройства подключитесь к контроллеру через [[SSH |SSH]].
</div>


# Install the utility using the command:
<div lang="ru" dir="ltr" class="mw-content-ltr">
#Установите утилиту командой:
#:<syntaxhighlight lang="bash">
#:<syntaxhighlight lang="bash">
apt update && apt install wb-modbus-ext-scanner
apt update && apt install wb-modbus-ext-scanner
</syntaxhighlight>
</syntaxhighlight>
# Stop the wb-mqtt-serial driver using the command:
#Остановите драйвер wb-mqtt-serial:
#:<syntaxhighlight lang="bash">
#:<syntaxhighlight lang="bash">
systemctl stop wb-mqtt-serial
systemctl stop wb-mqtt-serial
</syntaxhighlight>
</syntaxhighlight>
# Execute the command:
#Выполните команду
#:<syntaxhighlight lang="bash">
#:<syntaxhighlight lang="bash">
wb-modbus-scanner -d /dev/ttyRS485-1 -b 115200 -s 4267937719 -i 3
wb-modbus-scanner -d /dev/ttyRS485-1 -b 115200 -s 4267937719 -i 3
</syntaxhighlight>
</syntaxhighlight>
# Where, /dev/ttyRS485-1 is the port to which the device is connected, 115200 is the exchange rate, 4267937719 is the device's serial number, 3 is the new slave ID.
#:где,       /dev/ttyRS485-1 — порт к которому подключено устройство,
# As a result, the following output should appear:
#:115200 — скорость обмена,  
#:4267937719 — серийный номер устройства,
#:3 — новый slave ID.
#В результате должен появиться такой вывод:
#:<syntaxhighlight lang="bash">
#:<syntaxhighlight lang="bash">
Serial port: /dev/ttyRS485-1
Serial port: /dev/ttyRS485-1
Строка 129: Строка 171:
Change ID for device with serial  4267937719 [FE638FB7] New ID: 3
Change ID for device with serial  4267937719 [FE638FB7] New ID: 3
</syntaxhighlight>
</syntaxhighlight>
# Start the wb-mqtt-serial driver again using the command:
#Запустите обратно драйвер wb-mqtt-serial:
#:<syntaxhighlight lang="bash">
#:<syntaxhighlight lang="bash">
systemctl start wb-mqtt-serial
systemctl start wb-mqtt-serial
</syntaxhighlight>
</syntaxhighlight>
</div>


=== Support for scanning in firmware ===
<div lang="ru" dir="ltr" class="mw-content-ltr">
 
=== Поддержка сканирования в прошивках===
{| border="1" class="wikitable"
</div>
 
! Device || Firmware version where scanning was introduced


<div lang="ru" dir="ltr" class="mw-content-ltr">
{|  border="1" class="wikitable"
! Устройство || Версия прошивки, в которой появилось сканирование
|-
|-
| WB-MRx, WB-MWAC
| WB-MRx, WB-MWAC
| 1.19.0
| 1.19.0
|-
|-
| WB-MDM3
| WB-MDM3
| 2.6.0
| 2.6.0
|-
|-
| WB-LED, WB-MRGBW-D
| WB-LED, WB-MRGBW-D
| 3.2.0
| 3.2.0
|-
|-
| WB-MSx, WB-MSWx, WB-MIR, WB-M1W2
| WB-MSx, WB-MSWx, WB-MIR, WB-M1W2
| 4.23.0
| 4.23.0
|-
|-
| WB-MAI11
| WB-MAI11
| not supported
| не поддерживается
 
|-
|-
| WB-MAI6
| WB-MAI6
| 2.0.0
| 2.0.0
|-
|-
| WB-MAO4
| WB-MAO4
| 2.2.0
| 2.2.0
|-
|-
| WB-MAPx
| WB-MAPx
| 2.4.0
| 2.4.0
|-
|-
| WB-MIO
| WB-MIO
| 1.6.0
| 1.6.0
|-
|-
| WB-REF-U
| WB-REF-U
| 1.4.0
| 1.4.0
|-
|-
| WB-REF-DF
| WB-REF-DF
| 1.1.0
| 1.1.0
|-
|-
|}
|}
</div>


==Useful links==
<div lang="ru" dir="ltr" class="mw-content-ltr">
* [https://habr.com/p/772308/ Upgrading Modbus: arbitration, bus scanning, events] - an article with details on implementing the extension
==Полезные ссылки==
* [https://github.com/wirenboard/wb-modbus-ext-scanner/blob/main/protocol.md Extension description on GitHub]
* [https://habr.com/p/772308/ Прокачиваем Modbus: арбитраж, сканирование шины, события] - статья с подробностями реализации расширения
* [[Modbus | Modbus protocol description]]
* [https://github.com/wirenboard/wb-modbus-ext-scanner/blob/main/protocol.md Описание расширения на GitHub]
* [https://github.com/wirenboard/wb-modbus-ext-scanner Scanning utility repository]
* [[Modbus | Описание протокола Modbus]]
* [https://github.com/wirenboard/wb-modbus-ext-scanner Репозиторий утилиты сканирования]
</div>

Версия 16:05, 29 декабря 2023

Другие языки:

General information

We produce devices that operate on the standard Modbus RTU protocol. The protocol is old and reliable, but its operation is based on sequentially polling all the registers on the bus. Unfortunately, this limits the polling speed when there are a large number of devices. We have decided to address this limitation and have released our own protocol extension called "Fast Modbus".

The extension uses broadcast commands, which allow to avoid polling each register one by one.

Broadcast commands are a reserved function of Modbus and do not violate compatibility with the standard protocol. Devices that do not support Fast Modbus function without any issues.

Fast Modbus is available in the current controller software release and in Wiren Board devices with the latest firmware.

Below are described the new features of the Fast Modbus extension: bus events and fast scanning of devices. All information applies only to Wiren Board devices.

Article with technical details: Boosting Modbus: arbitration, bus scanning, events.

Bus events

Events are data packets in response to broadcast requests from the master, and are generated when the value of the modbas register changes in the device.

Not all registers generate events. Registers that support events can be distinguished by the ⚡ symbol in the tables of Modbus device registers.

Events occur in two cases:

  1. When changing the value of the register that supports events.
  2. When rebooting the device. This is the only event that occurs immediately after device startup.

How does it work?

Polling of registers in Fast Modbus and standard protocol
Distribution of event polling time

Every 50 ms, the master sends a broadcast request on the bus, which is received by all devices on the bus. If a device generates an event, it sends a response containing the event identifier, its type, and additional data. If there are multiple devices that generate such events, they engage in arbitration, in which the device with a lower Slave ID wins. For more information about arbitration, please refer to github.

The master receives a response from the device and sends a confirmation that the message has been received. Only after that, the device will reset the occurred event. If there is no confirmation, the device will send the same response again during the next request.

The event polling will only work if there are no devices on the network with the same slave ID. This is due to the fact that the arbitration of devices during event polling is done based on its Modbus address, not the device's serial number like for other Quick Modbus functions.

Events are transmitted in a list. If there have been multiple events in the device since the last query, they will be delivered in a single response during the next request. The packet size is limited to 256 bytes. If certain events could not fit into the transmission, they will be delivered in the next packet.

Если между опросами событий значение регистра изменилось несколько раз, например, значение счетчика нажатий увеличилось на несколько единиц, то будет сгенерировано одно событие, а при опросе будет передано последнее актуальное значение счетчика.

Если какое то устройство на шине не поддерживает расширение, то оно все равно будет работать и отвечать на стандартные запросы. Аналогично если устройство с Быстрым Modbus опрашивается мастером, который ничего не знает о расширении, оно будет опрашиваться стандартными функциями чтения и записи.

Работа с событиями

В веб-интерфейсе контроллера пока нет специальных инструментов для работы с событиями. Ниже описаны доступные способы настройки.

Как отключить события?

В шаблонах устройств, поддерживающих быстрый Modbus, включена работа по событиям для всех регистров, у которых генерация событий имеет смысл. В некоторых случаях может быть нужно отключить события, например, если использование нестандартных функций протокола запрещено на предприятии политикой безопасности. В веб-интерфейсе контроллера пока нет специальных инструментов для работы с событиями. Поэтому отключить события можно так:

  1. В шаблоне устройства у параметра sporadic сменить значение на false.
  2. Отключить опрос канала совсем. Для этого в веб-интерфейсе контроллера в настройках serial-устройств установить период опроса параметра в значение «Не опрашивать».

Приоритет опроса событий

Настройка приоритета опроса событий в веб-интерфейсе контроллера Wiren Board

На запрос событий одновременно может ответить только одно устройство. Поэтому если события сгенерировали несколько устройств, то первым на запрос ответит то, у которого меньше slave ID. Чтобы это выяснить устройства проводят арбитраж, который подробно описан на github.

Однако можно установить высокий приоритет для отдельного устройства или нескольких устройств. В этом случае устройства с высоким приоритетом будут опрашиваться вперед остальных даже если их slave ID больше. Если несколько устройств имеют высокий приоритет, то арбитраж сначала будет проведен между ними, а потом между устройствами с низким приоритетом.

Установить приоритет можно в веб-интерфейсе контроллера, в настройках драйвера serial-устройств. Если в параметре период опроса указать любое значение отличное от «В порядке очереди», то регистр будет иметь высокий приоритет.

Обратите внимание, что для регистров генерирующих события не важно какое время указано в поле период опроса. Запрос событий будет выполняться каждые 50 мс. Но реальное время реакции на события будет зависеть от количества устройств на шине и событий, наличия ошибок. Тем не менее это время будет значительно меньше чем при опросе стандартными командами

Поддержка событий в прошивках

В таблице указаны устройства и версии прошивок, в которых появилась поддержка событий.

Устройство Версия прошивки, в которой появились события
WB-MRx, WB-MWAC 1.20.0
WB-MDM3 2.7.0 (в testing)
WB-LED, WB-MRGBW-D 3.4.0
WB-MSWx 4.31.0 (в testing)
WB-M1W2 4.32.0 (в testing)

Сканирование устройств на шине

Сканирование устройств на вкладке Настройки → Сканирование

Обычно инсталляция содержит несколько slave-устройств в щите или в поле на одной шине RS-485. Каждое устройство имеет адрес, который пользователь может менять. При монтаже адреса slave-устройств переписываются с корпуса устройства и вносятся вручную в конфигурацию мастера. Это не очень удобно. Чтобы упростить конфигурирование устройств есть функция сканирования шины. Она была доступна в контроллере Wiren Board и до выхода расширения Быстрый Modbus. С появлением расширения добавилась возможность быстро сканировать шину без необходимости выжидать таймаут для каждого несуществующего адреса.

Поэтому с расширением Быстрый Modbus сканирование работает в двух режимах: быстрое и медленное.

В медленном сканировании используется скрипт, который перебирает все возможные адреса на шине и ждет от них ответа в течение определенного времени. Процесс занимает несколько минут и зависит от настроек связи устройств: скорости, стоповых битов и т.п. Режим медленного сканирования сохранен для поддержки устройств со старыми версиями прошивок.

Быстрое сканирование выполняется значительно быстрее и позволяет обнаруживать устройства поддерживающие Быстрый Modbus практически мгновенно. В режиме быстрого сканирования мастер отправляет широковещательный запрос в шину, а устройства по очереди отвечают данными о себе. Очередность определяет арбитраж.

Функция сканирования доступна в веб-интерфейсе контроллера в разделе Настройки → Сканирование.

Текущие возможности функции сканирования в веб-интерфейсе:

  • отображение всех устройств Wiren Board, подключенных к контроллеру,
  • обнаружение устройств с одинаковыми адресами на одной шине,
  • обнаружение устройств с разными параметрами связи на одной шине.

При запуске функции сканирования в веб-интерфейсе контроллера сначала выполняется быстрое сканирование, затем — медленное. Это можно увидеть в статусе сканирования.

Изменение Modbus-адреса устройств

Для устройств, которые поддерживают Быстрый Modbus, можно задать новые адреса, обращаясь к устройству по уникальному серийному номеру. Это удобно когда на шине обнаружено несколько устройств с одинаковым адресом. Изменение адресов выполняется с помощью утилиты wb-modbus-scanner и пока не поддерживается веб-интерфейсом. Описание расширенных команд и референсная реализация утилиты доступны в репозитории утилиты.

Для смены адреса устройства подключитесь к контроллеру через SSH.

  1. Установите утилиту командой:
    apt update && apt install wb-modbus-ext-scanner
    
  2. Остановите драйвер wb-mqtt-serial:
    systemctl stop wb-mqtt-serial
    
  3. Выполните команду
    wb-modbus-scanner -d /dev/ttyRS485-1 -b 115200 -s 4267937719 -i 3
    
    где, /dev/ttyRS485-1 — порт к которому подключено устройство,
    115200 — скорость обмена,
    4267937719 — серийный номер устройства,
    3 — новый slave ID.
  4. В результате должен появиться такой вывод:
    Serial port: /dev/ttyRS485-1
    Use baud 115200
    Change ID for device with serial   4267937719 [FE638FB7] New ID: 3
    
  5. Запустите обратно драйвер wb-mqtt-serial:
    systemctl start wb-mqtt-serial
    

Поддержка сканирования в прошивках

Устройство Версия прошивки, в которой появилось сканирование
WB-MRx, WB-MWAC 1.19.0
WB-MDM3 2.6.0
WB-LED, WB-MRGBW-D 3.2.0
WB-MSx, WB-MSWx, WB-MIR, WB-M1W2 4.23.0
WB-MAI11 не поддерживается
WB-MAI6 2.0.0
WB-MAO4 2.2.0
WB-MAPx 2.4.0
WB-MIO 1.6.0
WB-REF-U 1.4.0
WB-REF-DF 1.1.0