zigpy / zigpy-znp

TI CC2531, CC13x2, CC26x2 radio support for Zigpy and ZHA
GNU General Public License v3.0
144 stars 40 forks source link

Remote serial via tcpip #156

Closed badzz closed 1 year ago

badzz commented 2 years ago

Hi I would like to setup something similar to this https://www.zigbee2mqtt.io/advanced/remote-adapter/connect_to_a_remote_adapter.html#_1-install-ser2net But I see that we manipulate rts and DTS lines. Will it work or I need to do something more complicated? Thanks

Hedda commented 1 year ago

FYI, remote connect to ser2net service with socat and works with Home Assistant's ZHA same way as Zigbee2MQTT

https://www.home-assistant.io/integrations/zha

https://www.zigbee2mqtt.io/advanced/remote-adapter/connect_to_a_remote_adapter.html

This type of tunneling + relay generally happens at the operating system level and is usually transparent to the application:

https://linux.die.net/man/8/ser2net

https://linux.die.net/man/1/socat

puddly commented 1 year ago

RTS and DTS are not supported over TCP. They are only useful for CC2530 and other hardware that connects them to RST so you can ignore them.

MattWestb commented 1 year ago

Our hacked tuya TBGW is using hardware flow control over Eth and looks working. If the hardware handshake is not working i think the NCP is not sending anything then trying communicating with it and we is only piping the raw commands from the UART to the network and the host (bellows) so is the the firmware on the NCP not working OK (Gary cooked) or is Bellows supporting it over sockets. (I hacked 2 boxes and one is running my IKEA controllers test setup on it and the other i have enabling tuya app for sniffing my tuya devices behavior).

Edit: We is not using UART hardware for boot loader only software commands.