Reports with release 2014 R2-Beta1

@ Simon from Vilnius - All very good suggestions, thanks. The documentation copy error is fixed. For RTC, they all definitely should be methods. It was one of the first classes I rewrote and the framework guidelines definitely weren’t that ingrained yet. It’s now GetDateTime() and SetDateTime(System.DateTime) and the same for alarm. For watchdog: The units are now indicated. The timeout checking was fixed to allow it to be less than or equal to MaxTimeout. ResetCounter now silently returns and Enable(timeout) and Disable were added. I’ll also add the max timeouts to our online documentation. I will also link to the documents on our site from the comments for each of the core classes. As for the problem with FEZ Config, I wasn’t able to reproduce it on my computer, but we’ll keep looking into it.

Wow, that was… quick! Sweet, thanks. :slight_smile:

How about daily builds for Insider :whistle:

@ John: Sounds great that you are so on-top of Simon’s suggestions. I will wait until a new release is made to test the RTC changes - when might that be?

Also, do you plan to have the RTC alarm function working so the RTC can wake a sleeping processor in the near future?

@ rockybooth - We would like to get a new release out every weeks, but it all depends on the rate things get finished. We would still like to get the RTC alarm implemented, but we can’t really say when it’ll happen.

@ John:
I downloaded the latest to retry my networking test. In my code I needed to change references such as
Dim netif = ethernetENC28.Interface
to
Dim netif = ethernetENC28.NetworkInterface

I assume this is correct.

When I try to compile I get errors as follows - and the same after trying to “Repair” the installation. If these versions are incorrect, please let me know what they should be.
:

[quote]Found debugger!

Create TS.

Loading start at 202cf12c, end 202fe5c0

Assembly: mscorlib (4.3.1.0) Assembly: Microsoft.SPOT.Native (4.3.1.0) Assembly: Microsoft.SPOT.Security.PKCS11 (4.3
.1.0) Assembly: System.Security (4.3.1.0) Assembly: Microsoft.SPOT.Hardware (4.3.1.0)
Assembly: Microsoft.SPOT.Graphics (4.3.1.0) Assembly: Microsoft.SPOT.TinyCore (4.3.1.0)
Assembly: Microsoft.SPOT.IO (4.3.1.0) Assembly: System.IO (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0) Assembly: Microsoft.SPOT.Touch (4.3.1.0)
Assembly: Microsoft.SPOT.Ink (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)
Loading Deployment Assemblies.

Attaching deployed file.

Assembly: Microsoft.VisualBasic (1.0.0.0) Attaching deployed file.

Assembly: Gadgeteer (2.43.1.0) Attaching deployed file.

Assembly: GHI.Hardware (4.3.1.0) ***********************************************************************

  •                                                                 *
    
  • ERROR!!! Firmware version does not match managed code version!!! *

  •                                                                 *
    
  •                                                                 *
    
  • Invalid native checksum: GHI.Hardware 0xE97518F6!=0x1C06EABB *

  •                                                                 *
    

Resolving.

Link failure: some assembly references cannot be resolved!!

Assembly: Gadgeteer (2.43.1.0) needs assembly ‘Microsoft.SPOT.Net’ (4.3.1.0)

Error: a3000000

Waiting for debug commands…

[/quote]

[/quote]
Your firmware update doesn’t appear to have worked. Check with FezConfig and confirm that you have the same versions of firmware and bootloader as the release notes state you should

Bug or Missing Feature?

I have no driver for the Bluetooth module. The driver is availabe on codeplex but not in the installation package.

@ Brett - thanks, I had forgot that step.

@ John, @ Dat: - I have not done extensive testing, but the DHCP issue seems resolved, at least in my case. :clap:

Hi,
it’s seems that there’s a typo in the motor driver L298.

You can see this in SetSpeed :


whereas it should be :

```cs]_pwms[(int)motor].Set(Frequency, (speed < 0.0) ? 1 + speed : speed);[/code


(note the + sign instead -)
Why ? Because when I want a speed of -1, I don't want a duty cycle of +2  (1 - (-1) = 2) ;)

Another one in PulseCount :
Current :

 readBuffer)
{
	if (readBuffer != null)
	{
		_spi.Write(writeBuffer);
	}
	else
	{
		_spi.WriteRead(writeBuffer, readBuffer);
	}
}

Expected :

 readBuffer)
{
	if (readBuffer == null)
	{
		_spi.Write(writeBuffer);
	}
	else
	{
		_spi.WriteRead(writeBuffer, readBuffer);
	}
}

And additionally, it may be usefull to declare an output :


You suggested me because I had problems with my Raptor board (cf. https://www.ghielectronics.com/community/forum/topic?id=14629 )

I wish to upgrade from V4.2.11.2 to V4.3 2014 R2-Beta2 on FEZ Raptor. Is the G400/Hydra Loader Updater an additional item? I have run Update.bat and have a runtime error from Microsoft Visual C++ Runtime Library “abnormal program termination”.

Hi,

What happened to SystemUpdate.CanUpdate?

Can’t find any similar fields or info in the new InFieldUpdate Class?

In addition, the documentation is limited in information. Used to much more detailed docs wit some code samples. Example: Watchdog.TimeoutPeriod Property does not state even if it is ms, system ticks what? I presume it is ms but should be stated in the documentation.

-T

I had this issue before when moved from 4.2 to 4.3.
I did uninstall samba, reset PC then reinstall again, it worked.
Hope this help!

@ Dat Thank you Dat. Worked 100%. Perhaps something to do with the current use of the registry? When I installed V4.2.11.2 8 days ago I had many difficulties. This was due to a faulty USB plug. However V4.3.1.0 was easy.

I am unable to add a displayT43 to a blank gadgeteer project in VB. I have no problem adding a DisplayTE35 to a blank gadgeteer project.
The error shown when adding a displayT43 is:

[quote]C:\Users\CharlesRocky\AppData\Local\Temporary Projects\GadgeteerApp1\Program.generated.vb(41) : error BC30456: ‘ProgramStarted’ is not a member of ‘GadgeteerApp1.GadgeteerApp1.Program’.
C:\Users\CharlesRocky\AppData\Local\Temporary Projects\GadgeteerApp1\Program.generated.vb(47) : error BC30002: Type ‘GTM.GHIElectronics.DisplayT43’ is not defined.
[/quote]

I have included a screen grab of the References below

Could someone verify that they can add a T43 display to a blank Gadgeteer project with 4.3 beta 2?

@ rockybooth - I can add but the it wont compile. Assembly T43 holds the code for TE35 and not for T43… An issue for @ GHI

I’m assuming this is the place to report on R2B2 as well.

I just updated my W8.1 from SDK R2B1 to R2B2. Updated my raptor to tinybooter 4.3.1.0 and firmware as well, went all fine so, so far so good.

Now it comes, when just drawing the raptor in the designer, I looked for the Temperature&Humidity sensor … could NOT find it … any suggestions ?

Adding the RS21 went ok … need to test some easy code though … TBC …

Now adding InginuityMicro.BluetoothSmart resulted in a little error, I guess though I need to contact the vendor … right ?

Executing the following code (did work on 4.2):

does result in a pingable rs21, so it does connect but when doing the webserver stuff that results in some unexpected behavior.


using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Presentation.Shapes;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace AsYouAre43
{
    public partial class Program
    {
        
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            GT.Timer tmr = new GT.Timer(1000);
            tmr.Tick += tmr_Tick;
            tmr.Start();

            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
        }

        void tmr_Tick(GT.Timer timer)
        {
            timer.Stop();

            wifiRS21.NetworkDown += wifiRS21_NetworkDown;
            wifiRS21.NetworkUp += wifiRS21_NetworkUp;

            GHI.Networking.WiFiRS9110.NetworkParameters[] ni = null;

            string[] dns = { "192.168.39.123" };
            wifiRS21.UseStaticIP("192.168.39.201", "255.255.255.0", "192.168.39.123", dns);

            ni = wifiRS21.NetworkInterface.Scan(xxx);
            int tryagain = 5;
            while ((ni == null) && (tryagain > 0))
            {
                // 
                Debug.Print("Please wait, trying to find xxx..." + tryagain);

                // Wait for while to let the network fire up
                Thread.Sleep(1000);

                // for a limited number of re-tries
                tryagain -= 1;
            }

            if (ni != null)
            {
                wifiRS21.NetworkInterface.Join(xxx, yyy);
                Debug.Print("Network xxx joined");

                // ???
                Debug.Print("  MAC Address..: " + GetMACAddress(ni[0].PhysicalAddress));
                Debug.Print("  DHCP.........: " + wifiRS21.NetworkSettings.IsDhcpEnabled);
                Debug.Print("  IP Address...: " + wifiRS21.NetworkSettings.IPAddress.ToString());
                Debug.Print("  Network Mask.: " + wifiRS21.NetworkSettings.SubnetMask.ToString());
                Debug.Print("  Gateway......: " + wifiRS21.NetworkSettings.GatewayAddress.ToString());
                Debug.Print("  DNS..........: " + wifiRS21.NetworkSettings.DnsAddresses[0].ToString());

                // after joining a network raise an event or so to get/set the as you are stuff 
                // TO DO, some web stuff
                WebServer.StopLocalServer();

                Thread.Sleep(1000);

                WebServer.StartLocalServer(wifiRS21.NetworkSettings.IPAddress, 80);

                var webEvent = WebServer.SetupWebEvent("test/");
                webEvent.WebEventReceived += webEvent_WebEventReceived;

                WebServer.DefaultEvent.WebEventReceived += DefaultEvent_WebEventReceived;
            }
            else
            {
                Debug.Print("xxx not found, no network connection made!");
            }
        }

        void wifiRS21_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state)
        {
            if (state == GT.Modules.Module.NetworkModule.NetworkState.Down)
                Debug.Print("Network Up event; state = Down");
            else
                Debug.Print("Network Up event; state = Up");
        }

        void wifiRS21_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state)
        {
            if (state == GT.Modules.Module.NetworkModule.NetworkState.Up)
                Debug.Print("Network Up event; state = Up");
            else
                Debug.Print("Network Up event; state = Down");
        }

        void DefaultEvent_WebEventReceived(string path, WebServer.HttpMethod method, Responder responder)
        {
            //
            switch (method)
            {
                case WebServer.HttpMethod.DELETE:
                    responder.Respond("Hello world, default handler for DELETE method");
                    break;
                case WebServer.HttpMethod.GET:
                    Debug.Print("URL: " + responder.Path);
                    Debug.Print("Remote request from: " + responder.ClientEndpoint);
                    Debug.Print("User agent: " + responder.GetHeaderField("UserAgent"));
                    Debug.Print("User host address: " + responder.GetHeaderField("UserHostAddress"));
                    Debug.Print("User host name: " + responder.GetHeaderField("UserHostName"));
                    responder.Respond("Hello world, default handler for GET method");
                    break;
                case WebServer.HttpMethod.POST:
                    responder.Respond("Hello world, default handler for POST method");
                    break;
                case WebServer.HttpMethod.PUT:
                    responder.Respond("Hello world, default handler for PUT method");
                    break;
                default:
                    responder.Respond("Hello world, default handler for UNKNOWN method");
                    break;
            }
        }

        static void webEvent_WebEventReceived(string path, WebServer.HttpMethod method, Responder responder)
        {
            //
            switch (method)
            {
                case WebServer.HttpMethod.DELETE:
                    responder.Respond("Hello World, specific handler for DELETE method");
                    break;
                case WebServer.HttpMethod.GET:
                    Debug.Print("URL: " + responder.Path);
                    Debug.Print("Remote request from: " + responder.ClientEndpoint);
                    Debug.Print("Headers: " + new String(System.Text.Encoding.UTF8.GetChars(responder.HeaderData)));

                    responder.Respond("Hello World, specific handler for GET method");
                    break;
                case WebServer.HttpMethod.POST:
                    responder.Respond("Hello World, specific handler for POST method");
                    break;
                case WebServer.HttpMethod.PUT:
                    responder.Respond("Hello World, specific handler for PUT method");
                    break;
                default:
                    responder.Respond("Hello World, specific handler for UNKNOWN method");
                    break;
            }
        }

        // borrowed from GHI's documentation
        string GetMACAddress(byte[] PhysicalAddress)
        {
            return ByteToHex(PhysicalAddress[0]) + "-"
                                + ByteToHex(PhysicalAddress[1]) + "-"
                                + ByteToHex(PhysicalAddress[2]) + "-"
                                + ByteToHex(PhysicalAddress[3]) + "-"
                                + ByteToHex(PhysicalAddress[4]) + "-"
                                + ByteToHex(PhysicalAddress[5]);
        }

        string ByteToHex(byte number)
        {
            string hex = "0123456789ABCDEF";
            return new string(new char[] { hex[(number & 0xF0) >> 4], hex[number & 0x0F] });
        }
    }
}

please replace the xxx and yyy with your required SSID and passphrase values.

Any ideas would be grant !!

@ maverick78 - Thanks for those issues, they’ve been fixed.

@ T_Langholen - The CanUpdate functionality is now handled internally. If the methods do not throw, they succeeded. There will be more thorough documentation added as time goes on.

@ rockybooth - The DisplayT43 module has its class named as DisplayTE35 by mistake. That has been fixed.

@ PiWi - There is an issue with the GadgeteerHardware file for the Temp&Humidity module not escaping the & in its name properly so it won’t show up in the designer. In C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\TempHumidity\GadgeteerHardware.xml, replace <ModuleDefinition Name=“Temp&Humidity” with <ModuleDefinition Name=“Temp & Humidity” on line 5 to work around it for now. We will let you know when we have more information on the WiFi issue.