-
Notifications
You must be signed in to change notification settings - Fork 114
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
Fix supportedCommands property for Teleofis modems #62
Conversation
@@ -207,6 +207,8 @@ def writeCallbackFunc(data): | |||
(['FGH,RTY,UIO\r\n', 'OK\r\n'], ['FGH', 'RTY', 'UIO']), # nasty, but possible | |||
# ZTE-like response: do not start with +CLAC, and use multiple lines | |||
(['A\r\n', 'BCD\r\n', 'EFGH\r\n', 'OK\r\n'], ['A', 'BCD', 'EFGH']), | |||
# Siemens response: like ZTE but each command has AT prefix | |||
(['AT&F\r\n', 'AT&V\r\n', 'AT&W\r\n', 'AT+CACM\r\n', 'OK\r\n'], ['&F', '&V', '&W', '+CACM']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Siemens modem actually send &
characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you probably meant '&F', '&V', '&W' part. Let's wait for @ffix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for a reminder! I just got suspicious, because @ffix have not mentioned those commands inside PR description. Sorry for the confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Siemens modem actually send
&
characters?
It's my mistake. It is actually Teleofis modem, not Siemens.
I've updated description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for a reminder! I just got suspicious, because @ffix have not mentioned those commands inside PR description. Sorry for the confusion.
You're right. I copied these commands from modem response directly.
Is this kind of data manipulation safe? Couldn't this affect non-Siemens modems as well? I'm not sure if it's a generic solution, ready to merge. |
Unfortunately, I don't have an answer to this question. Now I have only Siemens and Teleofis modems. |
Well - in order to properly answer this question, there should be a list of hardware that this library is aiming for. @babca do you have such list on your mind? Overall - this PR modifies just a single command (+CLAC) and I cannot see how can it break other modems - the AT prefix inside command list is definitely something unexpected. |
Thanks @tomchy for the second (your) opinion. Merged. "there should be a list of hardware that this library is aiming for" |
Sounds like a great idea! The list most probably will evolve into a table with tested features as a second dimension/a separate doc page :) |
Some modems like
SiemensTeleofis have differentAT+CLAC
command response:So we need to remove
AT
prefix to return valid supportedCommands value.