Pi 4B OpenWRT and RS485

Hello All,

I have been trying to setup OpenWRT (using the ext4-factory image) on a Pi 4B with an additional RS-485 HAT
https://www.waveshare.com/wiki/RS485_CAN_HAT_(B)#RS485 but the RS-485 serial devices never show up. ttySC0 & ttySC1.

Adding the following (as per Waveshare) to the '/boot/config.txt' it never loads the overlays on boot.
dtparam=spi=on
dtoverlay=sc16is752-spi1,int_pin=24

I have confirmed that the overlay file is on the system, but looking at dmesg it never loads.

I have confirmed the RS-485 card works by also loading Raspbian OS and following the same modification to the '/boot/config.txt' it loads properly.

I am at a loss as to why its not working.

As it works on the Raspbian OS i am guessing its something in OpenWRT that is missing, but i am stumped as to why as the driver is in the overlay folder.

Any help is much appreciated.

Is there some module you need to build? I do not know this hardware.

I don't think anything else needs to be added/built as the driver appears to be there in the default OpenWRT install, it's just not enabling properly.

The sc16is752-spi1 overlay has been in most linux distros for a while now and from what i have researched is quite common.

I don't need the CAN bus module, just the RS-485.

This alone won't do anything... you need the driver for the RS485 chip itself. But I don't see any packages for the SC16IS752 device family in the OpenWrt repo. You'll probably have to build it yourself. Or, use a different device entirely.

You may find it easier to get a USB-to-RS485 system running. They're quite common, and you can even use many USB-to-DMX adapters (the lighting standard) since DMX is simply a protocol on top of the RS485 signaling standard.

Thanks, I have used a USB-RS485 and got that to work without issue, this was the next step.

I will try and build the driver in instead.

Thanks for your help.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.