diff --git a/src/HeboTech.ATLib/HeboTech.ATLib.csproj b/src/HeboTech.ATLib/HeboTech.ATLib.csproj index f1e66ea..e0bdf07 100644 --- a/src/HeboTech.ATLib/HeboTech.ATLib.csproj +++ b/src/HeboTech.ATLib/HeboTech.ATLib.csproj @@ -4,10 +4,10 @@ netstandard2.1 HeboTech HeboTech ATLib - 7.0.0 - 7.0.0 - 7.0.0.0 - 7.0.0.0 + 7.1.0-beta1 + 7.1.0-beta1 + 7.1.0.0 + 7.1.0.0 HeboTech.ATLib AT command library that makes it easy to communicate with modems. AT command library that makes it easy to communicate with modems. diff --git a/src/HeboTech.ATLib/Modems/Telit/IME910C1.cs b/src/HeboTech.ATLib/Modems/Telit/IME910C1.cs new file mode 100644 index 0000000..a0e5bda --- /dev/null +++ b/src/HeboTech.ATLib/Modems/Telit/IME910C1.cs @@ -0,0 +1,6 @@ +namespace HeboTech.ATLib.Modems.Telit +{ + public interface IME910C1 : IModem + { + } +} diff --git a/src/HeboTech.ATLib/Modems/Telit/ME910C1.cs b/src/HeboTech.ATLib/Modems/Telit/ME910C1.cs new file mode 100644 index 0000000..5cc18ae --- /dev/null +++ b/src/HeboTech.ATLib/Modems/Telit/ME910C1.cs @@ -0,0 +1,44 @@ +using HeboTech.ATLib.CodingSchemes; +using HeboTech.ATLib.DTOs; +using HeboTech.ATLib.Modems.Generic; +using HeboTech.ATLib.Parsers; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace HeboTech.ATLib.Modems.Telit +{ + internal class ME910C1 : ModemBase, IModem, IME910C1 + { + /// + /// Telit ME910C1 chipset + /// h + public ME910C1(IAtChannel channel) + : base(channel) + { + } + + public override async Task SetRequiredSettingsBeforePinAsync() + { + ModemResponse echo = await DisableEchoAsync(); + ModemResponse errorFormat = await SetErrorFormatAsync(1); + return echo.Success && errorFormat.Success; + } + + public override async Task SetRequiredSettingsAfterPinAsync() + { + ModemResponse currentCharacterSet = await SetCharacterSetAsync(CharacterSet.UCS2); + ModemResponse smsMessageFormat = await SetSmsMessageFormatAsync(SmsTextFormat.PDU); + return currentCharacterSet.Success && smsMessageFormat.Success; + } + + public Task>> SendSmsAsync(PhoneNumber phoneNumber, string message) + { + return base.SendSmsAsync(phoneNumber, message, false); + } + + public Task>> SendSmsAsync(PhoneNumber phoneNumber, string message, CharacterSet codingScheme) + { + return base.SendSmsAsync(phoneNumber, message, codingScheme, false); + } + } +}