cancel
Showing results for 
Search instead for 
Did you mean: 

How to use X-CUBE-CELLULAR Framework with the STEVAL-STWINKT1 and Quectel BG96 on STMOD+ connector? Framework confusion.

PLang.3
Associate II

What I have:

  • SMT32 CubeIDE 1.3.0
  • the P-L496G-CELL02 eval kit with the Quectel BG96 on STMOD+ connector
  • the X-cube-cellular examples for connecting the board with the cloud via MQTT
  • an STEVAL-STWINKT1, which I want to connect via MQTT to our cloudservice

What I already did:

  • With the P-L496G-CELL02 board, I used the MQTT client demonstration project, that is using the X-CUBE-CELLULAR-Framework and therein the network library api
  • I modified this project to connect the board to our own cloud (via mqtt) and do some publishing of data, subscription to some topics, rpc calls etc - it works
  • But this is only the first step

What is my goal?

  • Using the Quectel BG96 on STMOD+ connector with the STEVAL-STWINKT1. Connecting the board to our cloud via MQTT and publish some sensor data.

Problem:

  • the example project STWINCELL, which comes with the STEVAL-STWINKT1 implements a connection to an AWS cloud
  • the AWS example is NOT BASED on the X-CUBE-CELLULAR framework and differs in the framework architecture significantly. Why did you use two different approaches?? This makes it very hard now - because I already solved the task (connecting to our cloud) with the X-CUBE-CELLULAR-Framework and the P-L496G-CELL02.

Questions:

  • What would you suggest? What is the best approach to realize an MQTT connection with the STWINKT? I see two approaches:
    • modifying the AWS example an get rid of all the AWS specific stuff to establish a simple MQTT connection to a server
    • or are there examples projects for the STWINKT1 using the X-CUBE-CELLULAR add-on that I can use as a starting point? The X-CUBE-CELLULAR would definitely be my favorite solution, as I expect, that ST will care for this framework in future, or am I wrong.

What would be the more future proof path? Adapting the AWS-cloud example or using X-CUBE-CELLULAR as base framework?

Thanks for your help and best regards

Patrick

17 REPLIES 17
Chandrashekar C
Associate III

Hi @Eleon BORLINI​ 

I am using STSW-STWINCELL demo application on STEVAL-STWINKT1B with STEVAL-STMODLTE, most of the time I keep getting this error but once in a while it works fine, it connects and sends the topics to AWS.

Can you please help me fix this issue?

SIM which I am using work perfectly fine on my phone, so there is no connection issue.

0693W000008xuVjQAI.pngKind Regards

Chandrashekar C

 Hi @Chandrashekar C​ ,

I checked with our experts and they say that it is unfortunately an issue related to the server chosen for the synchronization with the TLS protocol.

In fact the cellular module is perfectly connected to the net as shown in your picture, with his own IP address.

They suggest the following procedure:

  1. Open the file “main.h�?
  2. Remove the comment at line 90 (#define USE_CLEAR_TIMEDATE             // see 'timedate.c')
  3. Compile again
  4. Download the new firmware.

Please let me know if you can fix the issue in this way.

-Eleon

Hi @Eleon BORLINI​ 

Thanks for the response.

I followed the procedure you suggested in the above message, its still same, I doesn't connect at all :( not even once.

Do you think it's anything do with setting Tickless to 1 to achieve Low power mode?

#define configUSE_TICKLESS_IDLE                  1

0693W000008y3bHQAQ.pngPlease let me know if I can tweak in anything else.

Kind Regards

Chandrashekar C

Hi @Eleon BORLINI​ 

I also notice that the binary provided in STSW-STWINCELL [STSW-STWINCELL_BG96_V1.0.0.bin] also behaves same [ RTC failure ]

Is there any other working binary which I can use?

I am using SIM card from onomondo

Any suggestion is much appreciated.

Kind Regards

Chandrashekar C

Hi @Chandrashekar C​ ,

Our experts performed some tests (described here below) without encountering issues. The outcome is that your issue could be related to supply problems.

Test configuration:

HW

  • STWIN
  • STMOD+ expansion board with Quectel BG96 Cellular module
  • M2M SIM provided by TIM to use NB-IoT infrastructure
  • Power supply able to provide 5V@1A

FW

  • STSW-STWINCELL
    • original binary firmware as in the provided package (RTC synchronization with TLS protocol using www.gandi.net)
    • modified binary firmware as previously described (RTC synchronization with TCP protocol using www.st.com)

Please find attached the log files.

The modem obtains the IP address and can configure RTC from both www.gandi.net and www.st.com.

Their suggestion is:

  • supply with at least 5V@1A the STWIN that is connected with the STMOD+ cellular board. A lower current capability could be the cause of the issue;
  • connect the STWIN directly with the power supply without any USB hub.

-Eleon

Hi @Eleon BORLINI​ 

Thank you so much for your detailed response and patience.

Looks like there is an issue with network provider, Onomondo SIM on specific network fails to connect to www.gandi.net or www.st.com.

Currently, we are whitelisting selected network and it seems to be working :)

Further, I have couple of question for you

  1. Is it possible to run STSW-STWINCELL using Tickless Low Power Mode on a Battery? Do you have any other suggestions
  2. What drivers and middleware we need to upgrade so we can use Monarch GM01Q-STMOD expansion board with STSW-STWINCELL?

Looking forward for your response.

Kind Regards

Chandrashekar C

Hi @Chandrashekar C​ ,

glad to hear that you solved your previous issue!

About the new questions, could you write them in a new community post, so that people can interact with it you more easily?

-Eleon

Hi @Eleon BORLINI​ 

Thanks.

Sure, I will create a new community post with these questions.

Kind regards

Chandrashekar C