I need to write code in C# for MC8790. Sierra distributes examples of coding only in C++. Is there anybody that has programmed the GSM module above in C# that could help me or can provide me some examples to understand better how to program it in C#
Same here. I am looking for .NET library (AT Command + connections manager wrapper). Something similar to “GSM Communication Library”. I’ve created some methods but I would like to do something like this:
var modem = SierraWireless.Device.GetModems().First();
var quality = modem.GetSignalQuality();
SqDecibelsTextBox.Text = quality.Decibels.ToString();
SqNameTextBox.Text = quality.Signal.ToString(); // NoSignal,VeryPoor,Poor,Fair,Good,Excelent
// Connect to Internet (3G).
modem.Connect();
I am new in C# but please allow me to share my understanding…
MC879x supports both AT and CnS. Sierra Wireless offers C++ SDK which based on CnS.
If you want to use C#, there are several options,
develop your own C# program which communicate with MC879x using AT command or CnS.
marshal and call the unmanaged C++ class provided in SDK API
(1) is straight forward and you only implement the feature you needed with full control.
However, if you are good at PInvoke and marshaling, (2) is a good choice providing full features already implemented in SDK. I tried to manually call those API in SDK using C# and it’s working fine. As you may know, there are also some tools can help for example SWIG and PInvoker.
I built a C++/CLI wrapper library around the Sierra Wireless SDK that can be called from the rest of my managed application. This solution seems to work pretty well for my needs, although initial setup was bit of a headache. If you don’t mind getting your hands dirty with C++ I would recommend this approach.
Hi gferreri, would you be able to share this library that you created? Maybe this forum can then make it available for everyone else? or if you can post it to a public site or even my personal email, that would be awesome