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
DAM/MDM9206 SDK Example and compile instructions #39
Comments
Everything should be here. |
Yes I saw that folder and also played around with it, but I can't get it to compile using default clang. // EDIT: |
Hmmm not sure, sorry. I honestly haven't tried it yet. I've been super busy with other stuff like adding FTP functions and tutorial. Oh, by the way, SIMCom told me "regarding sim7000E module, we don't suggest you to develop c code and run inside module". I guess that means don't use DAM on SIM7000E. Not exactly sure why lol. |
Being unable to run my code directly inside the module really was the biggest reason why I choose Simcom modules in the first place. |
A SIM7000A user told me that apparently there are some SDK examples here. Here's what he said works:
|
Thanks, this will definitely help me in the future, but for now, I am nowhere close to having something I could download to the module. I need to compile the example code and if possible I'd like to use a free compiler for it (not the ARM one). Qualcomm seems to provide a llvm based one but I could not find any place to download it. I'll get a trial license for the arm compiler and I might even get the initial implementation done within the trial period, but later bug fixing will be quite a challenge if I need to get a new trial license anytime I need to fix a bug. // EDIT: In case I get everything working, would you merge a PR containing samples and build files for this kind of use case? //EDIT2: Using a trial license from arm compiling worked fine (at least I think so since there were no errors. I can't really test it since my modules are still in postage :( ) |
So I finally have my modules and could play around with them a little bit.
None of which resulted in any output on UART3. EDIT: Nevermind, I got it working using the demo from SimcomHub. |
Hi, I can not able download the SDK from here: https://techship.com/news/software-development-kit-now-available-for-simcom-sim7000-series-lte-cat-m-nb-iot -GSM-cellular-modules / |
Well done @Thalhammer getting this to work, your experience with it seems rather painful - my initial steps in getting started with this have been similar, in that Qualcomm isn't really maker-friendly. Do you have a gist or a write-up posted somewhere of all the (working) downloads necessary to get set up promptly? Since the license is so short-lived, it would be great to be able to get set up quickly. |
@blazczak Hi, Even with this though its far from User friendly. |
Thanks, I got that link from Timothy already. The repo has code but no supporting software I don't think. Do you have a list of prerequisite downloads to get started? It would be great for folks starting out, like me. |
For which platform do I need the gcc cross compiler to get that working? |
@blazczak @tschloeter You need to get the arm cross compiler, as the SIM7000 uses a cortex-a7. |
Great, thanks for your reply. I will try |
@tschloeter |
It's a project for my personal purposes with no commercial background. What I am hoping to do with DAM is creating a lightweight interface protocol between SIM7070G and my microcontroller. Talking AT protocol and having to configure all MQTT registers using AT cleartext ASCII commands takes a lot of resources on the microcontroller. If possible I would like to offload most of the MQTT logic into the SIMCom Module itself and only send values to the chip. Also I don't like the AT protocol as it does not provide a data length on URCs for example. If you receive a response from an MQTT subscription you never know if you are still reading the response or the next URC. So, it would be easy to inject code into an MQTT response. If I could parse the MQTT responses directly in C code on the SIMcom module and only return values I am interested in, data security would be much higher. As I have not yet finished my HW design: Do you have a suggestion of a better-suited hardware module that can do LTE-M, GNSS and MQTTS? EDIT: |
The Quectel modules use a very similar chip (In fact some of my sources is based on derived quectel sdks, so they are certainly an alternative). Mqtts is one of the problems I mean. It checks the certificate time against the current time of the builtin rtc. However the api to set a time for this rtc is either broken or not implemented (its not in any header and if you try to directly call the api it just crashes the module), so that time will always be 1970 + module uptime. So you either need a cert thats valid for this timeframe or you need to disable certificate validation (which effectively breaks ssl) or compile in a custom build of ssl+mqtt which takes its time from a different source (like ntp or gps). |
Ok, and have you already tried one from Quectel whether they have a better software quality? |
Unfortunately not, however there is a platform.io framework for them and if I remember correctly they definitly had a way better documentation. I don't know if they have better firmware though. |
@Thalhammer @tschloeter In that case I guess I should count myself as "lucky" since I've received all of two responses from them. 😃 Each of the responses was anonymous and without any signature or mention of title within the company: "please tell us where is your company.and more about your company information" and "hi Sir We do not support SIM7100 use embedded application now,if you Just for personal interest thanks". So basically my experience with that company has been essentially equal to yours. heh I'm sitting on a few different modules (7000G, 7100A, 7600A-H) on various PCBs, and so far my experience has been painful as well. I was actually planning to purchase more of the 7100s but I am now waiting to see how usable they are first. Because the AT interface is so unusable my primary goal behind wanting to compile my own firmware for 7100X has been to implement a simple app running on the module that would serve as an encrypted communication tunnel to an HTTP(S) or MQTT(S) server forwarding incoming bytes on its RX and returning bytes from the server on its TX with minimal initial configuration (client_id, keys, certificates on module; stuff which is already configurable through the AT interface or the QPST tool); essentially replacing the cumbersome AT interface on one of the UART/USB ports. This way you can skip all of that AT silliness and just send/receive bytes from/on your microcontroller/SBC, and re-use this firmware for various projects requiring a connection with a server. In normal circumstances this should be easy to do. Before you completely switch context to other projects @Thalhammer, based on what you've seen with their API so far, how easy do you think this would be to implement given the hurdles and bugs you had uncovered? As a side note, I'm wondering if with all of these issues you're describing these modules are even able to come close to the advertised speeds (50Mbps uplink for SIM7100X, for example) over the software interface alone, before network speed variations. If all of the above fails, I'd be happy to take recommendations on what brand+module or brand to purchase to get a better and more reliable out-of-the-box LTE connectivity experience. |
I have currently ordered some Quectel BG96 modules to evaluate them. I could share my experiences here if you are interested. They are going to arrive in CW13. |
Yeah should be doable, SSL might be a bit problematic though due to the issues I outlined above. You might have to disable certificate checks or check them yourself.
It's not that the api would be slow or that the module would not perform as advertised. In fact if it works, it works really good. The problem is getting it to work in the first place which can be really fragile. E.g. in the early days I had an issue where I printed a string to console and the length of the string resulted in the module not booting or working fine (it turned out a section had to be a multiple of 4 in size and depending on the string size it was or was not). Stuff like that is easily fixed once you know it, but it took me for ages to figure out, simple because theres no usable documentation about this stuff. That said I highly doubt you'd need 50Mbit/s since you'd need to use usb to push this bitrate to the chip and there are better options if you already have usb. @tschloeter I'd be interested in this as well. |
I would love to hear what you think of them :-) |
With 375Kbps down and 375Kbps up it's too narrow-band for my needs, but it will def be good to hear your folks' experiences with other manufacturers' modules. |
Sounds good, I wonder if I could use the mobile network time or an RPi-based RTC to seed it. Last resort I'll just do an end-to-end encryption over a non-TLS connection.
Thanks for the info, the work you've put in reverse-engineering the firmware and time spent maintaining your repo @Thalhammer With little to no support from simcom and the firmware API resembling a minefield due to the number of bugs/issues, such documentation work is invaluable to your fellow makers. |
In my case not an issue as my application's main processor is an ATSAMC21 with some kBytes of RAM. I wouldn't know where to go with all that bandwidth and decided to go for an LTE Cat M device to take advantage of its (theoretically) better network coverage. Anyway I think Quectel is using quite similar controllers throughout their portfolio, so you should be able to find a comparable broadband chip. However I found that for hobbyists the Quectel modules seem harder to solder as they are using BGA connections in most modules. Indeed you can find layout-compatible modules for 2G, 3G and LTE so you can just swap the chip in your existing design and reuse your PCB which is really great to try out different technologies. |
The issue is not that you cant get an accurate time. The issue is you cant supply it to the ssl implementation provided by the firmware. Since all the memory is writable, one could probably patch this, however you would have to reverse the firmware to do so. If you compile your own ssl stack (like libressl) and your own mqtt library (the builtin can not use ssl callbacks) it's not an issue as well, as you can just supply your own function to get the time. There are actually multiple sources to get the time:
I did an application using this chip for my bachelors degree (complete with custom pcb and both server/client code).
This worked pretty well for my use case. You might want to switch RTC and NTP cause I have no idea how stable the RTC is.
I believe theres some code scattered around my pcs which is not yet in the repo, but I am not sure anymore what of it worked and what did not.
I'd highly recommend double checking this. Our network claimed the same and at some point it might actually be true, however in reality at the time I started there was not a single Cat-M network available in my area and about 10 months ago EDGE coverage was still way better than both Cat-M and Nb-Iot. So even if you have a Cat-M network at your place, I'd highly recommend a module that supports EDGE as well if you want broader/global coverage. Note that the sim card needs to support this as well. |
True. Not knowing a lot of LTE-M and NB1, I bought an eval board for an NB1/Cat M/2G board and wondered that I could only get access to 2G with my SIM (it was Telefonica / O2 Germany). Cat NB1 seems to be reserved for B2B at least in Germany. I could not manage to get a SIM from any provider to test it because they strictly sell to business partners. Anyway the data rate of NB1 could be sufficient for my needs but the data plans would be much too expensive if you do not earn money with the data. Anyway I think as with every new technology there is always a tradeoff between chance and risk. I think I will use a 2G / LTE-M capable module and see if the LTE-M coverage will get better over time. Vodafone Germany have started their first steps in LTE-M three weeks ago as I have read. |
I have today received my Quectel BG96 modules and as promised let me tell you my first results: MQTTS works out of the box. Configured, uploaded CA cert, connected. Also I have tried out their native API (called QuecOpen). Using PlatformIO as an IDE I was able to execute my first Hello World app within 2 hours. They have a community containing very useful information. Most of the APIs are available by kindly asking or some of them on GitHub. Multiple firmware branches providing different APIs are available. Tons of useful tools for flashing, developing and maintenance are available through the community. I will give their modules a try in my projects. |
Are there instructions about how to compile and link DAM applications for SIM7000 without having to buy the multi-thousand dollar ARM IDE?
Compiler GCC or Clang?
Simple makefile for demo code?
The text was updated successfully, but these errors were encountered: