G400 Beta kit looses firmware... Again and again?

Any news on this bug?

@ Simon from Vilnius -

We just found out that after change any configuration for 12 times, then we can not access G400 any more unless re-flash g400, this bug is same with G120 (but 165 time on G120).

It is fixed but I am not sure you are in this case or not.

Well, the only way to find out is to try a fixed firmware! Is there an updated SDK planned anytime soon? I guess it is, together with official G400 release in september…

@ Dat - I wonder what was wrong with changing configuration that required to reflash?

P.S Nice avatar by the way :wink:

Can you please post a simple code then we can test it quickly?

related to this: https://www.ghielectronics.com/community/forum/topic?id=12619

@ Dat - Ouch! Thanks!

@ andre.m -

Hello,
I just sent you an email,
Please let us know if you see it because I am not sure I sent to correct email or not :)))

@ andre.m -

Yes, I got and tried it!

I saw the problem.
I don’t think the firmware is lost in this case. This is a bug related to thread and debugging.


void main()
{
    while(true)
    {
     }
}

When we deploy that code above for first time, then we will be very hard to deploy for the next time with VS.


void main()
{
    while(true)
    {
          Thread.sleep(10);
     }
}

If we add a sleep in there, it is always successful for deploying again. It looks like a thread is taking 99.9% CPU so it is very hard to deploy again by VS, even hard to call Ping, but the firmware is still there.

Edit:

Try to add a flag at begin of main, if press button then execute the rest code, otherwise, stay in a loop with a sleep.

Then you can see that it is only hard to deploy again when it is executing your code. And yes, it can be happened with any device, not only G400.

@ andre.m -


void SetSettings()
        {
            NetworkInterface nif = null;

            if (activeInterface.GetType() == typeof(EthernetBuiltIn))
                nif = eth0.NetworkInterface;
            else if (activeInterface.GetType() == typeof(EthernetENC28J60))
                nif = eth1.NetworkInterface;
            else
                throw new NotImplementedException();

            if (!IsDynamicDnsEnabled)
                nif.EnableStaticDns(new string[] { PrimaryDnsServer, AlternateDnsServer });
            else
                nif.EnableDynamicDns();

            if (IsDhcpEnabled)
            {
                if (nif.IsDhcpEnabled)
                {
                    nif.ReleaseDhcpLease();
                    nif.RenewDhcpLease();
                }
                else
                    nif.EnableDhcp();
            }
            else
                nif.EnableStaticIP(IPv4Address, IPv4SubnetMask, IPv4Gateway);
        }

I found out them in our code

Those code changed the configuration for every time we did Reset and it may cause Abort screen on G400, I think.

If we are right, you can try to reflash the firmware, try to reset, it will show abort screen within 13 times.

@ andre.m -

I didn’t see it in your code. I just tried to explain the problem when we get hard to deploy by VS. It can be some function do like that in their native code.

@ andre.m -

Yes, I think

@ andre.m - [quote]so 13 times reset [/quote]

:))

Let us not make hard assumptions as things change to what fits best. The coming SDK (shortly) covers some very important fixes. Once it is out, we can concentrate on what is next.

Yes, it is fixed. I tried the old firmware which you are using, the abort screen will be shown after 7 times reset. It is not random or sometime, it is 100%.

Reboot in TinyBooter by holding LDR1, then click on Erase button in MFDeploy to erase the current C# application, after that everything will be fine. :))) We will think about this later after SDK is out