I purchased the CTI Comet USB CallerID Gizmo.
It adds a virtual com port to my machine that works fine using realterm (http://realterm.sourceforge.net/)
Try as I might with Livecode (went to bed 6am this morning) I cannot get the correct bytes/characters
I've run the program in the ide, standalone and on different machines - no joy.
Its not even close I have used the read from file with the number of characters and int1 and uint1 (same values)
If I Use until empty or eof the thing just goes nuts - no data at all.
Here is what I get with realterm in ascii
the Xs are replacements because that is my mobile number€...447X34X3X59X..11231759.
the hex is
(the 99 are replacements for my real numbers)80 1A 02 0C 34 34 37 99 33 34 99 33 99 35 39 99 01 08 31 31 32 33 31 37 35 39 07
the o2 is the marker that says the next byte holds the number of characters of the caller id ie OC is hex for the 12 numbers following the 01 says the following byte (08) are the number of bytes in the time and the last byte is the checksum
Livecode gives consistent bytes (not garbled) but the documentation says if the first byte is not 80H (128 decimal) then all bets are off, it isnt a callerid string.
In this case th first 2 bytes I always get are 0 and 27 decimal
and the rest are
69,10,40,80,64,8,49,69,18,26,18,10,18,2,18,8,8,38,83,83,38,26,45,65,26,66,42,74,42,122
Any ideas?
The one consistent thing is livecode - I have run it on 3 different phone lines as well - and the realterm works.
here is the salient code
Code: Select all
on getit
wait 300 milliseconds
read from file gPort for 2 int1
put "First " & it & cr after fld "lst"
put it into gdat
read from file gPort for 30 int1
put it & " --- " & lnx && the long time & CR after field "lst"
put it after gdat
end getit
gdat was for printing in the messagebox
btw with all the changes I made many times the field "lst" was not refreshed until i broke out of the loop using <ctrl .>
locking and unlocking cursor did nothing, putting waits of 3 seconds or more after opening and closing and reading the serial port did not update the field either.
Any ideas appreciated
Regards Lagi