Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add some initialization configurations when refreshing firmware? #1178

Open
q127981 opened this issue Apr 12, 2024 · 0 comments
Open

Comments

@q127981
Copy link

q127981 commented Apr 12, 2024

Because I need to produce equipment in bulk, it would be inconvenient for me to refresh the firmware first and then perform additional configurations.

So I would like to add some custom configurations that can be updated and take effect every time the firmware is refreshed.
What methods can I use to achieve my goals?

The platform I am using is BL602.
I tried adding the following code to ”win_main.c”, then compiling the firmware and refreshing it to the device.But it didn't take effect.

    CMD_ExecuteCommand("SetPinRole 2 TglChanOnTgl", 0);
CMD_ExecuteCommand("SetPinRole 14 1", 0);
CMD_ExecuteCommand("SetPinRole 20 1", 0);
CMD_ExecuteCommand("SetPinRole 21 1", 0);

CMD_ExecuteCommand("SetStartValue 0 1", 0);
CMD_ExecuteCommand("SetStartValue 1 1", 0);

CMD_ExecuteCommand("SSID1 xxxxxxx", 0);
CMD_ExecuteCommand("Password1 12345678", 0);

    CMD_ExecuteCommand("MqttHost xxx.xxx.com", 0);

So, is it because I misplaced my code that the command did not take effect, or is it some other reason? Besides, can I write a script that executes every firmware refresh to achieve my goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant