You are reading a single comment by @michael_101 and its replies. Click here to read the full conversation.
  • Hello again,
    Still testing this module https://raw.githubusercontent.com/esprui­no/EspruinoDocs/sim808/devices/SIM900.js­

    I don't know if this related to the request timeout but I'm posting data every 10 minutes, at first this works ok, but when I got {"code":-15,"message":"no response"} response so after 10 minutes, the next request will begin with this error message.

    Uncaught Error: 0, CONNECT OK already registered
     at line 1 col 44
    if(h[a])throw Error(a+" already registered");h[a]=b
                                               ^
    in function "registerLine" called from line 1 col 174
    ...CONNECT FAIL'),socks[a]=!0}),at.registerLine(a+'­, CONNECT FA...
                                  ^
    in function "c" called from line 1 col 25
    g=void 0;var b;c&&(b=c(a))?(g=e,c=b):clearTimeout(d);­void 0=...
                            ^
    in function "g" called from line 2 col 4
    g(f)}b=b.substr(a+1);if(p&&d)return q("");"\n"==b[0]&&(b=b.s...
       ^
    in function called from system
    

    It might work, but over time after couple requests this getting worse and the majority of the responses are 'no response' with the error above.

    What I'm trying to establish for now is to find the best way for stable connection and requests so I can continue my project knowing I have reliable way dealing with this.

    All test I did are when there is a good cellular signal.

    I tried those 2 scenarios with same results:
    1:

    • gprs = require('https://.../devices/SIM900.js')­.connect(Serial1... - ONCE
    • gprs.connect('', '', '', (err)... - ONCE
    • gprs.getIP((err, ip) - ONCE
    • require("http").request(options, (res) - EVERY 10 MINUTES

    2:

    • gprs = require('https://.../devices/SIM900.js')­.connect(Serial1... - ONCE
    • gprs.connect('', '', '', (err)... - EVERY 10 MINUTES
    • gprs.getIP((err, ip) - EVERY 10 MINUTES
    • require("http").request(options, (res) - EVERY 10 MINUTES
    • "AT+CIPSHUT" command (deactivate gprs) - EVERY 10 MINUTES

    Your help is greatly appreciated..
    Michael.

About

Avatar for michael_101 @michael_101 started