State Machine based serial interface to SM5100b shield in Python

Ever since I got TCP data rx/tx working on the SparkFun SM5100b GSM/GPRS shield I have been prepping for the next step which is to get HTTP GET requests working. The problem I seem to be having here is that the HTTP server disconnects the TCP connection immediately after sending the response to the GET request, and I am not able to transfer the TCP data received using the AT command after the TCP connection has been disconnected.

Yesterday I finally got a state machine based serial interface written in Python working. The input to the Python script is a state machine description written in a YAML file.

Dummy Shimmy

Here is the script:

And here is a very simple YAML state machine file for the boot up sequence:

Coding up something equivalent for the Arduino will be a pain.