logo elektroda
logo elektroda
X
logo elektroda

[Solved] OHLUX GU24 Smart Bulb with CB2L: Issues with OpenBK AP Mode and Potential Solutions

joerobinson 735 6
ADVERTISEMENT
  • #1 21213015
    joerobinson
    Level 2  
    Greetings!

    I have an OHLUX GU24 Smart Bulb that I'm trying to configure with OBK. After tearing it down, I've found that it's running a CB2L.

    I was able to successfully remove this from the bulb and connect it to my PC with my USB to Serial programmer. I was able to talk to the device using OpenBK Flasher where I pulled a copy of the firmware. After taking a backup, I was able to write the latest version of OpenBk to it.

    With the other devices I've done, I was able to restart them and see the SSID when the device went into AP mode, but I'm not seeing the SSID on this device. I've tried multiple wifi devices to be sure, and no other device I have can find the AP network.

    I'm still learning here, so I may be overlooking something obvious. It seems as though I can talk to it just fine -- read from it, write to it, etc, but it doesn't appear to be starting the AP mode. One thing that seemed odd to me was that the device didn't need CEN grounded for programming (or briefly grounded for to enter programming mode). As soon as the device was powered on, I was able to read and write. I'm wondering if it's possible this is "stuck" in programming mode?

    I was wondering if anyone could help nudge me in the right direction as to what I should be looking at next. I feel like the device isn't booting up correctly, and it's automatically entering programming mode, but I'm not quite sure how to verify that or how to resolve it.

    While I would love to make this work, I am open to replacing the CB2L. I'm not sure what I can drop in as a replacement, or where I can source them from.

    I really do appreciate any help you have to offer. I'm rather new to working with technology at this level, but I will eventually get up to speed!

    Thank you so much!
  • ADVERTISEMENT
  • #2 21213079
    max4elektroda
    Level 20  
    If you have a serial connection, you should be able to see the log. That should give some advice about whats going on during startup...
    Usually it's on TX2.
  • ADVERTISEMENT
  • #3 21213153
    joerobinson
    Level 2  
    >>21213079

    Thank you so much! I will review the log and see what's happening!

    Added after 45 [minutes]:

    >>21213079
    max4elektroda wrote:
    If you have a serial connection, you should be able to see the log. That should give some advice about whats going on during startup...
    Usually it's on TX2.


    It looks like things may not have been as successful as I thought. It's hard to tell where this starts, as it just continues to scroll rather quickly, but I believe the error I'm seeing is:

    Quote:

    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 7512 #######
    Info:MAIN:###### safe mode activated - boot failures 1842
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 1 changes count.
    Info:MAIN:Main_Init_Before_Delay done


    Anything else I'm missing? Here is the full log:

    Quote:
    V:BK7231N_1.0.1

    REG:cpsr spsr r13 r14

    SVC:000000D3 00401C1C 000033AC

    IRQ:000000d2 00000010 00401e0c 42184380

    FIR:000000d1 00000010 00401ffc 61403464

    SYS:000000df 0040192c 00000158

    ST:00000000

    J 0x10000

    bk_misc_init_start_type 0 0
    prvHeapInit-start addr:0x414488, size:113528
    [Flash]id:0xeb6015
    sctrl_sta_ps_init
    cset:0 0 0 0
    Entering initLog()...
    Commands registered!
    initLog() done!
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 7512 #######
    Info:MAIN:###### safe mode activated - boot failures 1842
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 1 changes count.
    Info:MAIN:Main_Init_Before_Delay done

    Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay

    Main_Init_Delay

    delaying start
    bandgap_calm_in_efuse=0x63
    [load]bandgap_calm=0x63->0x23,vddig=4->5
    [FUNC]rwnxl_init
    [bk]tx_txdesc_flu#Startup delayed 0ms#
    sms#
    [FUNC]intc_init
    [FUNC]calibrù[00]


    Added after 15 [minutes]:

    >>21213153

    I went back to the original firmware to see if it revealed any additional details, the part that jumps out to me is:

    Quote:

    tkl_ethernetif_output: invalid vif: 255!
    tkl_ethernetif_output: invalid vif: 255!


    Quote:

    ota don't start or start err, can't end inform!



    But I don't have any baseline for a normal boot.

    Quote:

    V:BK7231N_1.0.1

    REG:cpsr spsr r13 r14

    SVC:000000D3 00401C1C 000033AC

    IRQ:000000d2 00000010 00401e0c 40284a80

    FIR:000000d1 00000010 00401ffc 01441424

    SYS:000000df 0040192c 00000158

    ST:00000000

    J 0x10000

    bk_misc_init_start_type 0 0
    [MEM DBG] heap init-------size:164664 addr:0x407cc8---------
    [Flash]id:0xeb6015
    [load]bandgap_calm=0x63->0x23,vddig=4->5
    [bk]tx_txdesc_flush
    tkl_ethernetif_init
    tkl_ethernetif_init
    tkl_ethernetif_output: invalid vif: 255!
    tkl_ethernetif_output: invalid vif: 255!
    [01-01 00:00:00 TUYA N][lr] crc_r[ca] crc_g[00] crc_b[67]
    [01-01 00:00:00 TUYA E][lr] uf_open 8 err 8
    [01-01 00:00:00 TUYA N][lr] reset is 0>>
    [01-01 00:00:00 TUYA N][lr] BleSwitch=1
    [01-01 00:00:00 TUYA E][lr] uf_open 8 err 8
    [01-01 00:00:00 TUYA N][lr] reset is 0>>
    [01-01 00:00:00 TUYA N][lr] first bright up
    [01-01 00:00:00 TUYA N][lr] reset is 0>>
    [01-01 00:00:00 TUYA E][lr] logseq empty
    ota don't start or start err, can't end inform!
    *******************************tuya_os_adapt_set_cpu_lp_mode,en = 1, mode = 0
    pmu_release_wakelock(PMU_OS)
    g_wifi_core.io_queue null
    bk_wlan_mcu_ps_mode_enable()
    *******************************tuya_os_adapt_set_cpu_lp_mode,en = 0, mode = 0
    g_wifi_core.io_queue null
    bk_wlan_mcu_ps_mode_disable()
    bk_ps_mode_disable
    [01-01 00:00:00 TUYA N][lr] key_addr: 0x1ee000 block_sz 4096
    [01-01 00:00:00 TUYA N][lr] get key:
    0x59 0x49 0xbe 0x6c 0x54 0xc0 0x92 0xc6 0xe2 0xf 0x9b 0x2b 0x1a 0x21 0x8f 0x77
    [01-01 00:00:00 TUYA N][lr] uni_random_init...
    [01-01 00:00:00 TUYA N][lr] tuya_tls_rand_init ok!
    [FUNC]iî[00]


    Added after 1 [hours]:

    >>21213153

    After seeing the log, it reminded me of a problem I had with a device I installed Tasmota on. I moved the 3.3v pin on my serial/usb connector from 3.3v to VCC, and it worked like a champ. Firmware went on like expected and I was able to see the AP. After connecting to it, I moved it to my wifi, and everything seems to be working great now!

    Thank you so much for your help!
  • ADVERTISEMENT
  • #4 21213341
    max4elektroda
    Level 20  
    Good to hear it's working now.

    Can you please explain the solution again?

    Usually you only connect three lines to the serial of your PC: GND, Rx, and Tx.
    So did you try to power the module from the USB adapter? The output is designed in most cases only to supply a low current, this will usually not work to power a module reliably.

    In other cases, I wouldn't connect the VCC line of the adapter at all.
  • ADVERTISEMENT
  • #5 21214062
    joerobinson
    Level 2  
    >>21213341

    I'm very new to this type of project, so I don't have many tools at my disposal. I used the USB cable to supply power.

    I have a usb to serial adapter that has the following pins:
    5v
    vcc
    3.3v
    Tx
    Rx
    GND

    If I connect 3.3v, Tx, Rx, and GND, I can talk to the device fine. It doesn't seem to work correctly, but it reads and writes without error. It does not require the CEN to be "tickled" to read or write. But like I said, in the end it doesn't seem to work.

    I moved the 3.3v to the VCC pin on my usb to serial adapter and everything worked fine, just like the other devices I've done.

    I think my takeaway is to learn what I need to properly power these instead of relying on the USB power from my PC. I've had 9 successful updates so far, but if I'm doing it incorrectly, I'm sure to have a failure coming up soon!
  • Helpful post
    #6 21214684
    max4elektroda
    Level 20  
    It's not about "doing something incorrectly", it's more about where are possible trapdoors if something goes wrong.
    If you flash a device, it's usually not consuming as much power as e.g especially during WiFi setup, at least as long as this functionality isn't started.
    And it depends on the USB adapter you are using, most of the very cheap ones just don't supply too much current.

    The question is, which voltage is on pin VCC? If it's more than 3.3V, this could damage the device.

    So to be on the safe side, I would propose to use a separate power supply for the module.

    On the other side, if it works for you, no need to change it, as long as you keep in mind that there might be an issue with the power supply if something is strange ...

Topic summary

The discussion revolves around configuring an OHLUX GU24 Smart Bulb running a CB2L chip with OpenBK firmware. The user successfully connected the bulb to a PC via a USB to Serial programmer and flashed the latest OpenBK version. However, the device failed to broadcast its SSID in AP mode. After reviewing the serial logs, the user discovered that the power supply from the USB adapter was insufficient. By switching the power connection from the 3.3V pin to the VCC pin on the USB adapter, the device began functioning correctly, allowing it to enter AP mode and connect to WiFi. The conversation highlights the importance of ensuring adequate power supply for reliable device operation.
Summary generated by the language model.
ADVERTISEMENT