UART stutters on startup

The SparqEE CELLv1.0 device.
User avatar
donjohnii
Site Admin
Posts: 686
Joined: Tue Jul 30, 2013 2:19 pm

Re: UART stutters on startup

Postby donjohnii » Tue May 02, 2017 10:28 pm

Little pickle - here's what ZTE said:

1,I test it and works well
2,Please tell me your software version
3,I do not konow what means about networked AT commands and internal AT commands
4,Could please you test it with ZTE G2000 development kit


I'm not sure how far we're going to get with them on this command... I would seriously suggest just moving forward with the network portion of it and troubleshoot if the prod idea is affected by a similar issue.

Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm

Re: UART stutters on startup

Postby Miq1 » Tue May 02, 2017 11:14 pm

I will try today and report the outcome. I would suggest, though, to check the recent firmware version ZTE is using. I suppose it will be different from the one currently deployed in the Cell and may have some bugs fixed.

Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm

Re: UART stutters on startup

Postby Miq1 » Wed May 03, 2017 3:07 am

Bad news. The network data is missing parts as well. I used jsonplaceholder.typicode.com/users as constant data source. The data as it is supposed to be is this:

Code: Select all

[
  {
    "id": 1,
    "name": "Leanne Graham",
    "username": "Bret",
    "email": "Sincere@april.biz",
    "address": {
      "street": "Kulas Light",
      "suite": "Apt. 556",
      "city": "Gwenborough",
      "zipcode": "92998-3874",
      "geo": {
        "lat": "-37.3159",
        "lng": "81.1496"
      }
    },
    "phone": "1-770-736-8031 x56442",
    "website": "hildegard.org",
    "company": {
      "name": "Romaguera-Crona",
      "catchPhrase": "Multi-layered client-server neural-net",
      "bs": "harness real-time e-markets"
    }
  },
  {
    "id": 2,
    "name": "Ervin Howell",
    "username": "Antonette",
    "email": "Shanna@melissa.tv",
    "address": {
      "street": "Victor Plains",
      "suite": "Suite 879",
      "city": "Wisokyburgh",
      "zipcode": "90566-7771",
      "geo": {
        "lat": "-43.9509",
        "lng": "-34.4618"
      }
    },
    "phone": "010-692-6593 x09125",
    "website": "anastasia.net",
    "company": {
      "name": "Deckow-Crist",
      "catchPhrase": "Proactive didactic contingency",
      "bs": "synergize scalable supply-chains"
    }
  },
  {
    "id": 3,
    "name": "Clementine Bauch",
    "username": "Samantha",
    "email": "Nathan@yesenia.net",
    "address": {
      "street": "Douglas Extension",
      "suite": "Suite 847",
      "city": "McKenziehaven",
      "zipcode": "59590-4157",
      "geo": {
        "lat": "-68.6102",
        "lng": "-47.0653"
      }
    },
    "phone": "1-463-123-4447",
    "website": "ramiro.info",
    "company": {
      "name": "Romaguera-Jacobson",
      "catchPhrase": "Face to face bifurcated interface",
      "bs": "e-enable strategic applications"
    }
  },
  {
    "id": 4,
    "name": "Patricia Lebsack",
    "username": "Karianne",
    "email": "Julianne.OConner@kory.org",
    "address": {
      "street": "Hoeger Mall",
      "suite": "Apt. 692",
      "city": "South Elvis",
      "zipcode": "53919-4257",
      "geo": {
        "lat": "29.4572",
        "lng": "-164.2990"
      }
    },
    "phone": "493-170-9623 x156",
    "website": "kale.biz",
    "company": {
      "name": "Robel-Corkery",
      "catchPhrase": "Multi-tiered zero tolerance productivity",
      "bs": "transition cutting-edge web services"
    }
  },
  {
    "id": 5,
    "name": "Chelsey Dietrich",
    "username": "Kamren",
    "email": "Lucio_Hettinger@annie.ca",
    "address": {
      "street": "Skiles Walks",
      "suite": "Suite 351",
      "city": "Roscoeview",
      "zipcode": "33263",
      "geo": {
        "lat": "-31.8129",
        "lng": "62.5342"
      }
    },
    "phone": "(254)954-1289",
    "website": "demarco.info",
    "company": {
      "name": "Keebler LLC",
      "catchPhrase": "User-centric fault-tolerant solution",
      "bs": "revolutionize end-to-end systems"
    }
  },
  {
    "id": 6,
    "name": "Mrs. Dennis Schulist",
    "username": "Leopoldo_Corkery",
    "email": "Karley_Dach@jasper.info",
    "address": {
      "street": "Norberto Crossing",
      "suite": "Apt. 950",
      "city": "South Christy",
      "zipcode": "23505-1337",
      "geo": {
        "lat": "-71.4197",
        "lng": "71.7478"
      }
    },
    "phone": "1-477-935-8478 x6430",
    "website": "ola.org",
    "company": {
      "name": "Considine-Lockman",
      "catchPhrase": "Synchronised bottom-line interface",
      "bs": "e-enable innovative applications"
    }
  },
  {
    "id": 7,
    "name": "Kurtis Weissnat",
    "username": "Elwyn.Skiles",
    "email": "Telly.Hoeger@billy.biz",
    "address": {
      "street": "Rex Trail",
      "suite": "Suite 280",
      "city": "Howemouth",
      "zipcode": "58804-1099",
      "geo": {
        "lat": "24.8918",
        "lng": "21.8984"
      }
    },
    "phone": "210.067.6132",
    "website": "elvis.io",
    "company": {
      "name": "Johns Group",
      "catchPhrase": "Configurable multimedia task-force",
      "bs": "generate enterprise e-tailers"
    }
  },
  {
    "id": 8,
    "name": "Nicholas Runolfsdottir V",
    "username": "Maxime_Nienow",
    "email": "Sherwood@rosamond.me",
    "address": {
      "street": "Ellsworth Summit",
      "suite": "Suite 729",
      "city": "Aliyaview",
      "zipcode": "45169",
      "geo": {
        "lat": "-14.3990",
        "lng": "-120.7677"
      }
    },
    "phone": "586.493.6943 x140",
    "website": "jacynthe.com",
    "company": {
      "name": "Abernathy Group",
      "catchPhrase": "Implemented secondary concept",
      "bs": "e-enable extensible e-tailers"
    }
  },
  {
    "id": 9,
    "name": "Glenna Reichert",
    "username": "Delphine",
    "email": "Chaim_McDermott@dana.io",
    "address": {
      "street": "Dayna Park",
      "suite": "Suite 449",
      "city": "Bartholomebury",
      "zipcode": "76495-3109",
      "geo": {
        "lat": "24.6463",
        "lng": "-168.8889"
      }
    },
    "phone": "(775)976-6794 x41206",
    "website": "conrad.com",
    "company": {
      "name": "Yost and Sons",
      "catchPhrase": "Switchable contextually-based project",
      "bs": "aggregate real-time technologies"
    }
  },
  {
    "id": 10,
    "name": "Clementina DuBuque",
    "username": "Moriah.Stanton",
    "email": "Rey.Padberg@karina.biz",
    "address": {
      "street": "Kattie Turnpike",
      "suite": "Suite 198",
      "city": "Lebsackbury",
      "zipcode": "31428-2261",
      "geo": {
        "lat": "-38.2386",
        "lng": "57.2232"
      }
    },
    "phone": "024-648-3804",
    "website": "ambrose.net",
    "company": {
      "name": "Hoeger LLC",
      "catchPhrase": "Centralized empowering task-force",
      "bs": "target end-to-end models"
    }
  }
]


Via UART I am getting this instead (ZIPRECV lines left in on intent):

Code: Select all

at+zipsend=1

> GET /users HTTP/1.1
Host: jsonplaceholder.typicode.com


+ZIPSEND: 1, 59

OK

+ZIPRECV: 1,104.31.86.157,80,1024,HTTP/1.1 200 OK

Date: Wed, 03 May 2017 10:48:46 GMT

Content-Type: application/json; charset=utf-8

Transfer-Encoding: chunked

Connection: keep-alive

Set-Cookie: __cfduid=dcc9623433c7313f4152577bc730ff4521493808526; expires=Thu, 03-May-18 10:48:46 GMT; path=/; domain=.typicode.com; HttpOnly

X-Powered-By: Express

Vary: Origin, Accept-Encoding

Access-Control-Allow-Credentials: true

Cache-Control: public, max-age=14400

Pragma: no-cache

Expires: Wed, 03 May 2017 14:48:46 GMT

X-Content-Type-Options: nosniff

Etag: W/"160d-1eMSsxeJRfnVLRBmYJSbCiJZ1qQ"

Via: 1.1 vegur

CF-Cache-Status: HIT

Server: cloudF-RAY: 3592a658a5a826cc-FRA



160d

[
  {
    "id": 1,
    "name": "Leanne Graham",
    "username": "Bret",
    "email": "Sincere@april.biz",
    "address": {
      "street": "Kulas Light",
      "suite": "Apt. 556",
      "city": "Gwenborough",
      "zipcode": "92998-3874",
      "geo": {
        "lat": "-37.3159",
        "lng": "81.1496"
      }
    },
    "phone": "1-770-736-8031 x56442"

+ZIPRECV: 1,104.31.86.157,80,436,,
    "website": "hildegard.org",
    "company": {
      "name": "Romaguera-Crona",
      "catchPhrase": "Multi-layered client-server neural-net",
      "bs": "harness real-time e-markets"
    }
  },
  {
    "id": 2,
    "name": "Ervin Howell",
    "username": "Antonette",
    "email": "Shanna@melissa.tv",
    "address": {
      "street": "Victor Plains",
      "suite": "Suite 879",,
      "zipcode": "905

+ZIPRECV: 1,104.31.86.157,80,1024,66-7771",
      "geo": {
        "lat": "-43.9509",
        "lng": "-34.4618"
      }
    },
    "phone": "010-692-6593 x09125",
    "website": "anastasia.net",
    "company": {
      "name": "Deckow-Crist",
      "catchPhrase": "Proactive didactic contingency",
      "bs": "synergize scalable supply-chains"
    }
  },
  {
    "id": 3,
    "name": "Clementine Bauch",
    "username": "Samantha",
    "email": "Nathan@yesenia.net",
    "address": {
      "street": "Douglas Extension",
      "suite": "Suite 847",
      "city": "McKenziehaven",
      "zipcode": "59590-4157",
      "geo": {
        "lat"lng": "-47.0653"
      }
    },
    "phone": "1-463-123-4447",
    "website": "ramiro.info",
    "company": {
      "name": "Romaguera-Jacobson",
      "catchPhrase": "Face to face bifurcated interface",
      "bs": "e-enable strategic applications"
    }
  },
  {
    "id": 4,
    "name": "Patricia Lebsack",
    "username": "Karianne",
    "email": "Julianne.OConner@kory.org",
    "address": {

+ZIPRECV: 1,104.31.86.157,80,436,
      "street": "Hoeger Mall",
      "suite": "Apt. 692",
      "city": "South Elvis",
      "zipcode": "53919-4257",
      "geo": {
        "lat": "29.4572",
        "lng": "-164.2990"
      }
    },
    "phone": "493-170-9623 x156",
    "website": "kale.biz",
    "company": {
      "name": "Robel-Corkery",
      "catchPhrase": "Multi-tiered zero tolerance productivity",
      "bs": "transition cutting-edge web services"
    }
  }

+ZIPRECV: 1,104.31.86.157,80,1024,,
  {
    "id": 5,
    "name": "Chelsey Dietrich",
    "username": "Kamren",
    "email": "Lucio_Hettinger@annie.ca",
    "address": {
      "street": "Skiles Walks",
      "suite": "Suite 351",
      "city": "Roscoeview",
      "zipcode": "33263",
      "geo": {
        "lat": "-31.8129",
        "lng": "62.5342"
      }
    },
    "phone": "(254)954-1289",
    "website": "demarco.info",
    "company": {
      "name": "Keebler LLC",
      "catchPhrase": "User-centric fault-tolerant solution",
      "bs": "revolutionize end-to-end systems"
    }
  },
  {
    "id": 6,
    "name": "Mrs. Dennis Schuleopoldo_Corkery",
    "email": "Karley_Dach@jasper.info",
    "address": {
      "street": "Norberto Crossing",
      "suite": "Apt. 950",
      "city": "South Christy",
      "zipcode": "23505-1337",
      "geo": {
        "lat": "-71.4197",
        "lng": "71.7478"
      }
    },
    "phone": "1-477-935-8478 x6430",
    "website": "ola.org",
    "company": {
      "name": "Considine-Lockman"

+ZIPRECV: 1,104.31.86.157,80,436,,
      "catchPhrase": "Synchronised bottom-line interface",
      "bs": "e-enable innovative applications"
    }
  },
  {
    "id": 7,
    "name": "Kurtis Weissnat",
    "username": "Elwyn.Skiles",
    "email": "Telly.Hoeger@billy.biz",
    "address": {
      "street": "Rex Trail",
      "suite": "Suite 280",
      "city": "Howemouth",
      "zipcode": "58804-1099",
      "geo": {
        "lat": "24.8918",
        "lng": "21.8984"


+ZIPRECV: 1,104.31.86.157,80,1024,      }
    },
    "phone": "210.067.6132",
    "website": "elvis.io",
    "company": {
      "name": "Johns Group",
      "catchPhrase": "Configurable multimedia task-force",
      "bs": "generate enterprise e-tailers"
    }
  },
  {
    "id": 8,
    "name": "Nicholas Runolfsdottir V",
    "username": "Maxime_Nienow",
    "email": "Sherwood@rosamond.me",
    "address": {
      "street": "Ellsworth Summit",
      "suite": "Suite 729",
      "city": "Aliyaview",
      "zipcode": "45169",
      "geo": {
        "lat": "-14.3990",
        "lng": "-120.7677"
      }
    },
    "phone": "586.493.6943 x1cynthe.com",
    "company": {
      "name": "Abernathy Group",
      "catchPhrase": "Implemented secondary concept",
      "bs": "e-enable extensible e-tailers"
    }
  },
  {
    "id": 9,
    "name": "Glenna Reichert",
    "username": "Delphine",
    "email": "Chaim_McDermott@dana.io",
    "address": {
      "street": "Dayna Park",
      "suite": "Suite 449",
      "city": "Bartholomebury",
 

+ZIPRECV: 1,104.31.86.157,80,5,0

There is not only the last section missing completely, but also shorter parts in between. The effect is not as obvious as with the AT+COPN command - I suppose the server sends data just a bit slower so that the internal UART buffering in the Cell is able to catch up better.

So what do you suggest now?

User avatar
donjohnii
Site Admin
Posts: 686
Joined: Tue Jul 30, 2013 2:19 pm

Re: UART stutters on startup

Postby donjohnii » Wed May 03, 2017 10:35 am

It's sort-of bad news in that it's still hiccuping, but it's good news in that it's something much more tangibly debuggable. TCP is not supposed to lose data... so either the module is having problems or the code is wrong on the Arduino.

Have you tried the same thing over USB/putty?

PM me your URL and post the zipopen command, with URL omitted of course. I want to validate you're settings.

Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm

Re: UART stutters on startup

Postby Miq1 » Thu May 04, 2017 12:43 am

Nothing secret with the URL etc. - it is public.

Code: Select all

at+zipopen=1,0,jsonplaceholder.typicode.com,80

then

Code: Select all

at+zipsend=1

finally

Code: Select all

GET /users HTTP/1.1
Host: jsonplaceholder.typicode.com

<CTRL-Z>


I am currently having problems to send the GET request with Putty, I keep getting a "400 Bad Request" answer from the host. The request is the very same I was issuing from the Arduino (where it worked) and the same format sent to other servers is working as well via Putty/Cell on USB.

The typing is a bit tricky as well, as the connection will be closed after a few seconds of inactivity. I have defined some macros in AutoHotKey to solve that, but the GET request seems not to come through correctly.

Code: Select all

:*:&3::at{+}zipopen=1,0,jsonplaceholder.typicode.com,80{Enter}
:*:&4::at{+}zipsend=1{Enter}
:*:&5::GET /users HTTP/1.1 Host: jsonplaceholder.typicode.com{Enter}{Enter}^z

User avatar
donjohnii
Site Admin
Posts: 686
Joined: Tue Jul 30, 2013 2:19 pm

Re: UART stutters on startup

Postby donjohnii » Thu May 04, 2017 11:58 am

trying on putty is hard too because you have to have it formatted perfectly (it's the return statements that are the problem). There's a website I use to encode it properly. I use postman typically to do REST calls but you're correct in trying putty through the modem.

I'll have to break this out because it doesn't really make sense that you're having this issue with a TCP based json call

Here's a very short post on putty:
http://www.forum.sparqee.com/viewtopic.php?f=3&t=829&p=1867&hilit=putty#p1867

Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm

Re: UART stutters on startup

Postby Miq1 » Mon May 08, 2017 12:56 am

Does not change much, I am afraid:

Code: Select all

at+zipopen=1,0,jsonplaceholder.typicode.com,80
OK

+ZIPSTAT: 1, 1
at+zipsend=1
> 47 45 54 20 2f 75 73 65 72 73 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 6a 73 6f 6e 70 6c 61 63 65 68 6f 6c 64 65 72 2e 74 79 70 69 63 6f 64 65 2e 63 6f 6d 0d 0a 0d 0a
+ZIPSEND: 1, 178

OK

+ZIPRECV: 1,104.31.87.157,80,334,HTTP/1.1 400 Bad Request
Date: Mon, 08 May 2017 08:55:12 GMT
Content-Type: text/html
Content-Length: 177
Connection: close
Server: -nginx
CF-RAY: -

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>cloudflare-nginx</center>
</body>
</html>


+ZIPSTAT: 1, 0


What makes me wonder is the fact that this statement from within the Arduino code does the work:

Code: Select all

CellOne.print("GET /users HTTP/1.1\r\nHost: jsonplaceholder.typicode.com\r\n\r\n\032");


It looks like either Putty is garbling things up or the Cell behaves differently on USB than on UART. Both I would consider unlikely, based on the numerous uses of both.

Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm

Re: UART stutters on startup

Postby Miq1 » Wed May 10, 2017 1:45 am

I am sorry to report that I will drop the Cell modules in favour of some cheap SIM808-based GPRS modules. I bought one, connected it and it worked like a charm from the beginning, with auto baud rate and all. No data losses even at 9600 baud, the 18KB of the AT+COPN list were received completely. IP connection is working likewise.

My conclusion is that the UART connection to the Cell is suffering from firmware issues inside the module. My recommendation is to urgently address that to ZTE, and in the meantime better not to use the Cell via UART.

It is a pity there was no solution available.


Return to “CELLv1.0”

Who is online

Users browsing this forum: No registered users and 1 guest