Hi all,
I'm glad we have now a possibility to use our devices with Codesys - widely known and accepted platform even in our Raspberries.
I'm trying to get a bit more from it and help trainees to understand what is latency and how it "works". For this I'm compiling my kernels for Rasp. by myself.
Today I found a strange behavior - I'm playing with pretty new kernels (4. and codesys runtime always suddenly stops without any real error - and I found this ooops in log (please see the attachments).
I believe my kernels are OK, basically this are the standard ones only with preempt and/or RT patches... but codesys realtime is somehow checking something and it found out it is not running on Raspberry (of course is wrong, it is running on raspberry).
Hi,
not really sure what is mssing.
you need to compare the kernel modules which are running.
I would recommend to use emlid / naivio (search the forum) and use a precompiled rt_preemt kernel embedded in an ready to use Image.
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Edwin,
well, missing modules are not likely the case.
If I build kernel 4.4.35 without hard RT and 4.8.10 also without hard RT then with 4.4.35 has runtime no problem at all and works fine. With 4.8.10 it detects something "wrong" and bails out with this message.
Can you see from the code (-12, ....) what is wrong, the reason why to believe it is not running on raspberry?
Please note - kernel 4.8 detect the raspberry CPU as BCM2835 (see the /proc/cpuinfo file pls.) and kernel 4.4 as BCM2709 (4.4. kernel is particularly wrong as 2709 is chip family name https://github.com/raspberrypi/linux/issues/22).
Can you please double check it? I believe internal "protection" against non-raspberry use needs to be updated...
BR
Jan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
we agree that this need to be fixed!
This will be released with 3.5SP10 release on 15th december. (+x days for the Pi Release in the CODESYS Store)
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The error just popped up again... stuff was working fin till yesterday :-(
Hardware : BCM2711
Revision : c03114
Serial : xxxxxxxxxxxx
Model : Raspberry Pi 4 Model B Rev 1.4
root@rasp4:~# uname -a
Linux rasp4 5.10.83-v7l+ #1499 SMP Tue Dec 7 14:08:09 GMT 2021 armv7l GNU/Linux
Hi. Just a fresh reinstall of the latest RPI OS. The CodeSys runtime is 4.2.0.0 logs. It seems the device error is gone, yet I still can no longer get the modbus tcp conncetion to work.
Even though the logs seem to indicate that the slave (192.168.100.106) is the root of the issue, I can assure that not a single byte is crossing the wire in neither direction as I am checking via tcpdump/wireshark using display filters for mbtcp. It all worked flawlessly until 2 days ago and now I am getting the error "Connection aborted: socket_recv() failed!"
Can somebody see from looking at the logs whats going on ?
Hi. thanks for your replies....This was a "layer 8 problem". Still not knowing how I got in and out of this mess I am now back on track... Just two last questions (taking this thread totally off-topic:-( ):
1) The icons for modbus do not turn green but are operational... any deeper meaning to this ?
2.) If this is related to the demo license (for raspberry), do I also need an additional license for ModBus ? The logs let me assume this: Demo mode for Modbus/TCP Master started.
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I'm glad we have now a possibility to use our devices with Codesys - widely known and accepted platform even in our Raspberries.
I'm trying to get a bit more from it and help trainees to understand what is latency and how it "works". For this I'm compiling my kernels for Rasp. by myself.
Today I found a strange behavior - I'm playing with pretty new kernels (4. and codesys runtime always suddenly stops without any real error - and I found this ooops in log (please see the attachments).
I believe my kernels are OK, basically this are the standard ones only with preempt and/or RT patches... but codesys realtime is somehow checking something and it found out it is not running on Raspberry (of course is wrong, it is running on raspberry).
Here are some additional details
Codesys runtime is 3.5.9.40
Cpuinfo is in the attachment.
Can I do something to get rid of this ooops?
Thanks,
Regards
Jan.
cpuinfo.txt [1.11 KiB]
codesys.txt [21.06 KiB]
Hi,
not really sure what is mssing.
you need to compare the kernel modules which are running.
I would recommend to use emlid / naivio (search the forum) and use a precompiled rt_preemt kernel embedded in an ready to use Image.
BR
Edwin
Hi Edwin,
well, missing modules are not likely the case.
If I build kernel 4.4.35 without hard RT and 4.8.10 also without hard RT then with 4.4.35 has runtime no problem at all and works fine. With 4.8.10 it detects something "wrong" and bails out with this message.
Can you see from the code (-12, ....) what is wrong, the reason why to believe it is not running on raspberry?
Please note - kernel 4.8 detect the raspberry CPU as BCM2835 (see the /proc/cpuinfo file pls.) and kernel 4.4 as BCM2709 (4.4. kernel is particularly wrong as 2709 is chip family name https://github.com/raspberrypi/linux/issues/22).
Can you please double check it? I believe internal "protection" against non-raspberry use needs to be updated...
BR
Jan.
Hi,
we agree that this need to be fixed!
This will be released with 3.5SP10 release on 15th december. (+x days for the Pi Release in the CODESYS Store)
BR
Edwin
Hi Jan,
this should work now with 3.5.10.0 release.
Could you please check this?
BR
Edwin
Hi Edwin,
I can confirm, it works.
Thanks,
Jan.
The error just popped up again... stuff was working fin till yesterday :-(
Hardware : BCM2711
Revision : c03114
Serial : xxxxxxxxxxxx
Model : Raspberry Pi 4 Model B Rev 1.4
root@rasp4:~# uname -a
Linux rasp4 5.10.83-v7l+ #1499 SMP Tue Dec 7 14:08:09 GMT 2021 armv7l GNU/Linux
Any ideas ? Thx
which runtime version are you using with the PI4?
Hi. Just a fresh reinstall of the latest RPI OS. The CodeSys runtime is 4.2.0.0 logs. It seems the device error is gone, yet I still can no longer get the modbus tcp conncetion to work.
Even though the logs seem to indicate that the slave (192.168.100.106) is the root of the issue, I can assure that not a single byte is crossing the wire in neither direction as I am checking via tcpdump/wireshark using display filters for mbtcp. It all worked flawlessly until 2 days ago and now I am getting the error "Connection aborted: socket_recv() failed!"
Can somebody see from looking at the logs whats going on ?
looking at the release notes, there was a bump to debian 11 https://downloads.raspberrypi.org/raspios_armhf/release_notes.txt
just adding some info, not a solution though. I dont suppose they added a default firewall pr something?
Hi. thanks for your replies....This was a "layer 8 problem". Still not knowing how I got in and out of this mess I am now back on track... Just two last questions (taking this thread totally off-topic:-( ):
1) The icons for modbus do not turn green but are operational... any deeper meaning to this ?
2.) If this is related to the demo license (for raspberry), do I also need an additional license for ModBus ? The logs let me assume this: Demo mode for Modbus/TCP Master started.
Thank you