Closed boshd closed 5 years ago
Hi @kareemarab , you have to set "status" = "active" in the request "createSession" if want to subscribe eeg data. Your current session status is "opened"
Hey @nguoithichkhampha, thanks for your reply. We did do that and we still got the same output.
so, I think your license does not have permission to get eeg data. can you try to call api https://emotiv.gitbook.io/cortex-api/authentication/getlicenseinfo and send the response for me via email.
Hey @nguoithichkhampha, i sent you the email. Thanks!
@nguoithichkhampha Any updates on this issue?
already reply your email.
I have an Emotiv PRO License (academic) and I'm trying to access the raw eeg data stream. We keep encountering an error that says "The stream is unavailable or unsupported." although we do specify the license ID in the authorize API call. We looked at this issue but we were still unable to resolve the problem. Our licence is active.
Here is our authorization function:
self.send_command_to_cortex('authorize', { 'clientId': self.client_id, 'clientSecret': self.client_secret, 'license': license_id, 'debit': debit})
Here is our output:
REQUEST ACCESS
cortex response: {'id': 1, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The user has granted access right to this application.'}}
AUTHORIZE
cortex reponse: {'id': 2, 'jsonrpc': '2.0', 'result': {'cortexToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6ImNvbS5qLmVsaGFicm91ay5oZWFkc2V0cmVhZGVyIiwiYXBwVmVyc2lvbiI6IjEuMCIsImV4cCI6MTU3MjAyMjk1NCwibmJmIjoxNTcxNzYzNzU0LCJ1c2VySWQiOiIyYzEsdkhjfkjsnfjnskldfksjdlMS1mNjQzNTMwMDYwOWMiLCJ1c2VybmFtZSI6ImouZWxoYWJyb3VrIiwidmVyc2lvbiI6IjIuMCJ9.2+9wjeMMA5m+V3gasiCDwpJdOpVe3NFAfwKNK26Qrjg='}}
QUERY HEADSETS
cortex found headsets ['INSIGHT-A1D20287'] cortex response: {'id': 3, 'jsonrpc': '2.0', 'result': [{'connectedBy': 'bluetooth', 'customName': '', 'dongle': '0', 'firmware': '930', 'id': 'INSIGHT-A1D20287', 'motionSensors': ['Q0', 'Q1', 'Q2', 'Q3', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'T7', 'Pz', 'T8', 'AF4'], 'settings': {'eegRate': 128, 'eegRes': 14, 'memsRate': 64, 'memsRes': 14, 'mode': 'INSIGHT'}, 'status': 'connected'}]}
CREATE SESSION
QUERY SESSIONS
cortex response: {'id': 5, 'jsonrpc': '2.0', 'result': [{'appId': 'com.j.sdsd.sdsd', 'headset': {'connectedBy': 'bluetooth', 'customName': '', 'dongle': '0', 'firmware': '930', 'id': 'INSIGHT-A1D20287', 'motionSensors': ['Q0', 'Q1', 'Q2', 'Q3', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'T7', 'Pz', 'T8', 'AF4'], 'settings': {'eegRate': 128, 'eegRes': 14, 'memsRate': 64, 'memsRes': 14, 'mode': 'INSIGHT'}, 'status': 'connected'}, 'id': 'f032341-a25b-450e-9826-cf28ba934e19', 'license': '', 'owner': 'j.sdsd', 'recordIds': [], 'recording': False, 'started': '2019-10-23T13:02:34.897-04:00', 'status': 'opened', 'stopped': '', 'streams': []}]} DEBUG:cortex:cortex response: {'id': 5, 'jsonrpc': '2.0', 'result': [{'appId': 'com.j.dssd.sdsd', 'headset': {'connectedBy': 'bluetooth', 'customName': '', 'dongle': '0', 'firmware': '930', 'id': 'INSIGHT-A1D20287', 'motionSensors': ['Q0', 'Q1', 'Q2', 'Q3', 'ACCX', 'ACCY', 'ACCZ', 'MAGX', 'MAGY', 'MAGZ'], 'sensors': ['AF3', 'T7', 'Pz', 'T8', 'AF4'], 'settings': {'eegRate': 128, 'eegRes': 14, 'memsRate': 64, 'memsRes': 14, 'mode': 'INSIGHT'}, 'status': 'connected'}, 'id': 'f03sdj1-a25b-47e-93f6-cf28ba934e19', 'license': '', 'owner': 'j.sdsd', 'recordIds': [], 'recording': False, 'started': '2019-10-23T13:02:34.897-04:00', 'status': 'opened', 'stopped': '', 'streams': []}]} SUBSCRIBE
cortex response: {'id': 6, 'jsonrpc': '2.0', 'result': {'failure': [{'code': -32016, 'message': 'The stream is unavailable or unsupported.', 'streamName': 'eeg'}], 'success': []}} DEBUG:cortex:cortex response: {'id': 6, 'jsonrpc': '2.0', 'result': {'failure': [{'code': -32016, 'message': 'The stream is unavailable or unsupported.', 'streamName': 'eeg'}], 'success': []}}
Thanks.