Cellular Radio module with VB and .Net 4.2

Could some one help me with the appropriate drivers to enable me to use the Cellular Radio module with .Net 4.2 . I cannot switch to 4.1 framework as all programming is in Visual Basic, unsupported in 4.1.

welcome to the community,
can you specify your problem

I have .Net framework 4.2 installed and am writing in Visual Basic. The project is setup with an oled display and the cellular radio and everything seems to suggest that there are no problems.
At the program start I have:
phone.PowerOn()
and a subroutine as below:
Private Sub phone_ModuleInitialized(ByVal sender As Gadgeteer.Modules.Seeed.CellularRadio) Handles phone.ModuleInitialized
Display.SimpleGraphics.DisplayText(“ACTIVE”, font, GT.Color.Green, 20, 70)
End Sub

Sadly I cannot gain any response from anything.

Thanks for the advice. Here is my code, hopefully easier to understand:

 Public Sub ProgramStarted()
        phone.PowerOn()
        phone.Reset()
        phone.RetrieveOperator()
        Debug.Print("Power On")

with subroutines as follows, neither of which occur…

    Private Sub phone_ModuleInitialized(ByVal sender As Gadgeteer.Modules.Seeed.CellularRadio) Handles phone.ModuleInitialized
        Display.SimpleGraphics.DisplayText("ACTIVE", font, GT.Color.Green, 20, 70)
    End Sub

    Private Sub phone_OperatorRetrieved(ByVal sender As Gadgeteer.Modules.Seeed.CellularRadio, ByVal operatorName As String) Handles phone.OperatorRetrieved
        Display.SimpleGraphics.DisplayText(operatorName, font, GT.Color.Green, 20, 70)
    End Sub

If it helps:

phone.PowerOff()

and

phone.PowerOn()

work correctly.

Thanks in advance for any assistance.
I have added some time delays and all now seems to work fine.

Typically, Event listeners are attached first, then the module is initialized. Like this:


phone.ModuleInitialized += new ModuleInitializedHandler(phone_ModuleInitialized);
phone.PowerOn();
phone.Reset();

Depending on how the module’s code is written, if an event has a null listener when the constructor is called, the module may not ever try to fire that event (that’s the more efficient way of doing it, instead of checking for a non-null listener each time you want to fire the event).

However, I’ve never programmed in VB before; it looks like in VB, you don’t attach events using function handles in the main code. So, I’m not sure how VB parses that stuff? How does it know when you want to attach an event listener to an event? In other words, does your main ProgramStarted() code run first, and then VB sees your phone_ModuleInitialized function and attach it? If so, it may never fire those events.

By the way, I don’t mean to hate, but have you ever thought about switching the project to C#? VB is the most atrocious-looking language I’ve ever seen.

@ jay - the code is correct in vb
the …HANDELS… addition is the same as the += Handler in C#.

C# and VB are nearly the same you only give up using “;” “{” and “this”.
BTW the net code is the same