Openthread-br adding support for socat before thread ifup

Hello,

My Thread RCP is an SMLight device available on my local ethernet network. Since otbr-agent seems only to be able to access RCP on tty interface I have to mount the RCP localy with socat.

Right now it’s just a manual command which will stop at next reboot

socat -d -d PTY,link=/tmp/ttyThread,raw,echo=0 TCP:192.168.0.119:6638 &

The thread interface is configured as

config interface 'thread'
        option device 'wpan0'
        option proto 'openthread'
        option backbone_network 'lan'
        option radio_url 'spinel+hdlc:///tmp/ttyThread?uart-baudrate=460800'
        list prefix 'fda5:.....:1::/64 paros'
        option verbose '0'

I would like to know how to automatically start socat before thread ifup but after lan is up.

If by any chance @stintel or other members have an idea.

Thank you