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

Arduino-Library library loops when trying to connect to websocket via GSM #47

Open
georgevbsantiago opened this issue Feb 17, 2023 · 1 comment

Comments

@georgevbsantiago
Copy link

georgevbsantiago commented Feb 17, 2023

I identified that, in occasional situations, after the GSM modem connects with the APN, the library is stuck trying to connect in the websocket.
Apparently, this problem might be with the TinyGSM library. (vshymanskyy/TinyGSM#62, vshymanskyy/TinyGSM#434, vshymanskyy/TinyGSM#35, vshymanskyy/TinyGSM#57, )
However, could the Arduino-Library library make some approach to work around this problem? Any approach to clear cache, or try 10 times and restart the modem?
I remember that Arduino-Library already made similar approaches when it had a problem getting the date and time from NTP (see this post).

11:03:34.551 > [NETWORK] Starting connection...
11:03:34.552 > Thinger State Listener: NETWORK_CONNECTING
11:03:34.571 > [NETWORK] Initializing Modem...
11:03:39.695 > [NETWORK] Modem Info: XXXXXXXXXXXXXX
11:03:39.716 > [NETWORK] Waiting for Network...
11:03:56.129 > [NETWORK] Network Connected!
11:03:56.148 > [NETWORK] Connecting to APN...
11:04:59.787 > [NETWORK] Connected!
11:04:59.807 > Thinger State Listener: NETWORK_CONNECTED
11:04:59.824 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:04:59.824 > [_SOCKET] Using secure TLS/SSL connection: yes
11:04:59.829 > Thinger State Listener: SOCKET_CONNECTING
11:06:14.872 > [_SOCKET] Error while connecting!
11:06:14.884 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:06:24.033 > [NETWORK] Starting connection...
11:06:24.033 > Thinger State Listener: NETWORK_CONNECTING
11:06:24.094 > [NETWORK] Connecting to APN...
11:06:30.766 > [NETWORK] Connected!
11:06:30.785 > Thinger State Listener: NETWORK_CONNECTED
11:06:30.802 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:06:30.802 > [_SOCKET] Using secure TLS/SSL connection: yes
11:06:30.808 > Thinger State Listener: SOCKET_CONNECTING
11:07:45.843 > [_SOCKET] Error while connecting!
11:07:45.861 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:07:51.000 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:07:51.008 > [_SOCKET] Using secure TLS/SSL connection: yes
11:07:51.013 > Thinger State Listener: SOCKET_CONNECTING
11:08:05.039 > [_SOCKET] Error while connecting!
11:08:05.057 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:08:10.190 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:08:10.196 > [_SOCKET] Using secure TLS/SSL connection: yes
11:08:10.202 > Thinger State Listener: SOCKET_CONNECTING
11:08:24.243 > [_SOCKET] Error while connecting!
11:08:24.264 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:08:29.394 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:08:29.400 > [_SOCKET] Using secure TLS/SSL connection: yes
11:08:29.406 > Thinger State Listener: SOCKET_CONNECTING
11:08:43.457 > [_SOCKET] Error while connecting!
11:08:43.462 > Thinger State Listener: SOCKET_CONNECTION_ERROR  
11:08:48.598 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:08:48.613 > [_SOCKET] Using secure TLS/SSL connection: yes       
11:08:48.613 > Thinger State Listener: SOCKET_CONNECTING
11:09:02.647 > [_SOCKET] Error while connecting!
11:09:02.647 > Thinger State Listener: SOCKET_CONNECTION_ERROR  
11:09:07.782 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:09:07.782 > [_SOCKET] Using secure TLS/SSL connection: yes       
11:09:07.788 > Thinger State Listener: SOCKET_CONNECTING
11:09:21.840 > [_SOCKET] Error while connecting!
11:09:21.846 > Thinger State Listener: SOCKET_CONNECTION_ERROR  
11:09:26.976 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:09:26.982 > [_SOCKET] Using secure TLS/SSL connection: yes       
11:09:26.987 > Thinger State Listener: SOCKET_CONNECTING
11:09:41.044 > [_SOCKET] Error while connecting!
11:09:41.044 > Thinger State Listener: SOCKET_CONNECTION_ERROR  
11:09:46.175 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:09:46.181 > [_SOCKET] Using secure TLS/SSL connection: yes       
11:09:46.187 > Thinger State Listener: SOCKET_CONNECTING
11:10:00.237 > [_SOCKET] Error while connecting!
11:10:00.243 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:10:05.373 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:10:05.379 > [_SOCKET] Using secure TLS/SSL connection: yes
11:10:05.384 > Thinger State Listener: SOCKET_CONNECTING
11:10:19.432 > [_SOCKET] Error while connecting!
11:10:19.432 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:10:24.561 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:10:24.568 > [_SOCKET] Using secure TLS/SSL connection: yes
11:10:24.573 > Thinger State Listener: SOCKET_CONNECTING
11:10:38.592 > [_SOCKET] Error while connecting!
11:10:38.600 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:10:43.727 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:10:43.733 > [_SOCKET] Using secure TLS/SSL connection: yes
11:10:43.746 > Thinger State Listener: SOCKET_CONNECTING
11:10:57.796 > [_SOCKET] Error while connecting!
11:10:57.796 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:11:02.927 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:11:02.933 > [_SOCKET] Using secure TLS/SSL connection: yes
11:11:02.939 > Thinger State Listener: SOCKET_CONNECTING
11:11:16.975 > [_SOCKET] Error while connecting!
11:11:16.976 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:11:22.111 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:11:22.111 > [_SOCKET] Using secure TLS/SSL connection: yes
11:11:22.117 > Thinger State Listener: SOCKET_CONNECTING
11:11:36.137 > [_SOCKET] Error while connecting!
11:11:36.142 > Thinger State Listener: SOCKET_CONNECTION_ERROR
11:11:41.272 > [_SOCKET] Connecting to xxxxxxxx.aws.thinger.io:25202...
11:11:41.277 > [_SOCKET] Using secure TLS/SSL connection: yes
11:11:41.283 > Thinger State Listener: SOCKET_CONNECTING
@georgevbsantiago
Copy link
Author

Hi @alvarolb
A doubt. Could some of the new connection improvement approaches used in MKR and bc66 also help in SIM800, as in the problem reported above?

Thanks

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

1 participant