martinohanlon / BlueDot

A zero boiler plate bluetooth remote
MIT License
143 stars 44 forks source link

ObjectManager doesn't exist error #105

Closed aplisov closed 6 years ago

aplisov commented 6 years ago

I've been trying to get BlueDot to work all day and have still come up empty. My mydot.py script consists of the example code that is given in the tutorial. from bluedot import BlueDot bd = BlueDot() bd.wait_for_press() print("You pressed the blue dot!") When I attempt to run this script however, I get this error in console https://gyazo.com/fd9b8dfb9521543f7eb5c9339eeb17d2 What's going on here and how do I fix it?

ukBaz commented 6 years ago

Hello.

Firstly, it would be more helpful if you could paste the text from the console in the github issue rather than a screenshot (especially one that is a link to another website).

The next thing I noticed was that it is complaining about line 16 of the mydot.py script. Above you only have four lines. What is the rest of your mydot.py script?

You don't say what hardware you are trying to run this on. It would also be helpful to know the operating system and version.

In the console could you let me know the output from the following commands. To find the version of BlueZ: bluetoothctl -v

To find what Bluetooth controllers you have on your system: btmgmt info

Thanks, Barry

aplisov commented 6 years ago

Sure thing. I honestly was confused about the line 16 part as well. The script literally only has 4 lines.

I'm trying to run this on a Raspberry Pi Model A with version 7 of Raspian (Wheezy) installed.

The command bluetoothctl -v isn't found and neither is btmgmt info.

Thanks, Bunny

ukBaz commented 6 years ago

I suspect the issue might be around the version of Raspbian and/or the hardware you are using. I have no easy way of testing as I don't have access to that hardware. I know the Raspberry Pi Model A did not support Bluetooth on the board itself so how are you adding the Bluetooth hardware? Is it a with a Bluetooth USB dongle? Also the development of Bluetooth has been quite rapid on Linux with many changes to the kernel and userspace daemon. I suspect there is not even a Bluetooth service running on your machine currently. You could test this with the following command: service bluetooth status

I suspect if you are going to be successful with a Model A (with an added Bluetooth USB dongle) then upgrading to the latest Raspbian (Stretch) is going to be your easiest option in my opinion.

aplisov commented 6 years ago

Yeah so I just ran the command and it does say the bluetooth is running. I'm using a rocketfish Bluetooth dongle. Perhaps I installed something, somewhere incorrectly? I've gone through this [tutorial (http://bluedot.readthedocs.io/en/latest/gettingstarted.html).

Is there an easy way to upgrade the operating system and if so perhaps that would be the best idea?

ukBaz commented 6 years ago

What was the version reported when you ran the command to test for the Bluetooth service?

I've done some research and the version of BlueZ that was default in Wheezy is BlueZ 4.99. If that is the case then the error message you saw makes sense. At 4.99 the adapter information was located at org.bluez.Adapter as opposed to the newer versions which have the adapter information located at org.bluez.Adapter1

Unless you have something else on your system you don't want to lose I would suggest you upgrade your system with a new image. One of the advantages of the Raspberry Pi is, that if you have another SD card, you could just swap the cards over to test with a new version of the operating system. Instructions on how to download and install a newer operating system can be found at: https://www.raspberrypi.org/documentation/installation/installing-images/

aplisov commented 6 years ago

When I ran service bluetooth status, all it says is [ ok ] bluetooth is running. It doesn't give any version numbers. Currently I'm downloading the latest Raspbian OS on another SD card. I'll give it a go and see if that fixes it.

aplisov commented 6 years ago

After reinstalling Raspbian OS on a new SD card I finally got the script to run and work properly.

Thanks a lot, Bunny

ukBaz commented 6 years ago

Great! Glad you got it working. And I appreciate you letting us know that you got it working. Enjoy!

martinohanlon commented 6 years ago

Sorry, Im late to the party... I missed this notification.

Yes as you have worked out, Blue Dot needs Raspbian Jessie +.

Bluetooth support in Wheezy was sketchy at best.

martinohanlon commented 6 years ago

Thanks @ukBaz for the excellent support :)