User avatar
Grumpy Mike
Posts: 909
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Sudo and IDLE3

Wed Feb 27, 2019 3:22 pm

I have an odd problem. I am trying to connect to a Bluetooth low power device using IDLE3.

I have two Pis, one is running with Debian Version 9.3 and this is working fine. The other is working with Debian Version 9.4 and in order for it to work I have to have run IDLE3 in the sudo mode launched from a terminal window.
I know in the new system that IDLE2 was removed from the Programming menu, but have there been other changes as well?

The older system has had all sorts of GPIO libraries added, where as the new system has very little on it. Is it possible that the old system has been loaded with some sort of privileges that I have forgotten about? If so how could these be restored?

When the new system is refusing to connect without the sudo running of IDLE3 I get this error message:-

Code: Select all

ERROR:pygatt.backends.gatttool.gatttool:Unexpected error when scanning: Set scan parameters failed: Operation not permitted
Thanks

Andyroo
Posts: 2989
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Sudo and IDLE3

Wed Feb 27, 2019 4:25 pm

Closest I have seen was with a SPI module that gave errors without SUDO.

In the end I had to add the module into THONNY and run the code from there. I could not get Idle out of the SUDO mode.
Need Pi spray - these things are breeding in my house...

User avatar
Grumpy Mike
Posts: 909
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: Sudo and IDLE3

Wed Feb 27, 2019 4:34 pm

Thanks, I can fudge it by left clicking on the IDLE entry in the Programming menu. Then selecting proprieties and then the Desktop Entry tab.
Then I can change the command box to include the sudo.

But this means I will always run IDLE in supervisor mode and I would like it to work how it did on the older system rather than using this crude blunderbuss approach.

Return to “Python”