zabsalahid / serialport-gsm

SerialPort-GSM is a simplified plugin for communicating with gsm modems. (Primarily for sms) (Focused in PDU mode)
MIT License
90 stars 47 forks source link

Moving the logic #15

Closed karianpour closed 5 years ago

karianpour commented 5 years ago

I checked all of the method except the setOwnNumber method, it gives me error even before refactor. Please check it before merging.

zabsalahid commented 5 years ago

@karianpour i'm still testing it.

First, I checked setOwnNumber and getOwnNumber as well, but I didn't have any problem,

Second, on initializeModem I get

{ status: 'ERROR',
  request: 'initializeModem',
  data: 'Cannot Get Modem Initialized' }

but still able to do other commands, as it replied OK. and upon checking it, on logic, it doesn't wait for the OK reply of the modem. For now, that's what I have encountered.

karianpour commented 5 years ago

@zabsalahid nice catch, I made a pull request to fix it.

Just for the record, I am working at sending and receiving ussd commands, do you have any suggestion?

zabsalahid commented 5 years ago

@karianpour nice! Also, let's not focus onsetOwnNumber/getOwnNumber for now, as the CMGF & CNUM does not work on all types of modem.

As for the ussd, I haven't put my mind into it, so I trust you making it's base. But I do suggest you implementing it like how you did with the modem.logic, but on a separate file, a session perhaps.