Porting to 4.3 help -

Hello!,

I have a spider program which was running ok on 4.2.
then I decided to try to use glide and found I had to go to 4.3.

I did that but now have a lot of errors. I didn’t realize it would be such a change.

I was able to fix several of the errors, but wondering if there is some useful info about going
to 4.3. What I looked at so far is not helping me.

for example, I have a usbSerial module connected to the spider.
It seems it is now USBSerial (with caps), but none of the old functions are there now.

I have code that does things like usbSerial.SerialLine.Open();
usbSerial.SerialLine.LineRecieved += GT.Interfaces.Serial.LineReceivedEventHandler(…), etc.

The GT.Interfaces doesn’t exist either.

any help greatly appreciated! thanks…

@ dave001 - https://www.ghielectronics.com/docs/297/transitioning-from-4.2-to-4.3 should help you some. For the two specific issues you mentioned, SerialLine was renamed to Port and GT.Interfaces is now GT.SocketInterfaces.

2 Likes

Hi John,

Thanks for your help!!

I was getting confused and perhaps threw up the white flag too soon as I should
have had the wherewithall to figure out the rename of SerialLine to Port.

Anyway, I had about 30 errors at first and your info helped me knock out the final 13.

I’m not sure when I’ll be able to test/run it but hopefully it will run now.

thanks again!

Hello!

As mentioned before, all the errors were gone when just in the SDK, but now when I try
to build/run, then I start getting this error:

Cannot resolve type Gadgeteer.SocketInterfaces.AnalogOutput from assembly
GTM.GHIElectronics.Extender

I can see that the definition below is ok, so it appears I am referencing socket interfaces.

private GT.SocketInterfaces.AnalogOutput ao; //seems ok

but when I put in

ao = m_extender.CreateAnalogOutput(GT.Socket.Pin.Five); // ok, until I try to build

so, something is not right. Do I still create an analog output the same as when I was on
2.42?

I look at the Extensions in the Assemblies but I don’t see anything related to SocketInterfaces, however, the code doesn’t complain until I build.
I had updated to 2.43 and can see things like GHI.Glide 4.3.0.0 so seems I updated ok???

can you clearly state what versions of what you installed ? The bouncing ball page .NET Micro Framework – GHI Electronics has all the latest bits, and as long as you followed that you should have a consistent experience. Then you can use the SDK references to correctly decipher what you need. Can I also suggest that you test any issue you hit in a clean, new project created in 4.3, so that you can ensure you don’t have an old reference you haven’t ripped out and replaced ?

Thanks Brett for your reply -

I was at the “bouncing ball” page when I started last week and here are the steps I took
from that page:

1)I started at step 2 since I already have V studio., I followed the tip on step 2 so I
uninstalled the previous SDK. Then I installed .NET Micro Framework 4.3(QFE1).

  1. I installed the Microsoft .NET Gadgeteer Core 2.43.900.

In my project, from the place to Add References, I see under Assemblies.

Framework … Targeting .NET Micro Framework 4.3.1.0 and a list of 23 items , all with version 4.3.0.0.

Extensions… Targeting .NET Micro Framework 4.3.1.0 with a list of stuff with different versions. Among those, I see Gadgeteer 2.43.1.0, Gadgeteer.Serial 2.43.1.0,
Gadgeteer.SPI 2.43.1.0, …GHI.Hardware 4.3.6.0, GHI.Premium.Hardware 4.2.11.1,
GHI.Premium.IO4.2.11.1, GHI.Premium.Net 4.2.11.1…GHI.Usb 4.3.6.0, etc…

I think pretty much all of that came up checked already.

But, if we take one error I’m getting during build - as describe below -

Cannot resolve type Gadgeteer.SocketInterfaces.AnalogOutput from assembly
GTM.GHIElectronics.Extender

I can see that I have GTM.GHIElctronicsExtender 4.3.6.0 checked.
I go to the definition of AnalogOutput and see this
public AnalogOutput CreateAnalogOutput(Socket.Pin pin);

Then from my code → GT.SocketInterfaces.AnalogOutput ao; I go to definition and see
this abstract class in the namespace Gadgeteer.SocketInterfaces from Assembly Gadgeteer.dll, v2.43.1.0. I don’t see this assembly in my references but don’t know if I should or not.

I will try to create a new project as you suggest, and I’m trying to follow the documentation but it all seems very complicated and not sure what to do to tell you the truth. I had analog output working before I went to the new SDK.

I created a new, very simple project and was able to get analog ouput to compile and
run but I did quit using the extender and did the following instead:

ao = GT.SocketInterfaces.AnalogOutputFactory.Create(GT.Socket.GetSocket(9, true, null, null), GT.Socket.Pin.Five, null ); // CreateAnalogOutput(GT.Socket.Pin.Five); //SetupAnalogOutput(GT.Socket.Pin.Five);

However, when I put in my old project , I still get a build error.
When I look at the two project references and properties, I don’t see any difference,
other than I’m not using as many modules in my simple one.

I guess I will have to abandon the old project and bring in the source code to the new one.

old project probably still refers to the old framework version, or at least still has lingering references in it to old components ! If you changed the framework target version in the project properties, and then meticulously ripped out your references in the Solution Explorer pane and then replaced them with the new ones from 4.3, then it should work. But if you miss just one reference, you will still have issues. So a new project is the much easier way to guarantee success.