Hi,
I am following this tutorial:
https://mne.tools/mne-realtime/auto_examples/lslclient_rt_.html#sphx-glr-auto-examples-lslclient-rt-py
I have Muse S and I am using BlueMuse.
I removed from the code the 2 parts “Load a file to stream raw data” and “For this example, let’s use the mock LSL stream.”
I also had to remove info=raw.info from the arguments of LSLClient since I don’t have the variable raw.
Now my code looks like this:
# this is the host id that identifies your stream on LSL
host = 'F009-34BL-2521'
# this is the max wait time in seconds until client connection
wait_max = 5
_, ax = plt.subplots(1)
n_epochs = 5
with LSLClient(host=host, wait_max=wait_max) as client:
client_info = client.get_measurement_info()
sfreq = int(client_info['sfreq'])
# let's observe ten seconds of data
for ii in range(n_epochs):
print('Got epoch %d/%d' % (ii + 1, n_epochs))
plt.cla()
epoch = client.get_data_as_epoch(n_samples=sfreq)
epoch.average().plot(axes=ax)
plt.pause(1.)
plt.draw()
print('Streams closed')
The issue is the ‘host’ variable. below is all the information from BlueMuse:
{
“hn”: “MuseS-4F46”,
“sn”: “5008-YMH9-4F46”,
“ma”: “00-55-da-b9-4f-46”,
“id”: “0039002d 47525015 20393755”,
“bp”: 20,
“ts”: 0,
“ps”: 81,
“hs”: “F009-34BL-2521”,
“rc”: 0
}
I used all of these values and none of them worked. I get this message looping:
looking for LSL stream 0039002d 47525015 20393755…
0039002d 47525015 20393755 not found in streams: [‘LSLBridge’, ‘LSLBridge’, ‘LSLBridge’, ‘LSLBridge’]
And this error:
Traceback (most recent call last):
File “D:/Program/EEG_Analysis/Test.py”, line 19, in
with LSLClient(host=host, wait_max=wait_max) as client:
File “D:\3_Tools\anaconda3\lib\site-packages\mne_realtime\base_client.py”, line 76, in enter
self._connection_error()
File “D:\3_Tools\anaconda3\lib\site-packages\mne_realtime\lsl_client.py”, line 110, in _connection_error
super()._connection_error(extra)
File “D:\3_Tools\anaconda3\lib\site-packages\mne_realtime\base_client.py”, line 85, in _connection_error
raise RuntimeError(f’Could not connect to Client.{extra}’)
RuntimeError: Could not connect to Client. Available streams on 0039002d 47525015 20393755 from resolve_streams():
[<pylsl.pylsl.StreamInfo object at 0x000001C3731A8700>, <pylsl.pylsl.StreamInfo object at 0x000001C377D4F160>, <pylsl.pylsl.StreamInfo object at 0x000001C377D4F280>, <pylsl.pylsl.StreamInfo object at 0x000001C377D4F1C0>]
I am a beginner, any help would be appreciated.
Thanks!