Skip to content

Program errors out if SIM can't support 20 messages. #18

@xathon

Description

@xathon

gsmHat/gsmHat/gsmHat.py

Lines 540 to 543 in f8e4bf7

if(self.__smsToRead == 20):
self.__smsToRead = 0
else:
self.__smsToRead = self.__smsToRead + 1

This codeblock assumes that a SIM can always store a total of 20 SMS. However, this isn't always the case. The output of AT+CPMS="SM" should be used to determine the maximum storage, since the HAT will raise an error if a slot that's too high is access ed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions