logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?

Hostermen 66 2
ADVERTISEMENT
  • Need pin mapping for CHT8310 on BK7238

    #1 21934270
    Hostermen
    Level 2  
    Posts: 2
    [BK7238] [T1-S3] [CHT8310] TH01 WiFi Temperature & Humidity Sensor

    Hi,

    i sucessfully flashed openBeken onto these TH01 temperature sensors which uses a T1-S3 Module.

    [BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?
    [BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?
    [BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?
    [BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?
    [BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?

    It is a battery powered device and the flashing steps were rather difficult because it goes back to its sleep mode quickly and terminats it's connections.

    [BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?

    I found out that the button on this device keeps the chip from falling "asleep".
    So I had to set the baudrate up (9600 -> 1500000) so the transfer got done faster and during the flashing process (read or write) keep clicking the physical button every secound or so to keep the device from falling asleep.

    The connection was setup with my USB2TTL - CH340 adapter and i put 3.3VCC, GND, TX1 and RX1 according to the pinlayout.

    [BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?

    I had to switch RX, TX vice versa, so to say i switched it a couple of times so it matches correctly to give me a correct output signal.
    Then i reset it while powered on with everything connected with the CEN/RST pin with GND to bring it into "download/flashing mode"
    BK7231GUIFlashTool-build-378 - BK73123Flasher for Windows was used for that which worked fine for chiptype BK7238 (T1).

    Breadboard with a small circuit board and jumper wires on a desk; device with LED lights in the background.

    This way it sucessfully flashed the openBK firmware on the device and it opened its Hotspot.
    --
    Now i face the issue that i have no clue about the pin configuration on the webinterface.

    I made a firmware dump of the device before and tried to extract the Config from it but it only says:
    Sorry, no meaningful pins data found. This device may be TuyaMCU or a custom one with no Tuya config data.
    Baud keyword found, this device may be TuyaMCU or BL0942. Baud value is 9600
    No module information found.
    Device internal platform - T1, equals BK7238.
    And the Tuya section starts at 2052096 (0x1F5000), which is a default T1/XR806 and some T34/BK7231N offset.


    It is printed CH8310_SCL and CHT8310_SDA on the PCB of the board so i assume its using the CHT83XX driver.

    I want the device to display the Temperature, Humidity, Battery Level readings and maybe have the Button as well as the LED of the device working.

    Can someone with more knowledge help me figure out the Pin configuration for these devices?

    Screenshot of OpenBeken page showing pins P0–P28 with dropdowns, value fields, and a “Save” button.

    --
    Datasheet T1-S3:
    https://developer.tuya.com/en/docs/iot/T1-3S-Module-Datasheet?id=Keesax53r0r2d

    I do have another device with its original firmware
    If someone has an idea or can help me figure out the pin configuration mybe with TuyaMCUAnalyzer-v0.5 would be greatly appreciated.

    Can you upload clear photos of both sides of the PCB, especially the traces/labels from CHT8310_SCL, CHT8310_SDA, the button, LED and battery measurement circuit to the T1-S3 module pins?
    I've attached photos of both sides of the PCB.

    Which OpenBeken build/version did you flash, and did you already try any pin roles in the webinterface, for example CHT83XX SCL/SDA, Button, LED or ADC/Battery?
    I did try these two firmwares:
    OpenBK7238_QIO_1.18.297.bin
    OpenBK7238_QIO_1.18.297_battery.bin
    Attachments:
    • extractConfig.json.txt (5.63 KB) You must be logged in to download this attachment.
    • firmwareDumpBeforeOpenBKflashing.bin (2 MB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • TuyaMCU setup yields no sensor values

    #3 21934387
    Hostermen
    Level 2  
    Posts: 2
    Okay, since the T1-S3 is a tuyaMCU the pin configuration is not needed i guess? I left them all blank for now.

    I tried with the startup commands that i found in the comments and matched them against the dpID's and baud rate i got from the config extract of the firmware dump.

    loglevel 6
    logfeature 12 1
    
    startDriver tmSensor
    startDriver TuyaMCU
    
    tuyaMcu_setBaudRate 9600
    tuyaMcu_defWiFiState 4
    
    // dpID 102 is temperature div 10
    setChannelType 102 temperature_div10
    linkTuyaMCUOutputToChannel 102 val 102
    
    // dpID 103 is % humidity
    setChannelType 103 Humidity
    linkTuyaMCUOutputToChannel 103 val 103
    
    // dpID 104 is battery state - low(0), mid(1) and high(2)
    setChannelType 104 ReadOnly
    linkTuyaMCUOutputToChannel 104 enum 10
    setChannelLabel 10 Battery


    But no values show up.
    Can you point me into the direction of how to go about this?


    [BK7238] [T1-S3] [CHT8310] How to configure pins on TH01 T & H sensor after OpenBeken flash?

    Screenshot of OpenBeken startup command editor with a code-like text box and a “Submit” button.
ADVERTISEMENT