FEZ Config Tool

Hi,

Been trying to set the IP of my EMX board, using the alpha (V001) and now beta (V011) tools.

Is there any way to STOP the loaded application from running whilst running your deploy tool ???.

It would appear that there is some ‘interaction’ between an app which is trying to run when the config tool is used.

The failures I have are that I cannot set the static IP address (or subnet or gateway). The tool says it is done, but if I disconnect, reload the tool and read the settings - it is back to ‘0,0,0,0’ again.

The tool constantly says the board is not connected, but then says the requested action has been performed :-((.

I further ‘suspect’ that the situation is made worse if the ethernet cable is unplugged.when trying to set the IP address.

I have reported in the past my suspicions regarding the config settings - and that they can be affected by the code. When I previously set my code to use a fixed IP (//ethernet.NetworkInterface.EnableStaticIP(“192.168.1.111”, “255.255.255.0”, “192.168.1.1”):wink: this appeared to corrupt the config settings.

The above issues combine to make it very difficult to actually set up the network settings for the board.

Combine this with the previously reported DHCP shortcomings and life becomes very difficult indeed. NB The DHCP issue reported earlier has now ‘gone away’ after replacing my router. This simply shows that different routers behave differently - and NOT that the previous router was faulty :-O.

Hope this feedback helps - and that someone can advise how to halt a running app whilst running the config tool ??.

Many Thanks

Graham

HAH - luckily I copied this message before trying to send it - as I was yet again logged out by the system :-((.

@ GrahamS -

What firmware version are running on your EMX?

EMX should work fine on v011. But v013 is coming and hope it will be better.

Is there any C# application running on your EMX? Maybe after you reset the board, that application reset network config?

regards stopping running/loaded application - in either MFDEPLOY or FEZ Config - “Erase” :

with MFDEPLOY “Erase” is on start-up screen next to "Ping"
in FEZ Config (0.1.1.) Find “Erase Application” button under “Deployment (Advanced)” Tab

@ Dat - Glad to hear that v013 is on its way!! Does v013 brings back the possibility to update the boot loader again?

Guys,
Thanks for the feedback - will address each one in order :

Dat:

yes indeed there is an application running and that is where I believe the conflict lies :-)).
Version info :
Ping… TinyCLR
HalSystemInfo.halVersion :4.2.0.0
HalSystemInfo.halVendorInfo :Microsoft Copyright © Microsoft Corporation. All rig
ClrInfo.clrVersion :4.2.0.0
ClrInfo.clrVendorInfo :Microsoft Copyright © Microsoft Corporation. All rig
ClrInfo.targetFrameworkVersion :4.2.0.0
SolutionReleaseInfo.solutionVersion: 4.2.10.1
SolutionReleaseInfo.solutionVendorInfo: Copyright © GHI Electronics, LLC
SoftwareVersion.BuildDate: May 1 2013
SoftwareVersion.CompilerVersion: 410713
LCD.Width: 320
LCD.Height: 240
LCD.BitsPerPixel: 16

Your final statement hits the nail right on the head. The running app really should NOT be able to change the base config settings :-O. This is a real problem because if a bug exists (for example) the stored config can be changed. Then any amount of reboots will never fix the problem without someone resetting the config.

In my opinion the ‘CONFIG FILE’ should be sacrosanct and the APP CODE should never be able to change it :-O. Thats the whole point of having a config app surely ???. If the app needs to be able to ‘change’ the config - then surely thats up to the App code ??.

Well - lets see what v0.13 brings :-O.

Jeff:

Surely the whole point of a ‘config tool’ is to allow the unit to be ‘configured’ and not completely erased :-O. I need to be able to set up a network config in the field, but really don’t then want to have to reprogram the whole app - or I might just as well hard-code the config in the app anyway :-O.
Example: default config requires DHCP, but when the box is installed into a client site with NO DHCP server - we need to be able to set a static IP to match the local network. We should be able to set this and NOT have to reprogram the whole app :-((.

After having so much trouble using the config tool - my client suggested I revert to using an ini file stored in the SD_Card. I really shouldn’t have to do that ;-)).

I think we just need the ability to STOP the C# app whilst we are using the config tool…

Thanks again for the feedback though…

Graham

@ GrahamS - Ahhh, I misunderstood the semantics of your question and what you were looking for. My suggestion is indeed a “brute force” method. Dat is much more qualified to evaluate and comment on the type of behavior you are looking for.

Jeff,

No problem ;-)). Lets hope that Dat can resolve the issues…

Graham

@ GrahamS -

The C# application won’t reset any NetworkConfig unless you call it.
Let me see your C# code first.

Dat,

OK then - here is the strt of my code for the ethernet interface :


        public static bool Init()
        {
            bool resp = false;
            try
            {
                ethernet.NetworkAddressChanged += ethernet_NetworkAddressChanged;
                ethernet.CableConnectivityChanged += ethernet_CableConnectivityChanged;

                ethernet.Open();
                Utils.ToDebug("Ethernet Opened:");
                NetworkInterfaceExtension.AssignNetworkingStackTo(ethernet);

                if (ethernet.NetworkInterface.IsDhcpEnabled)
                {
                    Utils.ToDebug("IsDhcpEnabled: true");
                    ethernet.NetworkInterface.EnableDhcp();
                }
                else
                {
                    Utils.ToDebug("IsDhcpEnabled: false");
                    //ethernet.NetworkInterface.EnableStaticIP("192.168.1.111", "255.255.255.0", "192.168.1.1");
                    Utils.ToDebug("IP:" + ethernet.NetworkInterface.IPAddress .ToString());
                    Utils.ToDebug("SN:" + ethernet.NetworkInterface.SubnetMask.ToString());
                    Utils.ToDebug("GW:" + ethernet.NetworkInterface.GatewayAddress.ToString());

//                    ethernet.NetworkInterface.EnableStaticIP(ethernet.NetworkInterface.IPAddress,
//                                                            ethernet.NetworkInterface.SubnetMask,
//                                                            ethernet.NetworkInterface.GatewayAddress);
                }
                //ethernet.NetworkInterface.EnableDynamicDns();


                while (ethernet.NetworkInterface.IPAddress == "0.0.0.0")
                {
                    Utils.ToDebug("Waiting for DHCP:");
                    Thread.Sleep(2000);
                }

                //                network_is_read = true;
                Utils.ToDebug("Network settings:");
                Utils.ToDebug("MAC Address: " + Utils.ToHexString(ethernet.NetworkInterface.PhysicalAddress, 0, ethernet.NetworkInterface.PhysicalAddress.Length));
                Utils.ToDebug("IP Address: " + ethernet.NetworkInterface.IPAddress);
                Utils.ToDebug("Subnet Mask: " + ethernet.NetworkInterface.SubnetMask);
                Utils.ToDebug("Default Gateway: " + ethernet.NetworkInterface.GatewayAddress);
                if (ethernet.NetworkInterface.DnsAddresses.Length > 0)
                {
                    foreach (string dns in ethernet.NetworkInterface.DnsAddresses)
                    {
                        Utils.ToDebug("DNS Server: " + dns);
                    }
                }
                if (ethernet.NetworkInterface.IPAddress == "0.0.0.0")
                    return false;
...


@ GrahamS -
I have tried your code and everything is working fine.

Disconnect ethernet cable: of course they are 0.0.0.0…
After I connected ethernet cable, they are correct 100.100.100.102

Although I tried on Fez tool 013 but I don’t think that is problem.

Dat,

Yes - the tool works !! - sometimes, but you need to run the tool with the app also running, and then try with no ethernet connected - to see the problems.

The tool reboots the box, which restarts the app.

I honestly believe that it is some interaction between the app and your tool. Thats why I asked why can the tool not prevent the app from running, whilst it is talking to the box ??.

Regards

Graham