Giter VIP home page Giter VIP logo

simcom_dam's Introduction

simcom_dam

Examples and documentation for simcoms downloadable modules (Qualcomm SoC) All information is tested and based on SIM7000E modules, but they are identical for all other SIM7000 modules and might be useful for other simcom modules as well.

NOTE

I do not recommend this module for any new projects at all (at least not in its current state). It has pretty much no public support or documentation from its manufacturer nor has it received any firmware updates since its release (which it definitly would need). It has the tendency to crash for random reasons, with not debug info about why it crashed or where it crashed, behaves differently depending on whether or not usb is connected and the list goes on. Dont get me wrong, it certainly is a very powerful module (multiple megs of free ram & flash, gps&modem built in and a whole rtos "for free") for a relative cheap price. However if you plan to use this in any kind of commercial product: DONT. The time you need to spend to get a reliable firmware (even with the groundwork of this repo) which does what you want far outways the potential benefits.

If you already have the modules, do this for fun or enjoy hunting bugs with no documentation, unpredictable behaviour and no debugger (and limited serial output), go ahead and feel free to leave me a star (cause you seem to have similar hobbies to me :) ).

TLDR: I have since moved on to other projects, so consider this repo unmaintained. This is subject to change in case I find a new use case for them or get bored in my free time (dont count on this, I have a huge backlog of toy projects).

Building the examples

You need an arm cross compiler installed in /opt/ and update build_scripts/config.mk to point to it. I tested both gcc-arm-none-eabi-9-2019-q4-major and gcc-arm-none-eabi-7-2018-q2-update but newer ones should work just fine. I highly recommend sticking to the official arm distributions of gcc as it makes things a lot more predictable. You can get it here.

Once you have the compiler setup, change into the examples directory and run make to build everything needed and make upload to transfer it to the module. If you have other serial devices plugged into your pc (like a serial to usb adapter) you might need to update the tty in config.mk.

Disclamer

I am in no way associated with simcom. I wrote an email to them once which did not even get a response.

simcom_dam's People

Contributors

thalhammer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simcom_dam's Issues

Inconsistent behaviour between gcc and armcc

qapi_GPIO_ID_t     gpio_id = 0;
qapi_TLMM_Config_t tlmm_config;
qapi_Status_t      status = QAPI_OK;
	
memset(&tlmm_config, 0, sizeof(tlmm_config));
tlmm_config.pin = 8; // Pin 11 is GPIO3
tlmm_config.func = 0;
tlmm_config.dir = QAPI_GPIO_INPUT_E;
tlmm_config.pull = QAPI_GPIO_PULL_UP_E;
tlmm_config.drive = QAPI_GPIO_2MA_E;

status = qapi_TLMM_Get_Gpio_ID( &tlmm_config, &gpio_id);

if (status == QAPI_OK) {
	status = qapi_TLMM_Config_Gpio(gpio_id, &tlmm_config);
}

In armcc everything works fine, but gcc somehow modifies the first byte/word of tlmm_config in the call to qapi_TLMM_Get_Gpio_ID and writes a zero there, causing the consecutive call to qapi_TLMM_Config_Gpio to fail with ERR_INVALID_PARAM. I don't know why this happens only in gcc.
This is a tracking issue to gather ideas until I figured this out.

DAM sample program

Hi,

When I use QAPI_UART_PORT_003_E for UART interface init, where can I see the output. Can you please help with this very basic.

question about util/uart.c

I'm working on a school project using SIM7000E and i'm exploring the DAM.
I was going through uart.c code and my mind blocked on this piece of code, if someone could explain me(im fairly new around here), i would apreciate it very much.

Here is the code(in file uart.c, uart_init() function, Lines 61 to 64):
uart_context_t mctx = (uart_context_t)cfg->buf;
mctx->sendbuf = (char*)cfg->buf + sizeof(struct uart_context_s);
mctx->send_buf_len = cfg->buf_len - sizeof(struct uart_context_s);
mctx->is_off = false;

qapi_Timer_Sleep() does not work with other units than TICK

First of all, thank you for your amazing work!

The issue:
When I try to use the qapi_Timer_Sleep function from the qapi_timer.h, the module never comes back if I use other time units than QAPI_TIMER_UNIT_TICK.

Here is my code (That does not work unless I use the QAPI_TIMER_UNIT_TICK):

#include "qapi.h"
#include "qapi_timer.h"
#include "app_uart.h"

int dam_app_start(void)
{
  uart_dbg_init(); /* Uart setup. */
  
  qapi_Timer_Sleep(1, QAPI_TIMER_UNIT_USEC, true);
  UART_DBG("Module running\n\r");
  return 0;
}

Make GCC work

For some reason I don't know yet, the builds produced by GCC do not work.
They compile fine and a quick inspection of the generated file shows no obvious problems and yet when one tries to use it the module gets bricked and a hard reset is required (which makes trial and error debugging quite a challenge).
However, the problem is definitely not with objcopy since when used with the elf generated using armcc it generates exactly the same result as fromelf (md5sum match).
So there must be something wrong with the generated code.
Can't validate linking since the object files generated by armcc don't work with normal ld.

make upload results "Bad Command"

I am trying to use this package to check if could program the SIM7000,
after struggling for couple of days here there I got everything running but last step :

make upload - Bad Command.

Using:
linux Ubuntu 18.4.1
QMake version 3.1; using QT version 5.11.1 /opt/qt5/lib(i build it)
UPLOAD_DEV=dev/ttyUSB0
ls /dev/ttyUSB* : /devUSB0 /devUSB0 /devUSB1 /devUSB2 /devUSB3 /devUSB4
lsusb : Bus 001 Device 003 ID 1e0e:9001 Qualcomm / Option

copied serial library to project directory
i don't know what else i am missing

AT command necessary for location example to work?

Is the location example supposed to work out-of-the-box? I noticed that my location tracking callback never gets called, unless I manually enable GNSS/GPS with AT+CGNSPWR=1. Is that the same behavior you're seeing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.