WB6: отвалился второй порт RS485 после апгрейда

Обновил сегодня пакеты, после обновления пропал второй порт RS485. Устройства /dev/ttyRS485-2 нет. Ниже список пакетов, которые обновлял и версии - “с какой, на какую”. Откатился на старые версии - порт появился.

linux-image-wb6:armhf (4.9+wb20180808183130, 4.9+wb20181002143216)
linux-image-4.9.22-wb6:armhf (4.9+wb20180808183130, 4.9+wb20181002143216)
linux-firmware-image-4.9.22-wb6:armhf (4.9+wb20180808183130, 4.9+wb20181002143216)
wb-hwconf-manager (1.24.1, 1.25)

А посмотрите пожалуйста в Configs => Hardware modules configuration на настройки порта RS485-2. Там можно выбрать его режим, возможно у вас выбран не тот.

И пожалуйста пришлите содержимое /etc/wb-hardware.conf сюда целиком.

В Hardware modules configuration у обоих портов одинаковые настройки:

Module type - RS485 interface
Failsafe bias mode - enabled

#cat /etc/wb-hardware.conf
{
  "slots": [
    {
      "id": "wb6-mod1",
      "compatible": [
        "wbe2",
        "wbe3-reduced"
      ],
      "name": "Internal slot 1",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-mod2",
      "compatible": [
        "wbe2",
        "wbe3-reduced"
      ],
      "name": "Internal slot 2",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-mod3",
      "compatible": [
        "wbe3",
        "wbe3-reduced"
      ],
      "name": "Internal slot 3",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-extio1",
      "compatible": [
        "wb5-extio"
      ],
      "name": "External I/O module 1",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-extio2",
      "compatible": [
        "wb5-extio"
      ],
      "name": "External I/O module 2",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-extio3",
      "compatible": [
        "wb5-extio"
      ],
      "name": "External I/O module 3",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-extio4",
      "compatible": [
        "wb5-extio"
      ],
      "name": "External I/O module 4",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-extio5",
      "compatible": [
        "wb5-extio"
      ],
      "name": "External I/O module 5",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-extio6",
      "compatible": [
        "wb5-extio"
      ],
      "name": "External I/O module 6",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-extio7",
      "compatible": [
        "wb5-extio"
      ],
      "name": "External I/O module 7",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-extio8",
      "compatible": [
        "wb5-extio"
      ],
      "name": "External I/O module 8",
      "module": "",
      "options": {}
    },
    {
      "id": "wb6-rs485-1",
      "compatible": [
        "wb6-rs485"
      ],
      "name": "RS485-1 interface config",
      "module": "wb6-can-rs485",
      "options": {
        "mode": "enabled"
      }
    },
    {
      "id": "wb6-rs485-2",
      "compatible": [
        "wb6-rs485",
        "wb6-can"
      ],
      "name": "RS485-2/CAN interface config",
      "module": "wb6-can-rs485",
      "options": {
        "mode": "enabled"
      }
    },
    {
      "id": "wb6-w1",
      "compatible": [
        "wb6-wx"
      ],
      "name": "W1 terminal mode",
      "module": "wb6-wx-1wire",
      "options": {}
    },
    {
      "id": "wb6-w2",
      "compatible": [
        "wb6-wx"
      ],
      "name": "W2 terminal mode",
      "module": "wb6-wx-1wire",
      "options": {}
    }
  ]
}

Если попереключать настройки у портов в Hardware modules configuration, то в логе вот такое. Ошибка dtc: invalid option -- '@' давнишняя, а вот Device Tree overlay building failed такого раньше не замечал вроде.

Dec 19 20:56:26 wiren6 user.info wb-hwconf-manager: Deleting wb6-rs485-2:wb6-can-rs485
Dec 19 20:56:26 wiren6 user.info wb-hwconf-manager: Slot wb6-rs485-2 is not in use ... (warning).
Dec 19 20:56:26 wiren6 user.info wb-hwconf-manager: Adding wb6-rs485-2:wb6-can-rs485
Dec 19 20:56:26 wiren6 user.info wb-hwconf-manager: Initializing wb6-rs485-2:wb6-can-rs485.
Dec 19 20:56:26 wiren6 user.info wb-hwconf-manager: dtc: invalid option -- '@'
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: Usage: dtc [options] <input file>
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv]
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -q, --quiet                
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Quiet: -q suppress warnings, -qq errors, -qqq all
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -I, --in-format <arg>      
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Input formats are:
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		dts - device tree source text
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		dtb - device tree blob
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		fs  - /proc/device-tree style directory
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -o, --out <arg>            
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Output file
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -O, --out-format <arg>     
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Output formats are:
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		dts - device tree source text
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		dtb - device tree blob
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		asm - assembler source
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -V, --out-version <arg>    
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Blob version to produce, defaults to 17 (for dtb and asm output)
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -d, --out-dependency <arg> 
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Output dependency file
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -R, --reserve <arg>        
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Make space for <number> reserve map entries (for dtb and asm output)
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -S, --space <arg>          
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Make the blob at least <bytes> long (extra space)
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -p, --pad <arg>            
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Add padding to the blob of <bytes> long (extra space)
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -b, --boot-cpu <arg>       
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Set the physical boot cpu
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -f, --force                
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Try to produce output even if the input tree has errors
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -i, --include <arg>        
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Add a path to search for include files
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -s, --sort                 
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Sort nodes and properties before outputting (useful for comparing trees)
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -H, --phandle <arg>        
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Valid phandle formats are:
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		legacy - "linux,phandle" properties only
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		epapr  - "phandle" properties only
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 		both   - Both "linux,phandle" and "phandle" properties
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -W, --warning <arg>        
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Enable/disable warnings (prefix with "no-")
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -E, --error <arg>          
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Enable/disable errors (prefix with "no-")
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -h, --help                 
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Print this help and exit
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager:   -v, --version              
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 	Print version and exit
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: 
Dec 19 20:56:27 wiren6 user.info wb-hwconf-manager: Error: unknown option
Dec 19 20:56:27 wiren6 user.err wb-hwconf-manager: Device Tree overlay building failed

Хотя нет, смотрю сейчас на старой версии - все те же ошибки в логе.

хм, что-то тут не так обновилось, либо сломаны пакеты.

Попробуйте пожалуйста сделать

apt-get update
apt-get install device-tree-compiler

Говорит пакет уже установлен:

root@wiren6:~# apt-get install device-tree-compiler
Reading package lists... Done
Building dependency tree       
Reading state information... Done
device-tree-compiler is already the newest version (1.4.2-1).

покажите содержимое /etc/apt/sources.list.d/contactless.list пожалуйста.

root@wiren6:/var/log# cat /etc/apt/sources.list.d/contactless.list 
deb http://releases.contactless.ru/stable/stretch stretch main

всё более странно. А apt-get install wb-hwconf-manager что говорит?

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

Чтоб работал hwconf нужен dtc со специальным патчем (поддержка опции -@), а у вас видимо прилетела более новая версия из стандартных дебиановских репозиториев (без патча). Попробуйте руками откатиться:

$ apt-cache madison device-tree-compiler
### выбрать самую новую версию с суффиксом +wb<дата>
$ apt install device-tree-compiler=1.4.1+wb20180808183130

Можно еще захолдить чтоб не обновлялся автоматически:

$ apt-mark hold device-tree-compiler

Да, откат пакета до нужной версии решил проблему, спасибо!

Заодно ваш совет пофиксил мою проблему с wbio-do-r10r:

1 лайк