Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG Method always returns None and awaits a miracle? ;) #33

Open
XeNONE1100 opened this issue Jan 20, 2023 · 3 comments
Open

BUG Method always returns None and awaits a miracle? ;) #33

XeNONE1100 opened this issue Jan 20, 2023 · 3 comments

Comments

@XeNONE1100
Copy link

Hi,

Just heaving trying to have some fun with an ev3 and I realized that something is never gonna happen until it's changed...

jsonres = self.handle_request(jsonreq['method'], jsonreq['params'])

I cannot connect to EV3 as jsonres is always None due to handle_request always returning None.

def handle_request(self, method, params):

Log:
2023-01-20 11:04:04,499 start recv_request 2023-01-20 11:04:04,499 request: {"jsonrpc":"2.0","method":"discover","params":{"majorDeviceClass":8,"minorDeviceClass":1},"id":0} 2023-01-20 11:04:04,499 default handle_request: discover, {'majorDeviceClass': 8, 'minorDeviceClass': 1} 2023-01-20 11:04:04,499 Failure in session for web socket path: /scratch/bt

What should jsonres contain?
Thank you!

@kawasaki
Copy link
Owner

Hi @XeNONE1100

Unfortunately, pyscrlink dropped EV3 support in last July. EV3 uses legacy bluetooth protocol. pyscrlink had used the library pybluez to support the legacy bluetooth sprotocol, but it got unstable. To support EV3 again, I would like to find out other good library to replace pybluez (python-sdbus-bluez looks good, so far). It will take more time to decide good library and re-implement EV3 support.

@asaldele1
Copy link

asaldele1 commented Mar 23, 2024

This pybluez fork works fine with EV3: https://github.com/AcrossTheCloud/pybluez

SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats fixed in original pybluez repo.

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 4: invalid start byte fixed in this fork.

@asaldele1
Copy link

For now i have created fork that does installs everything for ev3 automatically. It uses dependency link, so you can't use pip install with this repo. To use EV3:

git clone https://github.com/asaldele1/pyscrlink.git
cd pyscrlink
python3 setup.py install --user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants