Open bomilkar opened 4 years ago
Hi @bomilkar! Yes, this is because the module has originally been written for the 2.x line of kernels, but 4.x changes the structure for timer callbacks. There's an updated .c file in the #28 issue, which you can probably use.
Unfortunately, I haven't yet had the time to look into it and merge it to the repo, but a pull request would be welcome!
Thanks @gkaindl for pointing that out.
make
works now but how can I judge it's really working?? For instance: How can I see the register content? Or is there a loop back test which checks if all is well?
I have a commit ready with changes to 3 files. As soon as I'm confident it's working I'll push and post a PR.
After playing with it for a bit I conclude it does NOT work with this modified rfm12b.c .
I can "make" the kernel module and "sudo insmod rfm12b.ko" says nothing (maybe good). But then I recompiled it after some change to rfm12b_config.h and tried to replace the module:
$ sudo insmod rfm12b.ko
insmod: ERROR: could not insert module rfm12b.ko: File exists
$ sudo rmmod rfm12b.ko
rmmod: ERROR: Module rfm12b is not currently loaded
$ sudo modprobe -v rfm12b.ko
modprobe: FATAL: Module rfm12b.ko not found in directory /lib/modules/4.19.118+
It seems as if the first "insmod rfm12b.ko" did not insert the module correctly.
Also suspicious:
$ ./examples/bin/rfm12b_chat
successfully opened /dev/spidev0.0 as fd 3.
error during ioctl(): Inappropriate ioctl for device.
$ ls -l /dev/spidev0.0
crw-rw---- 1 root spi 153, 0 Jun 24 16:01 /dev/spidev0.0
Any idea what to try next?
I followed the instructions including rpi-source. Make fails early when it compiles rfm12b.c. Details below. Any idea??