-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for Telit ME910C1 * Bump version
- Loading branch information
Showing
3 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace HeboTech.ATLib.Modems.Telit | ||
{ | ||
public interface IME910C1 : IModem | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// Telit ME910C1 chipset | ||
/// </summary>h | ||
public ME910C1(IAtChannel channel) | ||
: base(channel) | ||
{ | ||
} | ||
|
||
public override async Task<bool> SetRequiredSettingsBeforePinAsync() | ||
{ | ||
ModemResponse echo = await DisableEchoAsync(); | ||
ModemResponse errorFormat = await SetErrorFormatAsync(1); | ||
return echo.Success && errorFormat.Success; | ||
} | ||
|
||
public override async Task<bool> SetRequiredSettingsAfterPinAsync() | ||
{ | ||
ModemResponse currentCharacterSet = await SetCharacterSetAsync(CharacterSet.UCS2); | ||
ModemResponse smsMessageFormat = await SetSmsMessageFormatAsync(SmsTextFormat.PDU); | ||
return currentCharacterSet.Success && smsMessageFormat.Success; | ||
} | ||
|
||
public Task<IEnumerable<ModemResponse<SmsReference>>> SendSmsAsync(PhoneNumber phoneNumber, string message) | ||
{ | ||
return base.SendSmsAsync(phoneNumber, message, false); | ||
} | ||
|
||
public Task<IEnumerable<ModemResponse<SmsReference>>> SendSmsAsync(PhoneNumber phoneNumber, string message, CharacterSet codingScheme) | ||
{ | ||
return base.SendSmsAsync(phoneNumber, message, codingScheme, false); | ||
} | ||
} | ||
} |