1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 <2024> 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 <2024> 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: mcaAIM and nmcDemo not finding AIM 556 on new linux install |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | Hank Ball <hank at wv7u.com>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Wed, 20 Mar 2024 12:41:02 +0000 |
Folks, Hank and I worked on this issue offline, and I have fixed it. The problem was that the behavior of specifying 0 for the packet buffer delay in pcap has changed on recent versions of pcap on Linux. It now causes pcap to wait until enough
packets arrive to fill the buffer, which prevents the AIM search logic from working. This is the change I made: diff --git a/mcaApp/CanberraSrc/nmc_comm_subs_1.c b/mcaApp/CanberraSrc/nmc_comm_subs_1.c index dfbe6da..18f8605 100644 --- a/mcaApp/CanberraSrc/nmc_comm_subs_1.c +++ b/mcaApp/CanberraSrc/nmc_comm_subs_1.c @@ -114,11 +114,12 @@ #endif /* PCAP timeout in ms */ -/* On Windows we can use -1, but on Linux that leads to 100% CPU utilization */ +/* On Windows we can use -1 to receive packets immediately, but on Linux that is not valid. + On Linux we use 10 ms for the packet_bufffer_delay. */ #if defined(_WIN32) #define PCAP_TIMEOUT -1 #else - #define PCAP_TIMEOUT 0 + #define PCAP_TIMEOUT 10 #endif This is the git commit message: commit c238622b8bbce11f242a392eb13ae727e6374a7a Author: Mark Rivers
rivers at cars.uchicago.edu Date: Wed Mar 20 07:15:20 2024 -0500 Fix problem on Linux. Packet buffer timeout was set to 0 (ms). On recent versions of pcap on Linux that causes packets not to be delivered until the buffer is full, which is very long delay when searching for AIMS. Change to 10 ms. I have pushed the fix to the master branch on Github. Mark From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Hank Ball via Tech-talk Hi Andrew, I don't have any iptables or firewall rules on any of these computers. I can reach other computers, webistes, etc, just fine over the network.
I can control an Amptek DP5 mcaAmptekApp over the network on the Debian 12 computer. I can also run an IOC/mca on the Debian 9 computer which connects to the AIM 556, and retrieve the data from that via medm, caget, etc, running on the Debian 12 computer. So it seems the ethernet interface is working, but I may have done something wrong when building one of the EPICS components, or I'm missing a library or something. But I'm not sure where to look since all the EPICS modules built without errors. Thanks Hank On 3/15/24 08:55, Johnson, Andrew N. wrote:
|