thingsboard-client-sdk icon indicating copy to clipboard operation
thingsboard-client-sdk copied to clipboard

Device connecting to APN but not to ThingsBoard when using GSM

Open jortega11 opened this issue 1 year ago • 7 comments

Hello, I am testing a GSM/GPRS/GPS module, the A9G module. The first thing that comes into my mind is that this board is not properly supported (I have not seen this module when you define them at the beginning of the sample code) and that could be why this is not working, but then I checked the commands that the library uses to communicate with the module and they seem to be the same commands that are used for other modules.

I have succesfully worked with another GSM module in the past with that same sample code provided and it worked fine, but now I wanted to add GPS functionalities so I had to change this previous module to the A9G.

I have found that there is a function in the TinyGsmClient library that checks if the module is connected to GPRS or not and sometimes it says that it is connected and some others that it is not. Apparently it connects correctly to the APN but then it does not have Internet so connecting to ThingsBoard becomes impossible.

This is what it is shown in the output.

image

My first guess is that I need something else that it is not supported in the library but I am not sure about that. Any ideas of what can be causing this issue or which troubleshooting steps could I follow to address this issue? Thank you very much!

jortega11 avatar Jan 09 '24 10:01 jortega11

@jortega11 For now could you enable Thingsboard debugging, perhaps that will help to find out a specific reason. See Documentation for more information.

@imbeacon Do you know of any incompatibility issues with the aforementioned device?

MathewHDYT avatar Jan 09 '24 13:01 MathewHDYT

Using the Thingsboard debugging, but could not get any extra information

jortega11 avatar Jan 10 '24 12:01 jortega11

I've had a look at the TinyGSM library, perhaps the example PubSubClient integrations provied can help fix the aforementioned issue.

If you want too you can have a look at the example and compare it with your currently not working script. Because there might be special additional steps required to get it working for GPRS/GPS boards.

MathewHDYT avatar Jan 12 '24 07:01 MathewHDYT

I will take a look at it. Thanks!

jortega11 avatar Feb 05 '24 08:02 jortega11

Hi @jortega11,

Could you try to connect to Matt.thingsboard.cloud instead of thingsboard cloud?

imbeacon avatar Feb 05 '24 08:02 imbeacon

Okay, I will try it. Which token should I use in order to connect it?

jortega11 avatar Feb 06 '24 10:02 jortega11