sim900 | Golang package for SIM900 GSM Modem | SMS library

 by   argandas Go Version: Current License: No License

kandi X-RAY | sim900 Summary

kandi X-RAY | sim900 Summary

sim900 is a Go library typically used in Messaging, SMS, Xiaomi applications. sim900 has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

This package uses a serialport to communicate with the SIM900 GSM Modem.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              sim900 has a low active ecosystem.
              It has 21 star(s) with 6 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 0 have been closed. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of sim900 is current.

            kandi-Quality Quality

              sim900 has 0 bugs and 0 code smells.

            kandi-Security Security

              sim900 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              sim900 code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              sim900 does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              sim900 releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 347 lines of code, 23 functions and 3 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed sim900 and discovered the below as its top functions. This is intended to give you an instant insight into sim900 implemented functionality, and help decide if they suit your requirements.
            • Closes a port
            • New returns a new port900 .
            Get all kandi verified functions for this library.

            sim900 Key Features

            No Key Features are available at this moment for sim900.

            sim900 Examples and Code Snippets

            No Code Snippets are available at this moment for sim900.

            Community Discussions

            QUESTION

            Facing difficulty in using typedef on a function.....getting error "redeclared as different kind of symbol"
            Asked 2021-Nov-23 at 11:53

            UART_ATMEGA328.h

            ...

            ANSWER

            Answered 2021-Nov-23 at 11:53

            You have a conflict between a function name and a type name. Nothing reasonable (ugly macros are not reasonable) can be done to resolve it.

            I suggest selecting a new name for the types. Like adding _cb or _f suffix (abbreviated from "callback" or "function").

            A minor tweak. Consider making types for the functions, not the function pointers. It makes type declaration more digestible, especially when the function pointer is passed as a parameter or returned. Moreover, it does not hide the pointer in typedef.

            Source https://stackoverflow.com/questions/70079334

            QUESTION

            SIM800L GSM Module working with http and shows error with https, why?
            Asked 2020-Nov-18 at 12:34

            I'm trying to send some sensor data to MySQL database using Arduino and sim800l GSM module. And it's working perfectly when I use HTTP for the URL and remove the SSL certificate from my website. But when I have enabled the SSL certificate on my website it shows HTTP response code 606 in the serial monitor. Here is my working code without SSL certificate(this code works perfectly)

            ...

            ANSWER

            Answered 2020-Nov-18 at 12:34

            I have figured out it finally, It happens because this sim800 only supports TLS 1.0. But it's a deprecated version and many websites and host services have disabled it. You can check your server SSL version from here cdn77.com/tls-test

            Source https://stackoverflow.com/questions/62950561

            QUESTION

            Arduino Sim900 AT+SAPBR=1,1 --> Operation not allowed
            Asked 2020-Jul-31 at 16:34

            I am using an Arduino Mega and a Sim900 GSM/GPRS shield to make a request against an API.

            During my initialization of my request the command AT+SAPBR=1,1 is executed. Sometimes, when I execute the shield returns OK, sometimes the shield returns "Operation not allowed", but I changed nothing compared to the working code.

            ...

            ANSWER

            Answered 2020-Jul-31 at 16:34

            Just as an introduction, we may say that AT+SAPBR command, as described in SIM900 AT Commands guide, is used to configure and to activate the PDP context (data traffic).

            In particular, the meaning of AT+SAPBR=1,1 is

            = 1 - Open bearer
            = 1 - Bearer profile identifier

            From you code

            Source https://stackoverflow.com/questions/63187583

            QUESTION

            AT Commands HTTP request to JSON source with status 200 but empty response
            Asked 2020-Jul-24 at 14:02

            I am working with an Arduino Mega and a SIM900 GSM/GPRS shield to make a get request against my own API.

            I am using the following AT Commands, the module executes the request, but I receive a 200 response code without a body/response.

            Here is my code:

            ...

            ANSWER

            Answered 2020-Jul-24 at 14:02
            TL;DR

            Configure the accepted content type with

            Source https://stackoverflow.com/questions/63014821

            QUESTION

            MEGA and SIM900 ERROR when trying to post using "AT+HTTPACTION=1"
            Asked 2020-May-01 at 09:20

            I have a SIM900 module connected to an Arduino MEGA, everything works fine except when I try to make a post request, it keeps showing ERROR after the AT+HTTPACTION=1 command is executed, by the SIM900 manual that ERROR message is related to "Mobile Equipment functionality". It worked perfectly but now it keeps showing that annoying ERROR.

            This is my code: (I put a fake server address but mine works fine, I have tested it with postman)

            ...

            ANSWER

            Answered 2020-Apr-30 at 09:54

            QUESTION

            Why does Arduino mega and SIM900 won't send message if I input/read to serial monitor, different phone numbers?
            Asked 2020-Mar-14 at 14:47

            I am new to arduino and gsm sim900, and I currently working with the project when student scan their barcode it will input attendance to database and send sms to their guardians. My issue is when I try to input different numbers like "serial.available" and "readString(phonenumber)" it wont send a message, I get no errors and the sim have e-load/. Sorry for bad grammar. Here is the code:

            ...

            ANSWER

            Answered 2020-Mar-06 at 09:24

            If you read the SoftwareSerial Library documentation, you will noticed it said:

            The library has the following known limitations:

            Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).

            So change your line on SoftwareSerial SIM900A(6,7); to something else than pin 6 and 7.

            Source https://stackoverflow.com/questions/60544317

            QUESTION

            What does "CID" mean in AT+HTTPPARA="CID",1
            Asked 2020-Feb-13 at 19:10

            I am having trouble with getting a SIM900 modem to work with HTTP requests from an Arduino using AT commands. It's currently giving me the message "ERROR" when I run 'AT+HTTPPARA="CID",1'.

            My Arduino code is as follows:

            ...

            ANSWER

            Answered 2020-Feb-13 at 18:03

            It sets the bearer profile ID of the connection.

            With these commands

            Source https://stackoverflow.com/questions/60213845

            QUESTION

            Arduino UNO + SIM800L - sending data to server
            Asked 2020-Jan-27 at 15:42

            I am using arduino UNO board, with modem sim800l. I want use it to send data to server mysql every 10 seconds. Everything is working fine when I have serial monitor open in arduino IDE (data is being saved to the mysql database)but when serial monitor is off then does not work.

            I want use my system remote, connected to the powerbank. But it works only when I have opened arduino IDE serial monitor.

            How to edit the code so that the microcontroller works without connecting to a computer and an open serial monitor?

            ...

            ANSWER

            Answered 2020-Jan-27 at 15:42

            I'm not sure about the underlying implementation of Serial however there may be some kind of an infinite wait for the Serial.println() that is happening.

            And reading the documentation on Serial.flush() it appears that it may also be the cause of an infinite wait for the serial output to finish before it returns.

            Since Serial.println() seems to use the Serial.write() functionality to do its thing I would suppose that if you have no device reading from the serial port at some point the write buffer is getting full and causing the Serial.println() to block. See https://www.arduino.cc/reference/en/language/functions/communication/serial/write/

            Notes and Warnings

            As of Arduino IDE 1.0, serial transmission is asynchronous. If there is enough empty space in the transmit buffer, Serial.write() will return before any characters are transmitted over serial. If the transmit buffer is full then Serial.write() will block until there is enough space in the buffer. To avoid blocking calls to Serial.write(), you can first check the amount of free space in the transmit buffer using availableForWrite().

            See this explanation of the Serial.flush() function https://www.arduino.cc/reference/en/language/functions/communication/serial/flush/ which notes:

            Serial.flush()

            Description

            Waits for the transmission of outgoing serial data to complete. (Prior to Arduino 1.0, this instead removed any buffered incoming serial data.)

            flush() inherits from the Stream utility class.

            And see this article, https://www.baldengineer.com/when-do-you-use-the-arduinos-to-use-serial-flush.html which says"

            What does Serial.flush() do?

            From the Arduino reference for Serial.flush (found on this page):

            Waits for the transmission of outgoing serial data to complete.

            The key to that statement is “outgoing”. Serial.flush() doesn’t empty the “incoming” buffer as many people think. It pauses your program while the transmit buffer is flushed.

            I would use the Serial.availableForWrite() function before doing any output using Serial.println() and if the number of bytes available indicates that the write buffer is getting full then skip the output.

            Probably the best approach would be as part of the Setup() function to check the write buffer size after doing the Serial.begin() and store that in a global variable which you then use to check to see if the write buffer is getting emptied or not.

            See https://www.instructables.com/id/Arduino-Serial/ which has this to say:

            Step 3: Command : ​ AvailableForWrite()

            Description

            Get the number of bytes (characters) available for writing in the serial buffer without blocking the write operation.

            Syntax

            Serial.availableForWrite()

            See also https://www.arduino.cc/reference/en/language/functions/communication/serial/availableforwrite/

            There is also if (Serial) which can be used to check if the port is available. https://www.arduino.cc/reference/en/language/functions/communication/serial/ifserial/ however I suspect that it is more of a check that the requested port is available rather than whether the port is actually functioning with a device on the other end of the link.

            And there is also the Serial.available() https://www.arduino.cc/reference/en/language/functions/communication/serial/available/

            Serial.available()

            Description

            Get the number of bytes (characters) available for reading from the serial port. This is data that’s already arrived and stored in the serial receive buffer (which holds 64 bytes).

            Serial.available() inherits from the Stream utility class.

            Syntax

            Serial.available()

            Parameters

            Serial: serial port object. See the list of available serial ports for each board on the Serial main page.

            Returns

            The number of bytes available to read.

            Suggested course of action

            First of all, I don't see that the Serial.flush() in the Setup() function is necessary and it could be safely removed. While this makes the console output immediate during the Setup() it does introduce a wait for the remote case in which there is no device reading from the serial line to empty the output buffer.

            I also suggest that for each line you do Serial.println() you do a check on the number of bytes of buffer available with Serial.availableForWrite() first as in:

            Source https://stackoverflow.com/questions/59911634

            QUESTION

            Can't connect or publish to MQTT broker with Arduino and SIM900
            Asked 2020-Jan-16 at 10:32

            I have written a simple sketch to send a connect and publish packet to a cloudMQTT server. I get no errors back from the SIM900 but nothing shows up on the cloudMQTT dashboard.

            ...

            ANSWER

            Answered 2020-Jan-16 at 10:32

            So it was not working when trying to connect to the cloudMQTT server, but when I connected to my MQTT server or the test MQTT server, it worked. There must be an issue dealing with the protocol that the cloud mqttServer uses (MQIsdp) as apposed to the standard MQTT protocol that a normal MQTT server utilizes. I made a change to the connect packet so that it specified the MQTT protocol and pointed the TCP connection to the test server ( test.mosquitto.org ) and I can now Connect and Publish successfully.

            For anyone who is just starting out with trying to interface an Arduino with a module like a SIM900 ( GPRS/GSM module ) to a MQTT server, I suggest you grasp a full understanding of standard AT Commands ( To establish a solid TCP connection to server ), how to compile the packets that will be sent through the GPRS module from the Arduino and lastly I suggest not using any code you have not written to achieve this. Learn how to establish the TCP connection with AT commands, then learn how to compile and send a connect packet by compiling the byte array yourself and sending it. Once you understand the packets and the communication between the client and the server, the MQTT world is your oyster.

            You can use this code as a guideline but please try write as much of your own as possible:

            Source https://stackoverflow.com/questions/59751887

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install sim900

            You'll need Golang v1.3+
            SIM900 Package uses the serial package in order to communicate with the modem via AT commands, you will need to install both SIM900 and serial packages.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/argandas/sim900.git

          • CLI

            gh repo clone argandas/sim900

          • sshUrl

            git@github.com:argandas/sim900.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular SMS Libraries

            easy-sms

            by overtrue

            textbelt

            by typpo

            notifme-sdk

            by notifme

            ali-oss

            by ali-sdk

            stashboard

            by twilio

            Try Top Libraries by argandas

            goduino

            by argandasGo

            ardubson

            by argandasC++

            stm32_cli

            by argandasC

            serialEEPROM

            by argandasC++