Project

General

Profile

questions about best devices and multiple devices

Added by cvvvt over 1 year ago

do you have a recommended GSM modem or device in general to use with your library? I am more interested in bulk receiving as opposed to sending. Also, currently in my solution I am creating a MobileGateway for every modem I am using, but it seems to run into some issues receiving SMS consistently after the program runs for around 10 mins and receives 3 or 4 texts. After running through dotMemory it seems there are a log of SerialPort.Overlapped results. I'm not sure if the issues could stem from the large amount of devices I'm running or my form of setting up a thread per device, but basically I was wondering if I am only supposed to use one MobileGateway instance as opposed to one per device or if it is something else I am missing.


Replies (4)

RE: questions about best devices and multiple devices - Added by admin over 1 year ago

Hi,

Generally any GSM modem which supports AT command can be used to send/receive SMS. Since for every modem the library needs to create a connection so you need 1 MobileGateway instance per modem.

There are other users which use multiple modems without issue. Are you seeing any errors in the log files?

Thanks
Regards
admin

RE: questions about best devices and multiple devices - Added by cvvvt over 1 year ago

The errors I see in my logs are these before a memory leak is triggered and the program becomes unresponsive and crashes. I have also seen WatchDog errors but am having trouble finding a log with one or reproducing it.

2020.02.03-05.06.07: Error polling new messages: Unsupported feature: GetMessageFeature: Retrieve messages from the gateway (Error in sending command AT+CMGL=4 : )
2020.02.03-05.06.07: Error polling new messages: Unsupported feature: GetMessageFeature: Retrieve messages from the gateway (Error in sending command AT+CMGL=4 : )
2020.02.03-05.06.07: Stack trace: at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.SerialStream.EndRead(IAsyncResult asyncResult)
at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.Ports.SerialPort.ReadExisting()
at MessagingToolkit.Core.Mobile.BaseMobileGateway`1.InBoundDataReader()
2020.02.03-05.06.07: Stack trace: at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.SerialStream.EndRead(IAsyncResult asyncResult)
at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.Ports.SerialPort.ReadExisting()
at MessagingToolkit.Core.Mobile.BaseMobileGateway`1.InBoundDataReader()
2020.02.03-05.08.03: Error polling new messages: Unsupported feature: GetMessageFeature: Retrieve messages from the gateway (Error in sending command AT+CMGL=4 : )
2020.02.03-05.08.03: Error polling new messages: Unsupported feature: GetMessageFeature: Retrieve messages from the gateway (Error in sending command AT+CMGL=4 : )
2020.02.03-05.08.03: Reading incoming data: The I/O operation has been aborted because of either a thread exit or an application request.

RE: questions about best devices and multiple devices - Added by admin over 1 year ago

Can you attach your code snippet here?

RE: questions about best devices and multiple devices - Added by cvvvt over 1 year ago

i have somewhat resolved my issues by examining your other programs you have open sourced. i'm now running into an issue using a 64 sim hub equipped with Quectel M35 modems where the library says its connected but the message received events never get triggered nor do any messages ever get read from SM/ME. I am wondering if you or someone else has any experience with these modules or how I can approach getting to root of issues.

Here is the log when connecting to one:

2020.02.28-04.22.39: Sending: ATZ
2020.02.28-04.22.40: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.40: Sending: ATE0
2020.02.28-04.22.40: Response: ATE0<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.40: Found echo in response
2020.02.28-04.22.40: Sending: ATE0
2020.02.28-04.22.40: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.40: Sending: AT+COPS=0,2
2020.02.28-04.22.43: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.43: Sending: ATE0
2020.02.28-04.22.44: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.44: Sending: AT+CMEE=1
2020.02.28-04.22.44: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.44: Sending: AT+CPMS?
2020.02.28-04.22.44: Response: <cr><lf>+CPMS: "ME",0,10,"SM",0,30,"SM",0,30<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.44: Sending: AT+CMGF=0
2020.02.28-04.22.45: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.45: Sending: AT+CNMI=0,0,0,0,0
2020.02.28-04.22.45: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.45: Sending: AT+CGMM
2020.02.28-04.22.45: Response: <cr><lf>Quectel_M35<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.45: Sending: AT+GMM
2020.02.28-04.22.46: Response: <cr><lf>Quectel_M35<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.46: Sending: AT+CGMI
2020.02.28-04.22.46: Response: <cr><lf>Quectel_Ltd<cr><lf>Quectel_M35<cr><lf>Revision: MTK 0828<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.46: Sending: AT+GMI
2020.02.28-04.22.46: Response: <cr><lf>Quectel_Ltd<cr><lf>Quectel_M35<cr><lf>Revision: MTK 0828<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.46: Sending: AT+CGSN
2020.02.28-04.22.47: Response: <cr><lf>86*************<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.47: Sending: AT+CIMI
2020.02.28-04.22.47: Response: <cr><lf>31*************<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.47: Sending: AT+CGMR
2020.02.28-04.22.47: Response: <cr><lf>Revision: M35FAR01A08<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.47: Sending: AT+GMR
2020.02.28-04.22.47: Response: <cr><lf>Revision: M35FAR01A08<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.48: Sending: AT+CNMI=?
2020.02.28-04.22.48: Response: <cr><lf>+CNMI: (0-3),(0-3),(0,2,3),(0,1),(0,1)<cr><lf><cr><lf>OK<cr><lf>
2020.02.28-04.22.48: Sending: AT+CNMI=2,1,0,0,0
2020.02.28-04.22.48: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.48: Sending: AT+CMGL=4
2020.02.28-04.22.48: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.49: Sending: AT+CMGL=4
2020.02.28-04.22.49: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.49: Sending: AT+CMGL=4
2020.02.28-04.22.49: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.49: Sending: AT+CMGL=4
2020.02.28-04.22.49: Response: <cr><lf>OK<cr><lf>
2020.02.28-04.22.50: Sending: AT+CMGL=4
2020.02.28-04.22.50: Response: <cr><lf>OK<cr><lf>
....last two messages repeat forever.

    (1-4/4)