Mac OS testcbsdk: "Instrument is offline". Win10 on same switch works.
Closed this issue · 2 comments
I had to increase the memory allocation beyond that described in the wiki hack testcbsdk.cpp as indicated in #7
Now, when I run testcbsdk, I get the following output:
Initializing Cerebus real-time interface 6.04.00.00 (protocol cb3.09)...
Instrument is offline
testOpen failed (-30)!
Real-time interface already closed
testClose succeeded
I build cbsdk with Qt 4.8.7_2 from homebrew.
This computer can ping the NSP no problem.
ping 192.168.137.128
PING 192.168.137.128 (192.168.137.128): 56 data bytes
64 bytes from 192.168.137.128: icmp_seq=0 ttl=64 time=0.327 ms
64 bytes from 192.168.137.128: icmp_seq=1 ttl=64 time=0.324 ms
64 bytes from 192.168.137.128: icmp_seq=2 ttl=64 time=0.222 ms
Another Windows 10 computer on the same switch can run testcbsdk without any issues. I built that testcbsdk using the exact same source as the Mac (same cmake build system, but for VC 2008, Qt 4.8.1).
(Note that my NSP is 3.10/6.0.5, but I have not yet modified cbhwlib.h; this does not seem to present a problem for testcbsdk on Windows at least)
Here's the output in Windows:
E:\SachsLab\Tools\Neurophys\CereLink\dist\bin>testcbsdk.exe
Qt: Untested Windows version 6.2 detected!
Initializing Cerebus real-time interface 6.04.00.00 (protocol cb3.09)...
Udp real-time interface to NSP (6.05.02.00) successfully initialized
testOpen succeeded
Interface closed successfully
testClose succeeded
I used the settings on the BRM KB cbmex-on-osx with greater success. The other difference was that the default ports seemed to work fine in Windows but not in Mac. I had to make them explicit. The below settings worked for me.
cbSdkConnection con;
con.nRecBufSize = (4096*1536); // From BRM KB cbmex-on-osx
con.nInPort = cbNET_UDP_PORT_BCAST; // Client Port [51002]
con.nOutPort = cbNET_UDP_PORT_CNT; // Instrument Port [51001]
con.szInIP = "255.255.255.255"; // Client IP [""]
con.szOutIP = cbNET_UDP_ADDR_CNT; // Instrument IP [""]. "192.168.137.128"
res = cbSdkOpen(INST, conType, con);