Open Itatsi opened 6 years ago
I am running kernel 4.9.59-v7+ on a raspberry pi 2 B+. I created a fork since I had the same problem. It is more or less a complete rewrite since so many things changed in the kernel. You can find it here if you want to give it a try: https://github.com/Martin-Furter/raspicomm-module
@Martin-Furter is this compatible with Pi 3B (Kernel 4.14)?
I compiled it for kernel 4.14.34-v7+ and uploaded the binary module. Seems to work fine here on a Pi2B. I think it should also work on a Pi3B but i can't test it.
@Runenprister: My module made some troubles, i got deadlocks and SPI errors. But version 1.0.1 seems to fix both. Could you please give it a try?
@Martin-Furter ok... the driver is working but it seams like I only get garbage :/ What ive done so far:
echo "dtparam=spi=on
dtoverlay=spi0-hw-cs" >> /boot/config.txt
echo "raspicommrs485" >> /etc/modules
echo "blacklist spi-bcm2835
blacklist spidev
blacklist spi-bcm2835aux" > /etc/modprobe.d/raspi-blacklist.conf
cp binaries/4.14.34-v7+/raspicommrs485.ko /lib/modules/4.14.34-v7+/kernel/drivers/tty/serial
cp binaries/spi0devdis.dtbo /boot/overlays/spi0devdis.dtbo
depmod -a
modprobe raspicommrs485
after a reboot the module is loaded^^
stty -F /dev/ttyRPC0 9600 raw -echo
echo "Hallo Welt" > /dev/ttyRPC0
I can see with an LED that something is send, but im unable to receive even broken chars with my PC
(PS.: connected with RS485 to RS232 converter) (PPS.: Same setup is working with PI2 and old driver)
@Martin-Furter in the same constellation (same SD-Card, RS486 to 232 Converter, new Driver,... ) it is working with an PI3B. The Problem only occurs on PI3B+.
@Martin-Furter have you got any idea what I can do to solve the problem with PI3B+ or help you to debug it?
@Runenprister: Sorry for the late reply.
Edit version.txt and set it to "mf-1.0.1pre1", them "make clean" and "make", and you have a version which should produce debug output, use "dmesg -w" to follow it.
It will output lines looking like this, showing the SPI communication, and some other debug messages: WrDat 8041 TE=0 RTS=0 P=0 D=41 -- 0000 R=0 T=0 RA/FE=0 CTS=0 P=0 D=00 WrCfg CC0B FEN=0 SHDN=0 TM=1 RM=1 PM=0 RAM=0 IR=0 ST=0 PE=0 L=0 BR=B -- 0000 R=0 T=0 RdDat 0000 -- 0000 R=0 T=0 RA/FE=0 CTS=0 P=0 D=00
@Itatsi FYI, I've also fixed this compilation issue you mention, while keeping the original raspicommrs485 kernel module implementation from Amescon. See: https://github.com/helioslite/raspicomm-module And the small patch is here: https://github.com/helioslite/raspicomm-module/commit/f92113be50bf1d314693668ddd2e9f3030054089
I would like to use the raspicomm on rpi-1 4.19.57+. Is there a change to compile it on an up to date PI? I like the HW so would be a waste to dump it.
I use it with PI2B+ and a little bit older kernel. As Itatsi reports above it should run on PI3B, but PI3B+ makes trouble. I don't have anything newer than PI2B+ so I can't test it. But if you have an older PI you should try my version, there are good chances that it works.
Hy, I've got problems to make the raspicomm driver for kernel 4.14 for use with PI3B+ Because I was unable to compile the module against the Kernel Header i've tried to compile it with current Raspberry Pi Kernel Source and ended with this.
As far as I found out (raspberrypi/linux#1844) the problem have to do something with the constraint to use devicetree.