The default SPI commands for the HC-12 are listed on the STM8 eFourth WIKI HERE.
Using both the API and the WDS software, I worked out what the commands represented, then applied the relevant settings to the WDS software so that it can output a radio configuration header file that can be used to program the radio.
Some things I noticed:
- The SPI commands don't quite match the sequence that would be used if the HC-12 had been configured using the WDS configuration file ( i.e. the WDS file groups certain commands into a sequence. The HC-12 firmware groups some, but then sends some commands individually, and not all the generated commands are applied - possibly because some configuration isn't actually required as the chip is just using the power on defaults for those settings)
- The radio is initially configured for 250kbps, then applies the specifics for the FU3 mode of 15kbps. (Seems a waste of code. If FU3 is default, then that should be the default setup)
- The current WDS ( version 3.2.11) isn't able to generate the exact same config. It appears that some settings have been either developed manually, or previous version of the software generated different code.
- The "Filter coefficients" are hard to interpret!!
I've decoded most of the commands. Still TODO is to work out the frequency and filter settings.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.