Jakeler / ble-serial

"RFCOMM for BLE" a UART over Bluetooth low energy (4+) bridge for Linux, Mac and Windows
https://blog.ja-ke.tech/tags/#bluetooth
MIT License
264 stars 37 forks source link

Install in Ubuntu 20.04 - glib.h: No such file or directory #13

Closed eliboni closed 3 years ago

eliboni commented 3 years ago

This is not really an issue, just want to log for others who may have limited python knowledge how simple it has been to setup ble-serial with an HC-08 device on a vanilla Ubuntu 20.04. The only caveat to avoid compiling errors (glib.h: No such file or directory) was to install libglib2.0-dev as well.

$ sudo apt install python3-pip
$ sudo apt-get install libglib2.0-dev
$ pip3 install ble-serial
$ PATH=/home/enrico/.local/bin:$PATH
$ pip3 install git+https://github.com/edwios/bluepy.git@10f1cee90afb416f139949b86b491e4cfa98c886
$ cd .local/lib/python3.8/site-packages/bluepy/
$ sudo setcap 'cap_net_raw,cap_net_admin+eip' bluepy-helper
$ ble-scan
[...]
Discovered device: 9c:1d:58:95:4e:a9 -> HC-08
[...]
$ ble-serial -d 9c:1d:58:95:4e:a9 
23:38:15.56 | INFO | virtual_serial.py: Slave created on /tmp/ttyBLE -> /dev/pts/5
23:38:15.620 | INFO | interface.py: Connected device 9c:1d:58:95:4e:a9
23:38:15.860 | INFO | interface.py: Receiver set up
23:38:15.861 | INFO | __main__.py: Running main loop!

as you can see serial port was on /dev/pts/5 and it worked perfectly with aGotino diy telescope goto project via Stellarium planetarium software. Many thanks!

Jakeler commented 3 years ago

Thanks for the additional info. I am closing this directly, because it is not an issue, then it is still findable through the search. Btw: very cool telescope project! I will take a closer look when I finally setup the software for my goto telescope ;)