Quantcast
Channel: fischertechnik community forum
Viewing all articles
Browse latest Browse all 1325

Robo Pro / Computing / Software • TxT 4.0 Recherchen für Python Bluetooth support

$
0
0
Hi
Vielleicht völlig unnötig, aber nach einigen Recherchen zu einer Bluetooth-Python-Implementierung auf dem TXT 4.0 finden Sie hier eine kleine Dokumentation zum installierten Code:

CODE:

ft@txt40-XKLx:/usr/lib/python3.5/site-packages/fischertechnik$ ls -lsatotal 604 drwxr-xr-x  13 root root 4096 Feb 23 18:14 .8 drwxr-xr-x 160 root root 8192 Feb 23 18:14 ..4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 camera4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 control4 drwxr-xr-x   4 root root 4096 Feb 23 18:14 controller (--> cd txt4 directory for the implementation files)4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 events4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 factories4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 http4 -rw-r--r--   1 root root   76 Feb 23 17:39 __init__.py4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 machine_learning4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 models4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 mqtt4 drwxr-xr-x   2 root root 4096 Feb 23 18:14 __pycache__4 drwxr-xr-x   3 root root 4096 Feb 23 18:14 utility
Verbindung zum txt

CODE:

1. ssh ft@ip-Txt4.0password fischertechnik2a. cd / 2b. find . -print |grep fischertechnik3. cd /usr/lib/python3.5/site-packages/fischertechnik/controller/txt44. more Txt4GestureSensor.py
Eine Suche nach dem Bluetooth-Python-Modul ist erforderlich unter: #import bluetooth
(module PyBluez)

CODE:

1. pip3 list2. No module pybluez installed (--> bluetooth.c and .h are missing)3. pip3 install pybluezIn file included from bluez/btmodule.c:20:    bluez/btmodule.h:5:10: fatal error: bluetooth/bluetooth.h: No such file or directory     #include <bluetooth/bluetooth.h>              ^~~~~~~~~~~~~~~~~~~~~~~    compilation terminated.    error: command 'arm-ostl-linux-gnueabi-gcc' failed with exit status 1
Leider sind erneut Root-Rechte erforderlich, um den letzten Schritt richtig zu machen

CODE:

ft@txt40-XKLx:~$ sudo apt-get install libbluetooth-devWe trust you have received the usual lecture from the local SystemAdministrator. It usually boils down to these three things:    #1) Respect the privacy of others.    #2) Think before you type.    #3) With great power comes great responsibility.Password: 
To Be Continued....

Gruss R

Statistik: Verfasst von rbudding — 16 Mai 2024, 21:36



Viewing all articles
Browse latest Browse all 1325