Sorry to spam this thread. But I think I know how to fix the problem as I can replicate your problem. If I do these kind of settings on my terminal (PVA client), then I will get error messages exactly as yours.
export EPICS_PVA_ADDR_LIST=127.255.255.255
export EPICS_PVA_AUTO_ADDR_LIST=NO
This is the fix: DO NOT set EPICS_PVA_ADDR_LIST and EPICS_PVA_AUTO_ADDR_LIST on your PVA client side. These commands (or similar ones) will quickly unset the parameters:
unset EPICS_PVA_AUTO_ADDR_LIST
unset EPICS_PVA_ADDR_LIST
Cheers,
Yong
Okay. I sent my messages prematurely. Actually, it does not matter if you use “127.255.255.255” or not.
I have these two lines in my IOC’s st.cmd:
epicsEnvSet("EPICS_PVA_ADDR_LIST", "127.255.255.255")
epicsEnvSet("EPICS_PVA_AUTO_ADDR_LIST", "NO")
And this is the output:
epics> pvasr
pvAccess Server v7.1.2
Active configuration (w/ defaults)
EPICS_PVAS_INTF_ADDR_LIST = 0.0.0.0:5075
EPICS_PVAS_BEACON_ADDR_LIST = 127.255.255.255
EPICS_PVAS_AUTO_BEACON_ADDR_LIST = NO
EPICS_PVAS_BEACON_PERIOD = 15
EPICS_PVAS_BROADCAST_PORT = 5076
EPICS_PVAS_SERVER_PORT = 42079
EPICS_PVAS_PROVIDER_NAMES = QSRV
And I can use pvget to read PVs.
This line seems suspicious: “2021-04-19T10:59:32.552 Broadcast address #0: 127.255.255.255:5076. (unicast)”. I do not see any message saying “unicast” when I use “pvget -d pvName”.
Yong
Hi,
It seems you are new to the EPICS community. Welcome aboard!
“127.255.255.255” is not the right broadcast. Assuming you are using Linux, the output of /sbin/ifconfig does NOT have “127.255.255.255” as broadcast for the interface “lo”.
To fix your problem, simply DO NOT customize any EPICS_PVAS_* parameters, i.e. remove your settings of EPICS_PVAS_BEACON_ADDR_LIST and EPICS_PVAS_AUTO_BEACON_ADDR_LIST in your IOC. Your pvasr output should look like the following:
…
EPICS_PVAS_BEACON_ADDR_LIST =
EPICS_PVAS_AUTO_BEACON_ADDR_LIST = YES
…
BTW, why do you need to write a cpp program to drive a power supply by using pv Access for connection? The classical IOC with CA should probably be able to meet your requirements. With the classical IOC, you probably do not need to write any complicated codes for your application.
Cheers,
Yong
CA woks. I've tested softIocPVA and that is what happened:
Active configuration (w/ defaults)
EPICS_PVAS_INTF_ADDR_LIST = 0.0.0.0:5075
EPICS_PVAS_BEACON_ADDR_LIST = 127.255.255.255
EPICS_PVAS_AUTO_BEACON_ADDR_LIST = NO
EPICS_PVAS_BEACON_PERIOD = 15
EPICS_PVAS_BROADCAST_PORT = 5076
EPICS_PVAS_SERVER_PORT = 5075
EPICS_PVAS_PROVIDER_NAMES = QSRV
2021-04-19T10:59:32.552 Creating datagram socket from: 0.0.0.0:46421.
2021-04-19T10:59:32.552 Broadcast address #0: 127.255.255.255:5076. (unicast)
2021-04-19T10:59:32.552 Setting up UDP for interface 192.168.1.145/255.255.255.0, broadcast 192.168.1.255, dest <none>.
2021-04-19T10:59:32.552 Creating datagram socket from: 192.168.1.145:5076.
2021-04-19T10:59:32.552 Creating datagram socket from: 192.168.1.255:5076.
2021-04-19T10:59:32.553 Setting up UDP for interface 192.168.122.1/255.255.255.0, broadcast 192.168.122.255, dest <none>.
2021-04-19T10:59:32.553 Creating datagram socket from: 192.168.122.1:5076.
2021-04-19T10:59:32.553 Creating datagram socket from: 192.168.122.255:5076.
2021-04-19T10:59:32.553 Creating datagram socket from: 224.0.0.128:5076.
2021-04-19T10:59:32.553 Local multicast enabled on 127.0.0.1/224.0.0.128:5076.
2021-04-19T10:59:32.553 Sending 49 bytes 0.0.0.0:46421 -> 127.255.255.255:5076.
2021-04-19T10:59:32.793 Sending 49 bytes 0.0.0.0:46421 -> 127.255.255.255:5076.
2021-04-19T10:59:33.272 Sending 49 bytes 0.0.0.0:46421 -> 127.255.255.255:5076.
2021-04-19T10:59:34.230 Sending 49 bytes 0.0.0.0:46421 -> 127.255.255.255:5076.
2021-04-19T10:59:36.146 Sending 49 bytes 0.0.0.0:46421 -> 127.255.255.255:5076.
As far as I understand address 127.255.255.255:5076 is right to broadcast. But in my other OS and in your example IP is defined (e.g. 192.168.18.190). Problems is able to receive message due to network setting?