logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] [CB3S] Smart Life Tuya IR USB Remote Control US01 Investigation

divadiow 1290 2
ADVERTISEMENT
  • Helpful post
    #1 20927159
    divadiow
    Level 34  
    This product caught my attention on Ali Express a few days ago. It had the familiar Tuya/Smart Life/2.4G-wifi only kind of vibe about it that might mean it's a Beken-based device. And indeed it was!

    Smart IR Remote product on AliExpress page, featuring WiFi capabilities and voice assistant integration.

    To begin, I plugged it into a standard USB port and paired it with the Tuya app just to see what firmware version it had and to see what remote control options were available.

    Information screen with the message No updates available and module versions. App interface for adding remote control to various devices.

    Using my metal spudger I pried open the case from the USB hinge and slowly around the edge. There is a small amount of glue as well as some clips along the entire edge. I was a little rough at the beginning and broke one of the shoulders off. No matter. Slow and steady is the key.

    As soon as the chassis is open, a shiny CB3S greets you. Below that is the 50117K-G E-CMOS 5V-3.3V voltage regulator, presumably to drop the 5V of USB down to 3.3 for the BK7231N on the CB3S.

    Order information table for EC50117 with various output voltage options.

    I assumed the central IR component, as there is only one of them, was for programming remote control commands the Tuya app may not cater for. I guess the expectation is that this would be used less often and the user would expect to point their remote directly at the unit. In opposition to the receive, the IR send LEDs are a family of 8, 4 on both sides of the PCB. I guess this is because the user expects this device to work almost omnidirectionally, not having to worry too much where the unit is placed

    Printed circuit board with electronic components and a USB module. Close-up of the CB3S module on a circuit board with visible electronic components. Close-up of CB3S module on a PCB with visible voltage regulator. Close-up of a circuit board with four white LEDs labeled LED1, LED3, LED5, and LED7. Close-up of a circuit board with four LEDs labeled LED9, LED6, LED2, LED4 and resistors marked R4, R17, R14, R15. Close-up of a circuit board labeled US01 CB3S_V1.4 with the date 2023-05-08. Interior of the plastic casing of a device marked US01. Back of a black USB Smart IR remote. Disassembled USB Smart IR remote with PCB and packaging. Open USB device case with visible PCB. Box of USB Smart IR Remote lying on a wooden table. View of USB Smart IR Remote with specifications visible on the casing.

    The rear of the PCB has some very helpful GND, 3V3, RX1 and TX1 pads, from which I was able to flash OpenBK firmware using the Easy BK Flasher GUI.

    silkscreen text for forum searchers: US01 CB3S_V1.4 2023-05-08

    Close-up of US01 CB3S V1.4 circuit board with USB port.

    I did not unsolder any parts nor cut any traces to be able to flash. I used pogo pins, USB-TTL adaptor and an external 3.3v power supply, though the 5V from a USB would have worked too.

    Before flashing I used the TXD2, GND and 3V3 pins on the front of the CB3S to pull the UART boot log, attached.

    Diagram of the bottom view of a circuit board with pin labels and dimensions.

    Unfortunately BK flasher could not determine the GPIO assignments so I used trial and error to find the btn and the LED. I used a multimeter to find that the ir_rec data leg went to p7.

    Sorry, no meaningful pins data found. This device may be TuyaMCU or a custom one with no Tuya config data.
    No module information found.
    And the Tuya section starts, as usual, at 2023424
    


    p8 led (or wifi led?)
    p6 btn
    p7 ir_rec

    {
    	"reset_pin":"6",
    	"wfst_pin":"8",
    	"owm":"1",
    	"reset_lv":"0",
    	"rsthold":"3",
    	"wfst_lv":"1",
    	"netyc":"1",
    	"infrr":"7",
    	"netnc":"0",
    	"infre":"26",
    	"crc":"42",
    	"}ac_pin":"chs8um6esddtzco1hbAgw_di{abi",
    	"id":"null",
    	"swv":"2.0.0",
    	"bv":"40.00",
    	"pv":"2.2",
    	"lpv":"3.3",
    	"pk":"key54vrth5askhsj",
    	"firmk":"key54vrth5askhsj",
    	"cadv":"1.0.3",
    	"cdv":"1.0.0",
    	"dev_swv":"2.0.0",
    	"s_id":"null",
    	"dtp":"0",
    	"sync":"0",
    	"attr_num":"0",
    	"mst_tp_0":"0",
    	"mst_ver_0":"null",
    	"mst_tp_1":"0",
    	"mst_ver_1":"null",
    	"mst_tp_2":"0",
    	"mst_ver_2":"null",
    	"mst_tp_3":"0",
    	"mst_ver_3":"null }{nc_tp",
    	"ssid":"null",
    	"passwd":"null",
    	"md":"0",
    	"random":"0",
    	"wfb64":"1",
    	"stat":"0",
    	"token":"null",
    	"region":"null",
    	"reg_key":"null",
    	"dns_prio":"03fAwf_start_md3 )Agw_wsm{nc_tp",
    	"psk_key":"6FdexlrpU86zRD5G5GjYpwQOxCmq5kXD0Xpn7",
    	"auth_key":"dABzIgXAi2bZaudNgg7C8TfPRA2YNfXu",
    	"ap_ssid":"SmartLife",
    	"ap_passwd":"null",
    	"country_code":"null",
    	"bt_mac":"null",
    	"bt_hid":"null",
    	"prod_test":"false",
    	"fac_pin":"chs8um6esddtzco1PBgw_aiAtimer_arr",
    	"h_ip":"null",
    	"hs_url":"null",
    	"hs_ip":"null",
    	"hs_psk":"null",
    	"hs_psk_ip":"null",
    	"mqs_url":"null",
    	"mqs_{lastFetchTime":"0",
    	"cnt":"0}p",
    	"ai_sp":"null",
    	"ai_sp_ip":"null",
    	"mq_psk":"null",
    	"mq_psk_ip":"null",
    	"time_z":"null",
    	"s_time_z":"null",
    	"w{uuid":"61000a40b234094d",
    	"wx_uuid":"null",
    	"dy_tls_m":"0",
    	"cloud_cap":"0",
    	"psk21_key":"null }0UAtls_ca_cnt00Ais_stride0{abi",
    	"property":"{type",
    	"maxlen":"3072}",
    	"type":"obj}",
    	"{mode":"ro",
    	"lckey":"'u4J09X~;_S-u)Z9",
    	"h_url":"http",
    	"mqs_ip":"null",
    	"mq_url":"m2.tuyaeu.com",
    	"mq_ip":"18.184.31.90",
    	"wx_app_id":"null",
    	"index":"0};FBastro_timer{timestamp"
    }
    


    I've yet to determine the ir_send GPIO (I assume it's one GPIO because all the sending LEDs would be sending the same signal in unison) because I can't seem to be able to nail the command to simulate a send. I've received the following on/off button code from a hi-fi remote control

    Info:IR:IR IR_NEC 0x4583 0x11 0 (32 bits)
    Info:IR:IR IR_NEC2 0x4583 0x11 1 (32 bits)


    but setting undetermined GPIOs to IRSend mode, rebooting and trying manual commands of this nature

    IRSend NEC-0x45830x11-0


    and others I've found on the forum that are noted as valid, like

    IRSend Samsung-0xB24D-0x2929-0


    all fail with

    Error code IRSend in a configuration application.

    The IR driver is running, so not sure what's wrong yet.

    OBK template for this device
    Code: JSON
    Log in, to see the code
  • ADVERTISEMENT
  • #2 20927401
    divadiow
    Level 34  
    UPDATE: IRSend sorted. I looked for another CB3S universal IR device with the same led, btn and ir_rec pins already discovered. It's the same as this

    https://www.elektroda.com/rtvforum/topic3961676.html

    
    "6": "Btn;1",
    "7": "IRRecv;0",
    "8": "LED;0",
    "26": "IRSend;0"
    


    OBK updated. Now I can turn my hifi on/off with

    IRSend NEC-0x4583-0x11-0


    not sure what these unknowns are in log though after sending the command
    
    Debug:IR:IR decode returned true, protocol 16
    Debug:IR:Address=0x0 Command=0x40
    Debug:IR: Raw-Data=0x0
    Debug:IR: 1 bits
    Debug:IR: MSB first
    Debug:IR:IR decode returned true, protocol RC5 (16)
    Info:IR:IR IR_RC5 0x0 0x40 0 (1 bits)
    Debug:IR:IR fire event took 0ms
    Debug:IR:IR decode returned true, protocol 0
    Debug:IR: Hash=0x0
    Debug:IR:0 bits (incl. gap and start) received
    Debug:IR:IR decode returned true, protocol UNKNOWN (0)
    Info:IR:IR IR_UNKNOWN 0x0 0
    Debug:IR:IR decode returned true, protocol 0
    Debug:IR: Hash=0xEA0E5282
    Debug:IR:4 bits (incl. gap and start) received
    Debug:IR:IR decode returned true, protocol UNKNOWN (0)
    Info:IR:IR IR_UNKNOWN 0xEA0E5282 0
    
    


    Added after 34 [minutes]:

    I've also made use of the btn by adding an event handler to the autoexec.bat. This event will turn my hifi on and off

    addEventHandler OnClick 6 IRSend NEC-0x4583-0x11-0


    "6" being the pin the btn action is logged on

    
    Info:GEN:6 key_short_press
    Info:GEN:6 Button_OnInitialPressDown
    
ADVERTISEMENT