cancel
Showing results for 
Search instead for 
Did you mean: 

GSM library for Contiki OS on STM32F411RET6

Aishwarye Chauhan
Associate II
Posted on March 19, 2018 at 07:52

Hello,

I've integrated the following

https://github.com/MaJerle/GSM_AT_commands_parser

library(with some changes) ,along with

https://github.com/eclipse/paho.mqtt.embedded-c

device client on STM32F411RET6. I'm using a

http://simcomm2m.com/En/module/?type=23

LTE module for communication with the cloud (on the gateway side ) and

http://www.st.com/en/wireless-connectivity/spirit1.html

modules for communication with the nodes. The RTOS I'm currently using is

https://www.freertos.org/

for managing threads and synchronizing between them.

Now, I want to integrate this with

http://www.contiki-os.org/

as we have a working 6lowPAN mesh over subGHZ implemented using Contiki's 6lowPAN stack. Although it will be trivial to do so, I still wanted to know a few things :
  1. Is using the aforementioned GSM library the recommended approach.
  2. Are there any alternatives to the above library that might be more popular?
  3. Is Contiki a better solution for STM32F4xx series or should I be using FreeRTOS, any other RTOS ?

The current use-case is Smart Street Lighting so availability of power is not an issue, however we would like to extend it to other use-cases where conserving power might be needed.

Thanks,

Aishwarye Chauhan

#mqtt #contiki-spirit1 #contiki-stm32 #6lowpan #contiki-os #gsm-modem #mesh #simcom
5 REPLIES 5
Tilen MAJERLE
ST Employee
Posted on March 19, 2018 at 09:35

Hello

Chauhan.Aishwarye

‌,

you are focused on lib I made as an experimentalfor (at least plan was) driving AT commands based communication with the less CPU resources as possible. Result of the lib: I failed on my first try and I made this library obsolete and it is now archived on Github.

To answer your question. I did not find any good library for AT commands which would work in 'non-blocking' mode or if it uses 'blocking', to have at least option for context switch in OS. I found many libraries but none of them were not what I was looking for (all were waiting in while loop to receive answer from device = waste of CPU time).

Major issues with the lib:

  • Only SIM800/900 are supported
  • Library architecture is not designed properly
  • Missing commands queue to start commands from different user threads
  • No automatic context switch
  • User needs to implement GSM thread manually
  • ...

I gave you enough reasons why I stopped personal development here and I started a new version which:

  • is RTOS only supported
  • Has command queue
  • Uses 2 threads for efficient resource usage
  • Uses OS features (sem, mutex, queue, thread) and is OS independant
  • Uses custom memory allocations
  • Architecture supports different HW modems (implementation for specific must be added)
  • Has callback and sequential API functions
  • API functions can be blocked or not

    • In case of blocking call, thread is put on blocked state due to semaphore usage (if OS supports it)
  • Many other features
  • It is not intended to run on devices with small amount of RAM

This is the opportunity to invite all interested developers to support this project.

It is available here:

https://github.com/MaJerle/GSM_AT_Lib

Best regards,

Tilen

Posted on March 19, 2018 at 10:12

Hello Tilen,

I appreciate the work you've done to bring up the current version of the library. It is exactly what I was looking for.

I will be integrating this library with ContikiOS and will provide it as a submodule in your project(once you approve of the quality).

Thanks again for your detailed answer and prompt response.

Posted on March 20, 2018 at 06:21

Hey Tilen,

Could youme help me on how should I go about integrating the library with Contiki-OS without multithreading ( only pt ) support ? I can work on extending the mtarch.c but is there a way to run the library using only the protothread approach ?

Thanks

Terry Stasiuk
Associate II
Posted on May 25, 2018 at 23:08

Hello Aishwarye,

I am very interested in your progress on this work. We too have a need for a Contiki port for a modem driver. I would be happy to collaborate/contribute if possible.

Thanks

Anesh Kumar
Associate II

Hi,

I have been working on Contiki OS from last 6 months, according to my understanding you should use border router and integrate your cellular code to that. ST has border router example code using WiFi as border router gateway. Hope this help.

Thanks!