Fix rssi timeout - #95
Closed
kaklik wants to merge 53 commits into
Closed
Conversation
Fixes: 09d7993 ("fixed power level mappings on Si1060 radios")
Add missing control pin definitions for ISM01A and missing pin initialization for both ISM01A and HB1060.
On ISM01A unconditionally enable the antenna diversity circuit. It should then automatically pick the better antenna (out of two options) for reception of each packet. In addition, use the signal strength evaluation obtained at packet reception to switch antennas for transmission. (This latter behavior is implemented solely in software.)
Add a new TFSIK01A board similar to ISM01A but differing in some of the wiring.
Change the trigger for building of release binaries from 'published' to 'created'. Hopefully this means binaries will be built for drafted releases also, before releases are published.
This reverts commit 888d0bb. The 'created' trigger is not what we are looking for.
Add link to the TFSIK modem.
See if this makes more information show up in the version string.
Add GitHub actions badge Repair links Add example of parameter readout
Add an example of a parameter set.
Enable Antenna selection from AT commands.
Example of antenna RF switch.
Improve doc string for antenna diversity setup.
Explain ATO command.
Sync with upstream
Update versions of GitHub actions scripts.
Add a description of how the SiK firmware works.
Cleanup and update links.
* Modify base crystal frequency. * Add Silicon Labs Wireless Development Suite configuration file. * Normalize EOL to LF Regenerate 868 MHz configuration with newly installed WDS. * Remove unecessary payload configuration data. * Regenerate 868MHz RF config parameters for 26 MHz crystal. * Regenerate RF configurations for 433 MHz with 26 MHz crystal. * Regenerate RF configurations for 915 MHz and 26 MHz crystal. * fix wrong crystal frequency in power-up command. * Renaming datafolder to allow different crystal frequency configurations. * Restore 30MHz Si1060 configuration headers * Add TFSIK01 crystal-specific build targets * Ensure radio config header builds for all boards * Update copyright strings. * Isolate Si446x radio configuration per board
Remove python2 installation.
…-functionality-and-documentation Add CW AT test mode for RF testing
Improve documentation.
`.gitattributes` declares all `*.c`/`*.h` files as LF, but several files in Firmware/radio/AES/, Firmware/include/Si1020_defs.h and data/WDS_si1060_project_file.xml were still committed with CRLF. `git add --renormalize .` converts them in the index. No source changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SDCC 4.5.0 (Debian trixie) enforces stricter C99 and refuses the pre-prototype K&R form `foo()` as well as enum constants outside the range of `int`. Two kinds of fix: - Add `(void)` to zero-argument functions that were declared with empty parentheses, in both the definition and the header prototype (check_code.py checks they match). Covers `at_parse_number`, `calibration_lock/get/force_get`, `param_get_encryption_key`, `print_encryption_key`, `pins_user_check`, `encrypt_buffer_getting_full/empty`, `encrypt_buffer_write_space`, `radio_set_output_clock_freq`, `radio_get_oscillator_capacitance`, `flash_transfer_calibration`, `reply_open`, `reply_close`, `wait_for_cts`, `aes_get_encryption_level`. - Drop the unused `PIN_MIRROR_NULL=0xFFFFFFFF` member of `enum pin_state` in `pins_user.h`; with the stricter checks the value no longer fits a signed `int` without C23. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix intermittent timeout and doubled echo in
rssi.pyProblem
Firmware/tools/rssi.pywould occasionally fail ontimeoutat startup, while a subsequent run would succeed.Root cause
The
+++sequence switches the modem into command mode, which makes it printOK. The firstexpect(['OK', 'SiK .*'])matched thatOK— not the response toATI. This shifted the whole flow by oneresponse:
AT&Fwas sent while the modem was still emitting the banner, arrived corrupted (&F), and the modem never repliedOK→ timeout. Re-running masked the bug because the modem was already in a clean state.Fix
+++(flush()), discarding theOKfrom+++and any line noise.SiK .*banner instead ofOK, which guarantees thatATIactually completed.AT&F, so the command isn't received corrupted.Verification
Tested against a real modem (
/dev/ttyUSB0, TFSIK01 30MHz, 57600 Bd). The output is now clean and reliably repeatable:Putting /dev/ttyUSB0 into rssi test mode
+++
ATI
SiK tf250927-2-4-g7a56934 on TFSIK01 30MHz
AT&F
OK
AT&T=RSSI
L/R RSSI: 118/110 L/R noise: 72/51 pkts: 4424 txe=0 rxe=2 stx=0 srx=0 ecc=0/0 temp=0 dco=0
...