-
Notifications
You must be signed in to change notification settings - Fork 229
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
Add support to Si1060 silicon labs MCU with Transceiver #62
Conversation
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This allows a GCS / or drone to actively identify if the SiK radio is capable of MAVLink 2.0.
This is a work-in-progress port to Si1060. So far, the modem only supports fixed airrate of 64 kbps with ECC and manchester encoding disabled, but within those contraints, it appears on-air compatible with Si443x version of the firmware. Some other features, like RSSI or temperature readout, are also missing.
Changes include adding support for all the air rates, frequency hopping and ECC. Also supported are both the 433 and 868 mhz bands, although only 433 was tested.
Add the link to new supported MLAB modem.
It appears the TX_FIFO_ALMOST_EMPTY flag in PH_STATUS register is an unreliable indicator of being able to insert more bytes into the fifo. Relying on the space returned by the FIFO_INFO command instead fixes fifo underflow/overflow errors previously observed while transmitting long packets.
Initializing at_mode_active at the variable declaration did not have the effect. Strange.
where do I get a radio with a Si1060 for testing? |
Fix issue ArduPilot#65
Enhance AT commands table layout.
I had some build errors which I fixed here: |
if I build with sdcc 3.1.0 then it runs fine, but the radio_446x code doesn't build |
Hi @tridge, I am the original author of the changes to support Si1060 that are included with this PR. As I don't see this mentioned, please note that the PR also includes changes pulled from LorenzMeier's repo which are related to MAVLink 2.0 heartbeats. There's a branch with Si1060 support kept without other changes here. Regarding the build errors, this is how I have been building the firmware to get it to compile under sdcc 4.0:
I haven't communicated this fact to @kaklik, so that may have caused some confusion. Nonetheless with your fixes you should have gotten the same firmware as we have been using. Regarding the 80 % packet loss, that comes as a surprise to me. Please let me know how you are testing this and we will try to replicate. |
@povik ok, we're better off using pragmas to disable those warnings.
I've been using two Holybro SiK radios (Si1000 based). Connected to ardupilot with mavproxy over the radios and looked at packet loss levels. Are you on the ArduPilot discord SiK channel? Holybro is also looking at the SiK1060 and I'd like to make sure schematic choices (eg. crystal) match what you've done so we can use a common fw |
Hi @tridge! Have you some control over Holybro production eg. schematics etc.? I am curious about that, because I do not see any open-source hardware from Holybro until now. In 2018 I requested at least schematics from theirs Pixhawk 4, but the sales department replied to me with a foggy and irrelevant reply "Sorry, Sir I can't provide the full schematics. But I think you can find it on PX4 website..." Therefore I am restrained to help Holybro with hardware design without symmetric behavior from their side. |
a lot of their schematics are open, including Pixhawk4: |
I've done some more testing with tools/mavtester.py like this: these are my parameters for reference:
|
Thanks. Obtaining the same result with mavtester should be easy for me to do.
The behavior is strange. There shouldn’t be any changes to framing apart from minuscule timing changes introduced by compiler.
An idea I had is that the MAVLink reporting changes interfere with testing by injecting packets where they are not expected. Of course that does not fit with the PR firmware performing fine when talking to itself.
…On Thu, Jun 10, 2021 at 01:41, Andrew Tridgell ***@***.***> wrote:
I've done some more testing with tools/mavtester.py like this:
tools/mavtester.py --port1 /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_D308L5W6-if00-port0 --port2 /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_DN04SBQY-if00-port0 --rate 10
I've found that if I put your fw on both radios (holybro hm-trp radios) then it performs fine, but if one radio has current release firmware and one has firmware from this PR then it gets 90% packet loss.
So we need to find what has changed to make it lose packets versus current firmware. Maybe a framing change?
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#62 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAC5JUA2D35XSLRDEJN5KDLTR7323ANCNFSM4SWSTGHQ).
|
@povik the problem turns out to the the shuffing of the channels in freq_hopping.c. If I set it up with 2 channels then I get no packet loss. |
The problem was rand(). I've fixed it here: |
looks like what is missing is tools/build_si446x_table.py |
@tridge Sorry, that one slipped through. Here you go: ThunderFly-aerospace@42df857 As I seem to remember there's no project file to speak of on part of the Silabs' software, but I found the original exported headers. Note that I now think I probably set the channel filters too wide in those. |
Thanks! A few striking things:
For the packet loss I'm testing with tools/mavtester.py. Have you tried mavtester with your 433 or 868 radios? Do you get zero packet loss at short range? Note the branch I'm using is this one: https://github.com/ArduPilot/SiK/tree/Si1060 |
the problem seems to be more with packet receive than with send. Packet send seems quite reliable. That makes me think perhaps a problem with the preamble detection? |
I don’t have the time right now to run the tests, but Friday I can reserve some time for this.
Have you ruled out the issue to be related to frequency hopping? Do you see it with one channel settings?
…On Tue, Jul 13, 2021 at 10:07, Andrew Tridgell ***@***.***> wrote:
the problem seems to be more with packet receive than with send. Packet send seems quite reliable. That makes me think perhaps a problem with the preamble detection?
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#62 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAC5JUGT2H4FVL7F2HSQKMDTXPX5TANCNFSM4SWSTGHQ).
|
yes, I've ruled that out. Note especially that there is no problem with the Si1060 branch run on a Si1000 radio, so we know that the issue must be in the Si1060 specific part of the code. |
Right, I just remember that the channel changing on Si1060 during receival is a bit tricky and I could picture it breaking when on an untested band. Anyway I will get back to you on Friday with mavtester results. (It will be with 433 radios.)
…On Wed, Jul 14, 2021 at 23:16, Andrew Tridgell ***@***.***> wrote:
> Have you ruled out the issue to be related to frequency hopping? Do you see it with one channel settings?
yes, I've ruled that out. Note especially that there is no problem with the Si1060 branch run on a Si1000 radio, so we know that the issue must be in the Si1060 specific part of the code.
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#62 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAC5JUHDFRI4UYY76O3JAFTTXX5ERANCNFSM4SWSTGHQ).
|
thanks! |
So yes, mavtester does report non-zero packet loss between two 433 Si1060 radios. (Settings were default, firmware I tried both your branch and thunderfly/si1060-wip.)
|
@povik have you compared the receive sensitivity of your 1060 radios to an equivalent Si1000 radio such as the Holybro SiK radio? I've gotten the packet loss down a bit, but the receiver sensitivity is still awful. It is about 35dB lower than an equivalent Si1000 radio.
|
@povik I worked out the issue, the holybro radio uses different GPIO_0/GPIO_1 settings for the RF switch. I've also work out what causes most of the packet loss and have fixed that. Updated version in |
I have merged Si1060 support to master based on my branch. Many thanks for your contribution! |
The support of the new chip brings some new features and reduce external components count.
Additional benefits are described in Silabs AN811