[MacOS (Intel) Sonoma 14.2.1, Pi4 w Raspbian Bullseye & Home Assistant, LAN]
My ESP based powerboard, running Tasmota, stopped working today, so I purchased a new smart powerboard. However, the new powerboard is based on a BK7231T module (WB2S) rather than on an ESP chip.
Though I have some experience working with ESPs and ATTinys using the Arduino IDE, and have programmers to program them using FTDI, SPI, and via USB Bootloaders, I am unfamiliar with how to work with the BK7231 MCUs. Thus, I've been reading all kinds of material to figure out how to flash the MCU on the powerboard.
I have a reasonable understanding of this technology but I don't have any experience with the tool-chains and procedures specific to the BK7231 based MCUs. From what I have discovered so far, I have installed Mono for MacOS, cloned the BK7231GUIFlashTool repo and successfully built the Flash Tool. But when I tried to run the flash tool, it did not work (I raised an issue on the github repo).
I believe that `hid_download_py` is an alternative to the BK7231GUIFlashTool, but I'm puzzled by the comment in its repo that `hid` is disabled.
My understanding is that there is some information that needs to be extracted from the currently installed firmware in order to be able to use the OpenBeken framework. Is it therefore viable to use `hid_download_py`?
Any links to a useful guide that explains how to setup the tool-chain on a MacOS (Intel) would be useful.
Thanks in advance.
AI: Could you provide more details on what happened when you tried to run the BK7231GUIFlashTool? Were there any specific error messages or behaviors?
mono BK7231Flasher/bin/Debug/BK7231Flasher.exe
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all
=================================================================
Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Native stacktrace:
=================================================================
0x101621679 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_dump_native_crash_info
0x1015b940e - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_handle_native_crash
0x10161b7f6 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : altstack_handle_and_restore
0x7ff80f16c2c3 - /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight : SLDisplayBounds
0x104f3cba8 - Unknown
0x101eaa6d6 - Unknown
0x101516352 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_runtime_invoke
0x1017277e2 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_runtime_try_invoke
0x101726408 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_runtime_class_init_full
0x10150dd5c - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_compile_method_inner
0x1015118aa - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_compile_method_with_opt
0x1015bbf2e - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : common_call_trampoline
0x1015bb970 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_magic_trampoline
0x1019c1393 - Unknown
0x104f3c11b - Unknown
=================================================================
Telemetry Dumper:
=================================================================
Pkilling 0x123145369903104x from 0x140704418835328x
Entering thread summarizer pause from 0x140704418835328x
Finished thread summarizer pause from 0x140704418835328x.
Failed to create breadcrumb file (null)/crash_hash_0x860837baf
Waiting for dumping threads to resume
=================================================================
External Debugger Dump:
=================================================================
=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7ff80f16c2c3):0x7ff80f16c2b3 89 fb 48 8b 05 34 fa ef 3b 0f 10 00 0f 10 48 10 ..H..4..;.....H.
0x7ff80f16c2c3 0f 11 4f 10 0f 11 07 89 f7 48 89 de e8 f9 d4 f9 ..O......H......
0x7ff80f16c2d3 ff 48 89 d8 48 83 c4 08 5b 5d c3 55 48 89 e5 53 .H..H...[].UH..S
0x7ff80f16c2e3 48 83 ec 28 48 8b 05 32 11 ef 3b 48 8b 00 48 89 H..(H..2..;H..H.
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at System.Windows.Forms.XplatUICarbon:CGDisplayBounds <0x000b7>
at System.Windows.Forms.XplatUICarbon:get_WorkingArea <0x00072>
at System.Windows.Forms.XplatUICarbon:get_VirtualScreen <0x00043>
at System.Windows.Forms.XplatUI:get_VirtualScreen <0x00048>
at System.Windows.Forms.Screen:.cctor <0x0017a>
at System.Object:runtime_invoke_void <0x000a5>
at <unknown> <0xffffffff>
at System.Windows.Forms.Hwnd:GetNextStackedFormLocation <0x001aa>
at System.Windows.Forms.XplatUICarbon:CreateWindow <0x0046a>
at System.Windows.Forms.XplatUI:CreateWindow <0x00047>
at System.Windows.Forms.NativeWindow:CreateHandle <0x0006a>
at System.Windows.Forms.Control:CreateHandle <0x000b8>
at System.Windows.Forms.Form:CreateHandle <0x00052>
at System.Windows.Forms.Control:CreateControl <0x000c6>
at System.Windows.Forms.Control:SetVisibleCore <0x00112>
at System.Windows.Forms.Form:SetVisibleCore <0x00252>
at System.Windows.Forms.Control:set_Visible <0x00052>
at System.Windows.Forms.Control:set_Visible <0x000aa>
at System.Windows.Forms.Application:RunLoop <0x00422>
at System.Windows.Forms.Application:Run <0x00092>
at System.Windows.Forms.Application:Run <0x0007a>
at BK7231Flasher.Program:Main <0x0008a>
at System.Object:runtime_invoke_void <0x000a5>
=================================================================
Abort trap: 6
AI: Have you attempted to extract information from the current firmware on the BK7231T module? If so, what were the results?
I haven't been able to run the BK7231GUIFlashTool, therefore, no I was not able to do this.
My ESP based powerboard, running Tasmota, stopped working today, so I purchased a new smart powerboard. However, the new powerboard is based on a BK7231T module (WB2S) rather than on an ESP chip.
Though I have some experience working with ESPs and ATTinys using the Arduino IDE, and have programmers to program them using FTDI, SPI, and via USB Bootloaders, I am unfamiliar with how to work with the BK7231 MCUs. Thus, I've been reading all kinds of material to figure out how to flash the MCU on the powerboard.
I have a reasonable understanding of this technology but I don't have any experience with the tool-chains and procedures specific to the BK7231 based MCUs. From what I have discovered so far, I have installed Mono for MacOS, cloned the BK7231GUIFlashTool repo and successfully built the Flash Tool. But when I tried to run the flash tool, it did not work (I raised an issue on the github repo).
I believe that `hid_download_py` is an alternative to the BK7231GUIFlashTool, but I'm puzzled by the comment in its repo that `hid` is disabled.
My understanding is that there is some information that needs to be extracted from the currently installed firmware in order to be able to use the OpenBeken framework. Is it therefore viable to use `hid_download_py`?
Any links to a useful guide that explains how to setup the tool-chain on a MacOS (Intel) would be useful.
Thanks in advance.
AI: Could you provide more details on what happened when you tried to run the BK7231GUIFlashTool? Were there any specific error messages or behaviors?
mono BK7231Flasher/bin/Debug/BK7231Flasher.exe
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all
=================================================================
Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Native stacktrace:
=================================================================
0x101621679 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_dump_native_crash_info
0x1015b940e - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_handle_native_crash
0x10161b7f6 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : altstack_handle_and_restore
0x7ff80f16c2c3 - /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight : SLDisplayBounds
0x104f3cba8 - Unknown
0x101eaa6d6 - Unknown
0x101516352 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_runtime_invoke
0x1017277e2 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_runtime_try_invoke
0x101726408 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_runtime_class_init_full
0x10150dd5c - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_compile_method_inner
0x1015118aa - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_compile_method_with_opt
0x1015bbf2e - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : common_call_trampoline
0x1015bb970 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_magic_trampoline
0x1019c1393 - Unknown
0x104f3c11b - Unknown
=================================================================
Telemetry Dumper:
=================================================================
Pkilling 0x123145369903104x from 0x140704418835328x
Entering thread summarizer pause from 0x140704418835328x
Finished thread summarizer pause from 0x140704418835328x.
Failed to create breadcrumb file (null)/crash_hash_0x860837baf
Waiting for dumping threads to resume
=================================================================
External Debugger Dump:
=================================================================
=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7ff80f16c2c3):0x7ff80f16c2b3 89 fb 48 8b 05 34 fa ef 3b 0f 10 00 0f 10 48 10 ..H..4..;.....H.
0x7ff80f16c2c3 0f 11 4f 10 0f 11 07 89 f7 48 89 de e8 f9 d4 f9 ..O......H......
0x7ff80f16c2d3 ff 48 89 d8 48 83 c4 08 5b 5d c3 55 48 89 e5 53 .H..H...[].UH..S
0x7ff80f16c2e3 48 83 ec 28 48 8b 05 32 11 ef 3b 48 8b 00 48 89 H..(H..2..;H..H.
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at System.Windows.Forms.XplatUICarbon:CGDisplayBounds <0x000b7>
at System.Windows.Forms.XplatUICarbon:get_WorkingArea <0x00072>
at System.Windows.Forms.XplatUICarbon:get_VirtualScreen <0x00043>
at System.Windows.Forms.XplatUI:get_VirtualScreen <0x00048>
at System.Windows.Forms.Screen:.cctor <0x0017a>
at System.Object:runtime_invoke_void <0x000a5>
at <unknown> <0xffffffff>
at System.Windows.Forms.Hwnd:GetNextStackedFormLocation <0x001aa>
at System.Windows.Forms.XplatUICarbon:CreateWindow <0x0046a>
at System.Windows.Forms.XplatUI:CreateWindow <0x00047>
at System.Windows.Forms.NativeWindow:CreateHandle <0x0006a>
at System.Windows.Forms.Control:CreateHandle <0x000b8>
at System.Windows.Forms.Form:CreateHandle <0x00052>
at System.Windows.Forms.Control:CreateControl <0x000c6>
at System.Windows.Forms.Control:SetVisibleCore <0x00112>
at System.Windows.Forms.Form:SetVisibleCore <0x00252>
at System.Windows.Forms.Control:set_Visible <0x00052>
at System.Windows.Forms.Control:set_Visible <0x000aa>
at System.Windows.Forms.Application:RunLoop <0x00422>
at System.Windows.Forms.Application:Run <0x00092>
at System.Windows.Forms.Application:Run <0x0007a>
at BK7231Flasher.Program:Main <0x0008a>
at System.Object:runtime_invoke_void <0x000a5>
=================================================================
Abort trap: 6
AI: Have you attempted to extract information from the current firmware on the BK7231T module? If so, what were the results?
I haven't been able to run the BK7231GUIFlashTool, therefore, no I was not able to do this.