Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/telit me910c1 #37

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/HeboTech.ATLib/HeboTech.ATLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<TargetFramework>netstandard2.1</TargetFramework>
<Authors>HeboTech</Authors>
<Product>HeboTech ATLib</Product>
<Version>7.0.0</Version>
<PackageVersion>7.0.0</PackageVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<FileVersion>7.0.0.0</FileVersion>
<Version>7.1.0-beta1</Version>
<PackageVersion>7.1.0-beta1</PackageVersion>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<PackageId>HeboTech.ATLib</PackageId>
<Title>AT command library that makes it easy to communicate with modems.</Title>
<Description>AT command library that makes it easy to communicate with modems.</Description>
Expand Down
6 changes: 6 additions & 0 deletions src/HeboTech.ATLib/Modems/Telit/IME910C1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace HeboTech.ATLib.Modems.Telit
{
public interface IME910C1 : IModem
{
}
}
44 changes: 44 additions & 0 deletions src/HeboTech.ATLib/Modems/Telit/ME910C1.cs
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);
}
}
}
Loading