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

object has no service <class 'MaskService'> #4

Open
c0d3s1ing3r opened this issue Apr 11, 2024 · 3 comments
Open

object has no service <class 'MaskService'> #4

c0d3s1ing3r opened this issue Apr 11, 2024 · 3 comments

Comments

@c0d3s1ing3r
Copy link

Hello,

I'm trying to replicate your approach, albeit with different images, and am having an issue establishing the connection with the mask.
I believe I'm using a standard "Shining App Mask" and the Adafruit Feather nRF52840 Express (I'm also using the Nunchuck breakout like yourself, but my issue is with bluetooth.)

The issue can be viewed on youtube here

I get the below error (normally just the last line is printed, I added some debugs)

code.py output:
<ProvideServicesAdvertisement services=<BoundServiceList: UUID(0xfff0)> >
Available services:
<BoundServiceList: UUID(0xfff0)>
ERR  <BLEConnection object at 0x200231c0> object has no service <class 'MaskService'>

The issue seems to be on line 105.
The behavior is that the connection will spin while the board tries to make a connection.

Reading the logic of your section it's difficult to understand how this could be possible given that you're literally checking: if MaskService in adv.services: before attempting to get the connection. I added the below prints before the error message to assist in debugging:

                            print(adv)
                            print("Available services:")
                            print(adv.services)

I'm struggling to figure out what could be causing this. It's able to view the board but to my knowledge I have no way of viewing the correct VendorUUID if that has changed. Also, because of the check for whether the MaskService is even available on line 99, one would think this sort of error would be impossible.

I'd appreciate any guidance you could provide to point me in the right direction.

I'm considering running the uuid dump code here: https://pastebin.com/xWLPX6nb that came from the original reddit thread but wanted to check with you first.

Thanks!

@c0d3s1ing3r
Copy link
Author

This seems to be a duplicate of #3 but that wasn't addressed.
I'll run the uuid dump.

@c0d3s1ing3r
Copy link
Author

This seems to be a duplicate of #3 but that wasn't addressed.
I'll run the uuid dump.

I am having some issues running the uuid dump. I've been able to setup the code to run on wsl but I'm still not sure which codes should be tested in mask_codes.py, I'll see if I can adapt that script a bit later.

@c0d3s1ing3r
Copy link
Author

c0d3s1ing3r commented Apr 12, 2024

So I'm going on a trip and just had to recompile the Ubuntu WSL kernel to add Bluetooth support in order to run the uuid dump code, what a mess that was.

I need to restart for that though and I really don't feel like doing that right now, so I'll try and take a crack at it when I get back.

@shawnrancatore if you happen to have thought of a solution to this or what was linked in Issue #3 (I tried what you suggested in that by completely turning off my phone Bluetooth but still encountered the issue) or have had an opportunity to retest your mask I'd appreciate your help.

Also if you have any guidance on what codes to create in mask_codes.py (if you have a sample of that, for instance) I'd appreciate it.

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

1 participant