Closed xspanger3770 closed 11 months ago
Humm, this may be a bug in my code. I was only sending the DATA command at the end, but seems like it should be between each station. I had tested with IRIS, but their server seems a bit more permissive. A workaround is to put a reader.sendCmd("DATA");
after each select, so something like:
SeedlinkReader reader = new SeedlinkReader("eida.bgr.de", 18000);
reader.sendHello();
reader.select("SX", "SCHF", "", "HHZ");
reader.sendCmd("DATA");
reader.select("GE", "RUE", "", "HHZ");
reader.startData();
Will try to improve this in next version.
Thanks for the response!
Seems like the workaround indeed works only for the seedlinks that had initially experienced the 1 station issue, and for the ones that worked before I get Command DATA did not return OK
.
Will probably use another workaround where it first tries to send DATA command after each station and if that fails it will only call select after each station.
Thanks! I really couldn't figure that out before
Can give an example of one that is still not working? It would be helpful for my testing.
Sure! I did some additional testing and was able to reproduce the error like this:
SeedlinkReader reader = new SeedlinkReader("rtserve.resif.fr", 18000);
reader.sendHello();
reader.select("FR", "AGO", "00", "HHZ");
reader.sendCmd("DATA");
reader.select("FR", "CHLF", "00", "HHZ");
reader.sendCmd("DATA");
reader.select("FR", "PLDF", "00", "HHZ");
reader.sendCmd("DATA");
reader.startData();
But it seems like the problem might be the last DATA command after the last select command as no error occurs without it
The problem is indeed the last DATA command. After putting it only between the select commands, everything works perfectly now for all seedlinks.
Yes, the startData() send a "DATA" command, which results in a duplicate.
Thanks for the help! Your library is otherwise really good and simple to use!
I've updated SeedLinkReader to make this easier in 3a15780536ac9fd85c0d77c2a293191b3b5ab7f3
See https://github.com/crotwell/seisFile/blob/main/src/client/java/edu/sc/seis/seisFile/example/SeedLink.java for an example that uses new style that will be in next version.
Great, looking forward for the next version!
Hi again! I'm having a trouble when trying to select multiple stations for some seedlink servers:
When I select more stations, data only arrive from the last one selected (RUE HHZ in this case). This issue happens to about 1/3 of seedlink networks that I know about.
Am I doing something wrong? Could it be that some seedlink servers simply doesn't support multi station mode?
Thank you in advance for your response. I truly appreciate your time and assistance.