• I rewritten things entirely from scratch.... also with use of promises.
    However, the error still occurs...
    My question is whether the SIM900 receives the response string as a whole?
    In the JSON response I see a AT-Command-Response (+RECEIVE,0,940:) in middle of the string.
    Can this be a problem? I do not see the end of the JSON-String, so my assumption is the missing characters were subtracted by the length of the AT-Response in middle.
    Can I fix this myself?

    $http(sampleGetReq).then(function(data){
    : // success
    : console.log('success', data);
    :});
    ={ }

    OK

    0, CONN
    ECT OK

    0, S
    END OK

    +RECEIVE,0,
    1380:
    HTTP/1.1 200 OK
    Date: Thu, 28 Jul 2016 22:25:00 GMT
    Content-Type: application/vnd.carriots.v2+json; charset=utf-8
    Connectio
    n: close
    Server: Carriots REST API
    Cache-Control: no-cache
    Allow: GET, POST
    Access-Control-Allow-Origin: *
    Access-Control-Allow-Credentials: true
    Access-Control-Expose-Headers: Date,Server,Allow,Connection,Content-Length,Content-Type,Cache-Control
    {"total_documents"
    :6,"result":[{"_id":"579842a25c5d7550425376e3","protocol":"v2","checksum":"","_t":"str","at":1469596322,"device":"Commander@afitterling.afitterling","data":{"time":1,"cycle":1},"id_developer":"185c0dde8b7c9df29d122b25d85fce1c26ad7645ed021f5c611fe4115132f4f8@afitterling.afitterling","created_at":1469596322,"owner":"afitterling"},{"_id":"579842ae5c5d752b45537679","protocol":"v2","checksum":"","_t":"str","at":1469596334,"device":"Commander@afitterling.afitterling","data":{"time":1,"cycle":1},"id_developer":"6c49c7f8cae5845cacd060ff93edb189517f691a47dbe4817a831869d3f
    e8ca7@afitterling.afitterling","created_at":1469596334,"owner":"afitterling"},{"_id":"579842b85c5d75e1425376cc","protocol":"v2","checksum":"","_t":"str","at":1469596344,"device":"Commander@afitterling.afitterling","data":{"time":1,"cycle":1},"id_developer":"91df2481ae379b2c25fc485c6de961efea091aab3a4823853a17a22cd1feac52@afitterling.afitterling","created_at":1469596344,"owner":"afitterling"},{"_id":"579842d
    +RECEIVE,0,940:
    95c5d7599295379f1","protocol":"v2","checksum":"","_t":"str","at":1469596377,96387,"d
    evice":"Commander@afitterling.afitterling","data":{"timex":1,"cylce":1},"id_developer":"20ed81b80c70b058cff3d1f339d8558cc00fc1dbf32fd193bde61b83c0185f72@afitterling.afitterling","created_at":1469596387,"owner":"afitterling"},{"_id":"579842f05c5d7550425376ea","protocol":"v2","checksum":"","_t":"str","at":1469596400,"device":"Commander@afitterling.afitterling","data":{"timex":1,"cylce":1},"iddeveloper":"a281efa90907e5e8ff7f6a4fe1afadcd23e746a717a8b7610ab459f8ab538258@afitterling.afitterling","created

    0, CLOS
    ED

    the next call then will get stuck then.

    kind regards,
    Alex

About

Avatar for sp33c @sp33c started