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

Failure to retrieve phone number. #121

Open
choleaoum opened this issue Dec 10, 2022 · 4 comments
Open

Failure to retrieve phone number. #121

choleaoum opened this issue Dec 10, 2022 · 4 comments

Comments

@choleaoum
Copy link

choleaoum commented Dec 10, 2022

I'm using an EC25 GSM module and the GetOwnNumber function is not working correctly because it's expecting a name field wrapped in quotations. I am unsure if it matters but I do have PDU mode enabled in the modem.

The following error is being thrown,

TypeError: Cannot read properties of null (reading '1') at item.logic (\node_modules\serialport-gsm\lib\functions\modem.js:1210:54)

Line 1210: name: /"(.*?)"/g.exec(splitResult[0])[1],

The following variable splitResult returns [ '+CNUM: ', '"15621231234"', '129' ]

@Apollon77
Copy link
Contributor

Please provide a "Logger" and provide a debug log. The question is which data are coming back that can not be parsed to know how to handle that case

Apollon77 added a commit to Apollon77/serialport-gsm that referenced this issue Dec 10, 2022
@Apollon77
Copy link
Contributor

Additionally Please try out from my current fork branch. I adjusted the logic there to handle your case without a crash ... but would be still interesting whats the data level.

Please use npm i Apollon77/serialport-gsm#sendfix to install the version from my branch and give feedback.

@choleaoum
Copy link
Author

Additionally Please try out from my current fork branch. I adjusted the logic there to handle your case without a crash ... but would be still interesting whats the data level.

Please use npm i Apollon77/serialport-gsm#sendfix to install the version from my branch and give feedback.

Thank you, I will test the branch and provide feedback.

@Apollon77
Copy link
Contributor

@choleaoum Hi, did you had any chance to check it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants