3 ms·
I'm surprised that the full command strings appear verbatim in the firmware --- and even more surprised that they appear with their "AT" prefix; this suggests t
by userbinator 8y ago
I'm surprised that the full command strings appear verbatim in the firmware --- and even more surprised that they appear with their "AT" prefix; this suggests they're being parsed by an algorithm that isn't particularly efficient, like a linear search. If something more optimised like a switch or trie were used, it wouldn't be possible to extract them this way, and some more intense reverse-engineering would be required.
- kevin_thibedeau 8y agoSequential search is near optimal for short lists. On embedded hardware you don't always have the luxury to create elaborate data structures for the "proper" solution.
- userbinator 8y agoThat makes it all the more surprising that they would include the "AT" prefix, which all the commands start with --- if I were implementing a command processor like this in a memory- and CPU-constrained environment, I'd match "AT" separately from the rest (differing) parts of the command.
- kevin_thibedeau 8y agoThey probably support other commands without a common prefix. It's not worth special casing a subset of the command set. It only burns a few dozen bytes.
- IshKebab 8y agoIt would be ridiculous over-engineering to use a trie here given the performance requirements.