You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for proposing.
Not easy to review the incremental commits however. I've checked on your branch.
The ModemCardRequest has kind of a weird initialization routine : 2 distinct exclusive args (at_client and modem_device_path), an int timeout which is passed straight in a float function, cardType which is unused and readers set into _readers attribute but seems unused afterall too.
Similarly, the transform arg in ATClientClient.transmit looks strange, as the caller could simply apply it without passing it as an argument.
Will need more time to check and eventually fix / simplify the new classes. Feel free to rebase and / or propose some simplifications on your side.
The ModemCardRequest has kind of a weird initialization routine : 2 distinct exclusive args (at_client and modem_device_path)
The idea is to either be able to pass the at_client as dependency, in order to provide a specialization class instead of using provided ATCommandClient or just specifyng the model path to use the default implementation.
It could be factorized to only support at_client, but for simplicity and to avoid to have and import/init the ATCommandClient, I kept the option to directly pass the modem device path.
Similarly, the transform arg in ATClientClient.transmit looks strange, as the caller could simply apply it without passing it as an argument.
Same idea as the passing the at_client as dependency, here is to be open for extension, to let the consumer return a custom formatted data. Default is to return the raw string result, here the ModemCardRequest will transform it to the format as orginally returned by pyserial CardService
an int timeout which is passed straight in a float function, cardType which is unused and readers set into _readers attribute but seems unused afterall too.
ModemCardRequest implement multiple interface exposed by the pyscard Cardservice, for ease (definitely over engineering there), this parameters is only used for compatibility but is definitely not used. Not sure what is it purpose on the real Cardservice, but you know, it just works ;)
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will add support for SIM/USIM communication via a modem device using the AT+CSIM command. It has been tested with a USIM:
It should theoretically work with the SIM class as well, but it hasn't been tested.