Project

General

Profile

questions about best devices and multiple devices

Added by cvvvt 20 days 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 (3)

RE: questions about best devices and multiple devices - Added by admin 20 days 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 18 days 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 13 days ago

Can you attach your code snippet here?

    (1-3/3)