Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to read broadcasted data in ATC module #106

Closed
SydneyOwl opened this issue Dec 18, 2021 · 3 comments
Closed

failed to read broadcasted data in ATC module #106

SydneyOwl opened this issue Dec 18, 2021 · 3 comments

Comments

@SydneyOwl
Copy link

SydneyOwl commented Dec 18, 2021

I tried python3 LYWSD03MMC.py –atc –watchdogtimer 5 and python3 LYWSD03MMC.py –atc, but neither of them works. When –watchdogtimer is added, LE Scan keeps stopping and starting. If removed, nothing display on the screen except “Listening……”

Power ON bluetooth device 0
Bluetooth device 0 is already enabled
Enable LE scan
scan params: interval=1280.000ms window=1280.000ms own_bdaddr=public whitelist=no
socket filter set to ptype=HCI_EVENT_PKT event=LE_META_EVENT
Listening ...
Power ON bluetooth device 0
Bluetooth device 0 is already enabled
Enable LE scan
scan params: interval=1280.000ms window=1280.000ms own_bdaddr=public whitelist=no
socket filter set to ptype=HCI_EVENT_PKT event=LE_META_EVENT
Listening ...
Watchdog: Did not receive any BLE Paket within 1639795077 s. Restarting BLE scan. Count: 1
Disable LE scan
Enable LE scan
scan params: interval=1280.000ms window=1280.000ms own_bdaddr=public whitelist=no

Watchdog: Did not receive any BLE Paket within 1639795083 s. Restarting BLE scan. Count: 2
Disable LE scan
Enable LE scan
scan params: interval=1280.000ms window=1280.000ms own_bdaddr=public whitelist=no

Watchdog: Did not receive any BLE Paket within 1639795089 s. Restarting BLE scan. Count: 3
Disable LE scan
Enable LE scan
scan params: interval=1280.000ms window=1280.000ms own_bdaddr=public whitelist=no

but data broadcasted can be seen by running bluetoothctl scan on on ubuntu 20.04:

[CHG] Device A4:C1:38:4C:5A:3D RSSI: -28
[CHG] Device A4:C1:38:4C:5A:3D ServiceData Key: 0000181a-0000-1040-8000-04805fcb3dfb
[CHG] Device A4:C1:38:4C:5A:3D ServiceData Value:
  a4 c1 38 4c 9d 34 01 0d 35 64 0c 58 bd           ..8L.4..5d.X. 
……
[CHG] Device A4:C1:38:4C:5A:3D RSSI: -26
[CHG] Device A4:C1:38:4C:5A:3D ServiceData Key: 0000181a-0000-1040-8000-04805fcb3dfb
[CHG] Device A4:C1:38:4C:5A:3D ServiceData Value:
  a4 c1 38 4c 9d 34 01 0d 35 64 0c 58 bf           ..8L.4..5d.X.  

10 secs between each broadcast approximately.
Here are my settings:
image
image
Is there anything wrong?

@JsBergbau
Copy link
Owner

Very strange issue. I've updated one Mi LYWSD03MMC to the latest version and pulled the repo. It works with ./LYWSD03MMC.py --atc

Did you send the settings and thermometer stayed connected afterwards? That is important that settings get applied. After that you have to disconnect from the Telink-Flasher, Bluetooth sign must vanish from display, only then data is broadcasted.

@SydneyOwl
Copy link
Author

Thank you for your reply!
I think settings are properly storaged. I also tried removing pin and flashing the firmware again but they did not work.
So the problem may be ubuntu20.04 and I'll try to switch to raspbian and run it on raspberry zero w later.

@SydneyOwl
Copy link
Author

Works well on raspberry pi zero w. Problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants