Can you provide more info about the code that gives you segmentation fault?
Anything you can share, the dockerfile for example, can be very helpful for identifying the issue.
I debugged this a bit, using a working configuration based on Debian Wheezy.
Seems like the issue is in the kernel, at least according to this document. It seems like the kernel doesn’t have RS485 -support enabled, as the exception raised by Python is
From our investigation its seems that the issue you are having is closely related to the issue that the rts/cts can’t be used in beagle bone black with resin.
The problem is that pinmux owner is the HDMI even though HDMI is not enabled by default in Resin.
We are working in a fix and that should be available soon, of course I will update this thread as soon as that happens.
With the example project I’m currently running (linked before), the RTS/CTS is handled by the GPIO1_16 to work around the issue with HDMI. So in practice, the method should work, if the kernel module would be present.
Of course the preferable way is to use the real RTS/CTS -signal, this way it should work with every UART4 configuration utilizing flow control.
I will have to further investigate your issue then, once again I will give post as soon as I have an update.
Also thank you for posting your repo, it is very helpful.
You are right, it is the rs485 kernel module. As it seems we support the rs485 kernel module but its not compiled.
I will make the necessary changes and I will let you know as soon its ready.
Sorry for the long delay. I have been working for a fix for rs485 support but I havent be able to find a solution yet.
I have added the kernel module but I still get the same error you had. I will need to further investigate in order to find a solution.