[OpenTRV-dev] OT: need help with a sketch AND pretty DESPERATE
Bo Herrmannsen
EMAIL ADDRESS HIDDEN
Thu Feb 6 21:27:05 GMT 2014
Set up printer
Connecting...
Connected
connected for orders
GET /arduino1.php?sc=1234 HTTP/1.1
Host: 87.51.52.114
Connection: close
Set process Step:
Step: processOrderList State: 0 queue: 0
process incoming
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHTTP/1.1 200 OK
Date: Thu, 06 Feb 2014 21:25:36 GMT
Server: Apache/2.4.4 (Win64) PHP/5.4.12
X-Powered-By: PHP/5.4.12
Set-Cookie: osCsid=qa8jhd10s7d6u8e6t4cbm4kel2; path=/; domain=http://87.51.52.114
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 918
Connection: close
Content-Type: text/html Set parse state.
Step: processOrderList State: 1 queue: 0
[69 1,<*** Recorded order 69
br />72 1,<br />84 1,<br />111 1,<br />125 1,<br />135 1,<br />167 1,<br />169 1,<br />176 1,<br />197 1,<br />205 1,<br />230 1,<br />266 1,<br />366 1,<br />617 1,<br />712 1,<br />844 1,<br />894 1,<br />963 1,<br />964 1,<br />1002 1,<br />1015 1,<br />1041 1,<br />1254 1,<br />1410 1,<br />1475 1,<br />1689 1,<br />1830 1,<br />1843 1,<br />1916 1,<br />1968 1,<br />2090 1,<br />2204 1,<br />2371 1,<br />2727 1,<br />2768 1,<br />2960 1,<br />2961 1,<br />3033 1,<br />3073 1,<br />3187 1,<br />3294 1,<br />3322 1,<br />3416 1,<br />3427 1,<br />3505 1,<br />3515 1,<br />3552 1,<br />3588 1,<br />3612 1,<br />3717 1,<br />3758 1,<br />4030 1,<br />5168 1,<br />5375 1,<br />5433 1,<br />5580 1,<br />5783 1,<br />5824 1,<br />5836 1,<br />5884 1,<br />5912 1,<br />5930 1,<br />6243 1,<br />6244 1,<br />6288 1,<br />6436 1,<br />6556 1,<br />6746 1,<br />6872 1,<br />6975 1,<br />7395 1,<br />OK] Set parse state.
Step: processOrderList State: 0 queue: 1
disconnecting.
Set process Step:
Step: requestPrint State: 0 queue: 1
Connecting...
Connected
*** Print order.
GET /arduino3.php?sc=1234&o=69 HTTP/1.1
Host: 87.51.52.114
Connection: close
Set process Step:
Step: processPrintData State: 0 queue: 0
process incoming
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHTTP/1.1 200 OK
Date: Thu, 06 Feb 2014 21:25:40 GMT
Server: Apache/2.4.4 (Win64) PHP/5.4.12
X-Powered-By: PHP/5.4.12
Set-Cookie: osCsid=potm863d6n4k1bguvcrj61ct25; path=/; domain=http://87.51.52.114
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 548
Connection: close
Content-Type: text/html Set parse state.
Step: processPrintData State: 1 queue: 0
*** START PRINTING ***
l
OOrrddrreennuummmmeerr:: 6699[*** feed[*** feedBBeessttiilltt:: 22000088--1111--0033 2200::2244::5577[*** feed[*** feedBBoo HHeerrrrmmaannnnsseenn[*** feedSSaannddkkæærreett 11,,11,,11[*** feed55226600 OOddeennssee SS[*** feed6600668866661155[*** feed------------------------------------------------------------------------------------[*** feed11 ** 1144.. CChheeeessee -- AAllmm[*** feed11 ** 0033.. AAmmaallffii -- MMeelllleemm[*** feed11 ** CCooccaa--CCoollaa ZZeerroo 11,,55 LLiitteerr[*** feed------------------------------------------------------------------------------------[*** feednnrr 1144 mmeedd eexxttrraa oosstt -- nnrr 33 mmeedd ssppaagghheettttii oogg eexxttrraa oosstt -- BBeeggggee ppiizzzzaaeerr mmeedd hhvviiddlløøgg -- hheenntteerr oomm 3300--4455 mmiinn[*** feed------------------------------------------------------------------------------------[*** feedIIPP:: 8877..5588..99..3300[*** feedUUddbbyyddeerr:: tteellee..ddkk[*** feed------------------------------------------------------------------------------------[*** feed[*** boldOn[*** doubleHeightOnBBeettaalliinnggssmmååddee:: DDaannkkoorrtt eelllleerr kkrreeddiittkkoorrtt[*** boldOff[*** doubleHeightOff Set parse state.
Step: processPrintData State: 0 queue: 0
disconnecting.
*** END PRINTING ***
Set process Step:
Step: reportProcessing State: 0 queue: 0
Connecting...
Connected
Reporting order 69 processed.
connected for print
GET /arduino5.php?sc=1234&o=69&s=processing HTTP/1.1
Host: 87.51.52.114
Connection: close
Set process Step:
Step: processReportData State: 0 queue: 0
process incoming
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHTTP/1.1 200 OK
Date: Thu, 06 Feb 2014 21:25:45 GMT
Server: Apache/2.4.4 (Win64) PHP/5.4.12
X-Powered-By: PHP/5.4.12
Set-Cookie: osCsid=9l9torj7oocrlr2inukc15iig5; path=/; domain=http://87.51.52.114
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 2
Connection: close
Content-Type: text/html
OK Set parse state.
disconnecting.
*** done processing return from reporting progress
waitPollForOrders
Set process Step:
Step: requestOrders State: 0 queue: 0
Den 06/02/2014 kl. 22.09 skrev Damon Hart-Davis:
> Hi,
>
> Is showProcessStep() putting stuff on the serioal output for you to look at?
>
> Rgds
>
> Damon
>
>
> On 6 Feb 2014, at 15:33, Bo Herrmannsen <EMAIL ADDRESS HIDDEN> wrote:
>
>> Still stuck with the code....
>>
>> it can pool an order and print it....
>>
>> but it will not carry on and check for more....
>>
>> and yes i checked that the code arround ip or domain name works
>>
>>
>> but there is what is should do:
>>
>> call arduino1.php and check for waiting orders.... this part works
>>
>> then it should take the first pending order number and call the order data..... this works too
>>
>> then it should print the order..... this partly works.... the order is printed but there is a "1" and a linefeed added before the print... and there is a trailing "B"
>>
>> and it should cut the paper but never get that far
>>
>>
>> once the first order is printed it should wait 30 sec and check for more
>>
>>
>> it does the wait... but it will not discover that there are more orders.... even thou i have 72 orders to play with
>>
>> it check a few times then connection fails for some odd reason
>>
>> even a restart of the ethernet part does not help, the restart will never happen
>>
>>
>> code here: https://github.com/laird/OSCommerceClient/blob/master/OSCommerce/OSCommerce.ino
>>
>> please no debate whatever stuff are right or wrong.... i just want this out the door
>>
>> all i want is that i prints orders and cuts between them
>>
>>
>>
>> Den 03/02/2014 kl. 21.41 skrev Damon Hart-Davis:
>>
>>> Java’s IPAddress class for one is happy to accept numeric form and convert it directly to the internal binary representation in the code without touching DNS.
>>>
>>> Rgds
>>>
>>> Damon
>>>
>>>
>>> On 3 Feb 2014, at 20:00, Stuart Poulton <EMAIL ADDRESS HIDDEN> wrote:
>>>
>>>> No, if it does it's a broken DNS server.
>>>>
>>>> Stuart
>>>>
>>>>
>>>> On 3 Feb 2014, at 19:55, Adrian Godwin wrote:
>>>>
>>>>> Maybe the dns server understands that's a string containing an ip address and returns the numeric value ?
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Feb 3, 2014 at 7:53 PM, Stuart Poulton <EMAIL ADDRESS HIDDEN> wrote:
>>>>> Ok, in which case the comment is wrong.
>>>>>
>>>>> But hey.
>>>>>
>>>>> Stuart
>>>>>
>>>>>
>>>>> On 3 Feb 2014, at 19:47, Bo Herrmannsen wrote:
>>>>>
>>>>>> it can get data, so must be working....
>>>>>>
>>>>>>
>>>>>> anyways that must be the next thing if i'm wrong
>>>>>>
>>>>>>
>>>>>> Den 03/02/2014 kl. 20.45 skrev Stuart Poulton:
>>>>>>
>>>>>>> I know whats intended, but as it's written that won't work.
>>>>>>>
>>>>>>> Stuart
>>>>>>>
>>>>>>> On 3 Feb 2014, at 19:44, Bo Herrmannsen wrote:
>>>>>>>
>>>>>>>> that is intended.... so the sketch can be used both with ip or name
>>>>>>>>
>>>>>>>>
>>>>>>>> Den 03/02/2014 kl. 19.53 skrev Stuart Poulton:
>>>>>>>>
>>>>>>>>> Bo,
>>>>>>>>>
>>>>>>>>> The other problem that you will have when you get it working is from the following
>>>>>>>>>
>>>>>>>>> const char server[] = "87.51.52.114"; // name address for server (using DNS)
>>>>>>>>>
>>>>>>>>> //IPAddress server(87,51,52,114); // example, if you want to use IP address
>>>>>>>>>
>>>>>>>>> I'll leave it as an exercise for the user to spot the problem, here's a hint look at the comments.
>>>>>>>>>
>>>>>>>>> Stuart
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 3 Feb 2014, at 18:07, Bo Herrmannsen wrote:
>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> working on a receipt printer that prints out orders from a oscommerce based webshop
>>>>>>>>>>
>>>>>>>>>> almost there but a compile error i can figure:
>>>>>>>>>>
>>>>>>>>>> sketch_feb03a:82: error: expected unqualified-id before numeric constant
>>>>>>>>>> sketch_feb03a.ino: In function 'void setup()':
>>>>>>>>>> sketch_feb03a:151: error: 'TM88' was not declared in this scope
>>>>>>>>>> sketch_feb03a.ino: In function 'void processIncoming()':
>>>>>>>>>> sketch_feb03a:402: error: 'TM88' was not declared in this scope
>>>>>>>>>> sketch_feb03a.ino: In function 'void processPrintChar(char)':
>>>>>>>>>> sketch_feb03a:459: error: 'TM88' was not declared in this scope
>>>>>>>>>> sketch_feb03a:489: error: 'TM88' was not declared in this scope
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> code here: https://github.com/laird/OSCommerceClient/blob/master/OSCommerce/OSCommerce.ino
>>>>>>>>>>
>>>>>>>>>> lib for the printer here: https://github.com/signalwerk/thermalprinter
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> this is one that is killing me..... worse than TMP112
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> i just want it out the door quick
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> HEEEEEEEEEEEEELP
>>>>>>>>>> _______________________________________________
>>>>>>>>>> OpenTRV-dev mailing list
>>>>>>>>>> EMAIL ADDRESS HIDDEN
>>>>>>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> OpenTRV-dev mailing list
>>>>>>>>> EMAIL ADDRESS HIDDEN
>>>>>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> OpenTRV-dev mailing list
>>>>>>>> EMAIL ADDRESS HIDDEN
>>>>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> OpenTRV-dev mailing list
>>>>>>> EMAIL ADDRESS HIDDEN
>>>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>>>
>>>>>> _______________________________________________
>>>>>> OpenTRV-dev mailing list
>>>>>> EMAIL ADDRESS HIDDEN
>>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> OpenTRV-dev mailing list
>>>>> EMAIL ADDRESS HIDDEN
>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> OpenTRV-dev mailing list
>>>>> EMAIL ADDRESS HIDDEN
>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>
>>>> _______________________________________________
>>>> OpenTRV-dev mailing list
>>>> EMAIL ADDRESS HIDDEN
>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>
>>> _______________________________________________
>>> OpenTRV-dev mailing list
>>> EMAIL ADDRESS HIDDEN
>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>
>> _______________________________________________
>> OpenTRV-dev mailing list
>> EMAIL ADDRESS HIDDEN
>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>
More information about the OpenTRV-dev
mailing list