Hi, today I was able to debug a little: Script says this: Lade Daten von der Uhr herunter... Uhr benutzt Protokoll V1 V1 0 23 1 32 1 41 2 13 2 21 2 58 3 10 3 20 3 40 4 4 4 17 4 36 4 48 5 25 5 47 6 16 6 After putting it in a readable format: Lade Daten von der Uhr herunter... Uhr benutzt Protokoll V1 V1 0:23 1:32 1:41 2:13 2:21 2:58 3:10 3:20 3:40 4:4 4:17 4:36 4:48 5:25 5:47 6:16 6 ...and fillig it up with data directly from the watch: Lade Daten von der Uhr herunter... Uhr benutzt Protokoll V1 V1 0:23 1:32 1:41 2:13 2:21 2:58 3:10 3:20 3:40 4:4 4:17 4:36 4:48 5:25 5:47 6:16 6 6:33 6:45 7:13 7:32 8:01 Data A 22:55 After modifying communication.py: print "Read 64" ser.write('V') data = ser.read(64) for i in range(len(data)): print ord(data[i]) dat.append(data[i]) Lade Daten von der Uhr herunter... Read 64 86 9 4 0 20 0 0 8 30 21 0 23 49 1 32 52 1 41 37 2 13 16 2 21 25 2 58 1 3 10 16 3 20 37 3 40 25 4 4 55 4 17 52 4 36 4 4 48 46 5 25 16 5 47 43 6 16 46 6 33 34 6 45 40 Uhr benutzt Protokoll V1 V1 0 23 52 1 13 16 2 58 16 3 40 25 4 17 4 4 25 16 6 16 Übertrage Daten zum Browser... Hmm... greetings, Stefan PS: Is german your native language? If, we can talk in german, that's easier. Am Freitag, den 02.09.2011, 07:41 +0000 schrieb hintze: > ok. thank you very much for your offer :) i would appreciate if you > could provide some debugging. ok ill try to explain the communication in > some short sentences. > > first of all, the watches communicate with your PC by an USB-serial-adapter, which is located inside the clamb you use to attach your watch. with some really basic communication, one can retrieve data from the watch in simple ASCII-characters, which can be 'translated' into an integer[1]. > to trigger the data transfer, one has to write a 'V' onto a watch of V1 or '\xC0\x04\x00\xC0' (in HEX) onto a watch of V2. (this happens in communication.py). the string which is returned by the watch has a specific length depending of how many awakemoments one have had. > this is also the cause of your bug. the length of the string has not been determined correctly, so there is a loop running behind the length of the string. > > < StopIteration>> > > 'it' is an iterator which is iterated by 'it.next'. dat is the string > containing the data. ord converts the ASCII to an integer. 'self' is the > object, containing the data. the attribute 'awakemoments' is an 2D- > array. the first index are the hours, the second one the minutes, which > are referenced by 'awakemoments[0][X]' and 'awakemoments[1][X]' > respectively. X starts with length zero, the function 'append' does what > it says :D it appends the next hour / minute. > > to begin to resolve this bug, im interested in what your terminal says. it has to respond with 'Watch uses protocol V1'. if it does not, the string is not filled anyway and cannot be used furtheron, which could cause such an error. > we are not that much into exception handling, this is something one has to do in the future, maybe by implementing some kind of easy check. dunno right now. > > feel free to make some proposals. if you want to read the sourcecode and > get stuck at some point, i would pe pleased to help you. > > best regards, > christian. > > [1]: http://docs.python.org/library/functions.html#ord >