I'm testing the AppConnectorExample but it crashes or freezes when I am running BCI2000 and I can't see all the packets.
I fixed a few issues in the AppConnectorExample, so it should work properly now.
Is there any way I can capture UDP packets from BCI2000 using wireshark? I'm trying to do it, but I'm not catching anything from BCI2000.
This should work fine. I guess you need to read from the UDP socket in question, otherwise no traffic flows that might be picked up by wireshark.
My final goal is to make my SSVEP application to work with signals from BCI2000. When launching BCI2000 should I pick the dummy application and then run also mine?
Yes, that's how it is supposed to work. To receive data in a robust manner, you have to take into account that the UDP socket's buffer contents are overwritten when data is not read in a timely manner, so you may receive incomplete data packets, which may confuse your application if reading data is not done in a robust fashion. This was the reason for the "number" states you observed -- I guess you were transmitting a large amount of data, so the AppConnectorExample could not keep up, and data were lost.
In the updated version of the AppConnectorExample, two things have been improved:
1) Data is now read line-by-line rather than string-by-string. This way, data loss cannot cause parsing of names and values to go out of sync, as it was happening for you.
2) Data is now read from a separate thread, so data will be read from the buffer in a timely manner, which should make data loss practically impossible (unless storing a packet's data takes more time than transmission itself).