OpenWonderLabs / python-host

The python code running on Raspberry Pi or other Linux based boards to control SwitchBot.
Apache License 2.0
376 stars 84 forks source link

Raspberry Pi Zero W #6

Open gurmukhp opened 5 years ago

gurmukhp commented 5 years ago

Hello

I've tried to run this on the Raspberry Pi Zero W on the latest Raspbian lite image. The Pi comes with Bluetooth built int but the connection requests always time out.

Any idea why this is happening?

Thanks

nemccarthy commented 4 years ago

+1

uududde commented 2 years ago

@gurmukhp you managed to build this for the Pi Zero W?

Since days I am kind of stuck (Raspberry Pi Zero W Rev 1.1 with Raspbian buster) when trying to install gattlib. I try to install it first via pip3 which fails so I then install it by downloading, untar and installing from local folder usind sed to replace ...py35 into py37 but no matter what I try (like installing supposedly missing libs etc.) I keep getting errors when pip3 is installing wheel like:

arm-linux-gnueabihf-gcc: fatal error: Killed signal terminated program cc1plus
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

Ah one more thing I could try is using sed to maybe replace ...py35 with ...py3 in the setup.py before installing. The installation process takes ages to go through (I often let it running over night) just to report the errors hours later.

dave-p commented 2 years ago

Just had the same problem. The system is running out of memory and swapping onto the SD card. My solution was to add a HDD to the system and set up the Pi Zero to swap onto that with 1Gb of swap space. The compilation then (eventually) succeeded.

Debian now has python3-gattlib which might be another solution.