Raspberry pi 3 b + ruuvitag ei toimi

Hei,

hankin pari kpl ruuvitag sensoreita, joilla meinasin korvata 1-wire lankallisia lÀmpötila/kosteusantureita.

Ruuvitag toimii hienosti puhelimen apista.

Raspi on versioltaan:
Hardware : BCM2835
Revision : a020d3
Serial : 000000003316296c
Model : Raspberry Pi 3 Model B Plus Rev 1.3

KĂ€yttis/kernel versio:

root@raspberrypi:~# uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Sain kovalla yrityksellÀ ruuvitag sivuilta löytÀmillÀni pythoneilla jossain vaiheessa irti ihan oikeitakin tietoja:

tÀssÀ malli, jossa sattui onnistumaan:

"
root@raspberrypi:~# cat /home/pihole/ruuvitag_luku_onnistuu_joskus.txt
pihole@raspberrypi:~ $ for i in $(seq 1 10)

do
python lue_ruuvi.py
sleep 10
done
MAC: D0:B6:91:C5:0A:B8
Data: {‘data_format’: 5, ‘humidity’: 40.2, ‘temperature’: 23.18, ‘pressure’: 997.41, ‘acceleration’: 1005.7594145718946, ‘acceleration_x’: -44, ‘acceleration_y’: -40, ‘acceleration_z’: 1004, ‘tx_power’: 4, ‘battery’: 2816, ‘movement_counter’: 68, ‘measurement_sequence_number’: 783, ‘mac’: ‘d0b691c50ab8’, ‘rssi’: -40}
pihole@raspberrypi:~ $ for i in $(seq 1 10) ; do python lue_ruuvi.py; sleep 10; done
MAC: D0:B6:91:C5:0A:B8
Data: {‘data_format’: 5, ‘humidity’: 40.16, ‘temperature’: 23.17, ‘pressure’: 997.29, ‘acceleration’: 997.7735213965141, ‘acceleration_x’: -44, ‘acceleration_y’: -40, ‘acceleration_z’: 996, ‘tx_power’: 4, ‘battery’: 2809, ‘movement_counter’: 68, ‘measurement_sequence_number’: 794, ‘mac’: ‘d0b691c50ab8’, ‘rssi’: -56}
"

"
root@raspberrypi:~# jq . ruuvi_1.json
{
“Data”: {
“data_format”: 5,
“humidity”: 40.16,
“temperature”: 23.17,
“pressure”: 997.29,
“acceleration”: 997.7735213965141,
“acceleration_x”: -44,
“acceleration_y”: -40,
“acceleration_z”: 996,
“tx_power”: 4,
“battery”: 2809,
“movement_counter”: 68,
“measurement_sequence_number”: 794,
“mac”: “d0b691c50ab8”,
“rssi”: -56
}
}
"
mutta pÀÀasiassa tulee jotain virhettÀ:

/var/log/syslog itkee
"
Apr 19 17:17:15 raspberrypi kernel: [ 7702.986050] Bluetooth: hci0: request failed to create LE connection: err -110
Apr 19 17:17:16 raspberrypi kernel: [ 7703.985343] Bluetooth: hci0: Opcode 0x2005 failed: -16
Apr 19 17:17:42 raspberrypi kernel: [ 7729.866011] Bluetooth: hci0: Opcode 0x200d failed: -110
Apr 19 17:17:42 raspberrypi kernel: [ 7729.866071] Bluetooth: hci0: request failed to create LE connection: err -110
Apr 19 17:17:51 raspberrypi kernel: [ 7738.826020] Bluetooth: hci0: Opcode 0x200d failed: -110
Apr 19 17:17:51 raspberrypi kernel: [ 7738.826089] Bluetooth: hci0: request failed to create LE connection: err -110
Apr 19 17:18:00 raspberrypi kernel: [ 7747.786001] Bluetooth: hci0: Opcode 0x200d failed: -110
Apr 19 17:18:00 raspberrypi kernel: [ 7747.786057] Bluetooth: hci0: request failed to create LE connection: err -110
"
blueoothctl nÀyttÀÀ ettÀ Ruuvitag löytyisi, vÀlillÀ:

"
root@raspberrypi:~# bluetoothctl
Agent registered
[CHG] Controller B8:27:EB:BC:83:C6 Pairable: yes
[bluetooth]# scan on
Discovery started
[CHG] Device 7D:64:E8:1E:2D:B3 RSSI: -35


[CHG] Device D0:B6:91:C5:0A:B8 RSSI: -41
[CHG] Device D0:B6:91:C5:0A:B8 ManufacturerData Key: 0x0499
[CHG] Device D0:B6:91:C5:0A:B8 ManufacturerData Value:
05 12 0a 3f fd c2 76 ff e4 ff dc 03 e0 a5 b6 18 
?..v

00 86 d0 b6 91 c5 0a b8 

[DEL] Device D0:B6:91:C5:0A:B8 Ruuvi 0AB8
[DEL] Device C9:78:EB:7E:4C:07 C9-78-EB-7E-4C-07
[CHG] Device 7D:64:E8:1E:2D:B3 RSSI: -35
[CHG] Device 67:97:5F:22:D9:9D RSSI: -59
[NEW] Device D0:B6:91:C5:0A:B8 Ruuvi 0AB8
[DEL] Device D0:B6:91:C5:0A:B8 Ruuvi 0AB8
[CHG] Device 67:97:5F:22:D9:9D RSSI: -68
[NEW] Device D0:B6:91:C5:0A:B8 Ruuvi 0AB8
[CHG] Device D0:B6:91:C5:0A:B8 Connected: no


[CHG] Device D0:B6:91:C5:0A:B8 RSSI: -35
[CHG] Device D0:B6:91:C5:0A:B8 ManufacturerData Key: 0x0499
[CHG] Device D0:B6:91:C5:0A:B8 ManufacturerData Value:
05 12 0a 40 0b c2 76 ff e4 ff d8 03 e0 a7 f6 18 
@
v

00 87 d0 b6 91 c5 0a b8 

[CHG] Device C9:78:EB:7E:4C:07 RSSI: -59
[DEL] Device D0:B6:91:C5:0A:B8 Ruuvi 0AB8
[NEW] Device D0:B6:91:C5:0A:B8 Ruuvi 0AB8
[CHG] Device D0:B6:91:C5:0A:B8 Connected: no


"

Osaako joku auttaa eteenpÀin?

Terv.

Jari

@otso osaisi mahdollisesti antaa suuntaa tÀhÀn ongelmaan.

KÀytÀtkö siis tÀtÀ kirjastoa? GitHub - ttu/ruuvitag-sensor: Python package for communicating with RuuviTag BLE Sensor and for decoding sensor data from broadcasted data

Raspberry Pin ja Linuxin Bluetooth LE-tuessa on ollut aika paljon mutkia matkassa vuosien varrella, mutta tuon kirjaston uusimman version kanssa palasten pitÀisi sopia yhteen.

KyllÀ, tuon ohjeen mukaisesti olen asentanut ruuvitag-sensorin, mutta nikottlee kovasti