Czujnik kupiony na tej aukcji (snapshot): https://allegro.pl/oferta/autonomiczny-czujni...jYmZhMmNmYjk2YTE4NjY3ZWQzOWQ5NDlhYTZmOTgyNTk=
1. Connected by CH341A programmer. Shorting CEN to GND for a moment allows you to download and save the flash memory.
2. BK7231GUIFlashTool via mono on linux turned out to be useless and throws the same error every time as in many other forum threads:
3. uartprogram with hid_download_py it works without any problem.
4. Loaded OpenBK7231N_QIO_1.15.668.bin
5. Leads as in the picture below.
pin 5 = GPIOP_26 PWM5 - (Btn 1 0) battery case button
pin 10 = GPIOP_9 = PWM 3 = (LED 0) diode-
pin 14 = GPIPP_7 = PWN_1 = (DoorSensorWSleep_nPup 0 [regular DoorSensWSleep doesn't work at all]) reed switch

6. The LED lights up after the reed switch is opened, and goes out after the short circuit and the information goes through the MQTT to HomeAssistant. Time until deep sleep is also extended correctly. However, wake-up only works when the sensor has entered deep sleep in the open reed (off) position. When the magnet shorts it (on) and in this state it is put to sleep, there is no possibility of waking up and a reset by turning the power off and on again is necessary.
1. Connected by CH341A programmer. Shorting CEN to GND for a moment allows you to download and save the flash memory.
2. BK7231GUIFlashTool via mono on linux turned out to be useless and throws the same error every time as in many other forum threads:
Quote:Going to start reading at offset 0x00...
Reading 0x00... failed with serial.BytesToRead 4095 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF4061009000000200069 data.
failed! There was no result to save.
3. uartprogram with hid_download_py it works without any problem.
4. Loaded OpenBK7231N_QIO_1.15.668.bin
5. Leads as in the picture below.
pin 5 = GPIOP_26 PWM5 - (Btn 1 0) battery case button
pin 10 = GPIOP_9 = PWM 3 = (LED 0) diode-
pin 14 = GPIPP_7 = PWN_1 = (DoorSensorWSleep_nPup 0 [regular DoorSensWSleep doesn't work at all]) reed switch

6. The LED lights up after the reed switch is opened, and goes out after the short circuit and the information goes through the MQTT to HomeAssistant. Time until deep sleep is also extended correctly. However, wake-up only works when the sensor has entered deep sleep in the open reed (off) position. When the magnet shorts it (on) and in this state it is put to sleep, there is no possibility of waking up and a reset by turning the power off and on again is necessary.