nebgor / sma-bluetooth

Automatically exported from code.google.com/p/sma-bluetooth
0 stars 0 forks source link

Error Line 17 No Conversion #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
SB5000TL

Giving following issue:

[16] Sending
String to calculate FCS
ff 03 60 65 08 a0 ff ff ff ff ff ff 00 03 78 00 3f 10 fb 39 00 03 00 00 00 00 
00 80 0e 01 fd ff ff ff ff ff 

sum=80
  length change from 3b to 3a 
  [16] sending:
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 3a 00 44 
    00000010: 8d 88 43 83 15 00 ff ff ff ff ff ff 01 00 7e ff 
    00000020: 03 60 65 08 a0 ff ff ff ff ff ff 00 03 78 00 3f 
    00000030: 10 fb 39 00 03 00 00 00 00 00 80 0e 01 fd ff ff 
    00000040: ff ff ff 4f b8 7e  cc=58

[17] Sending
String to calculate FCS
ff 03 60 65 0e a0 ff ff ff ff ff ff 00 01 78 00 3f 10 fb 39 00 01 00 00 00 00 
02 80 0c 04 fd ff 07 00 00 00 84 03 00 00 8a fa 2d 4d 00 00 00 00 b8 b8 b8 b8 
88 88 88 88 88 88 88 88 

sum=7e
  length change from 54 to 52 
NO CONVERSION!

Original issue reported on code.google.com by dzendr...@gmail.com on 12 Jan 2011 at 7:07

GoogleCodeExporter commented 9 years ago
this is the bit I've been trying to find - my inverter never produces this 
code. A user in Germany has also found this on a 5000TL as well I've guessed at 
a fix. It will be in this afternoons push.

Original comment by stephenb...@gmail.com on 13 Jan 2011 at 6:17

GoogleCodeExporter commented 9 years ago
Some more details that might help us fix these issues.
My Inverter is a SB5000TL-20 with software version 3.01.

The mising bit is 2c so I added
 - case 0x52: cp[3]=0x2c; break; - 
to the fix_length-send.

That fixed the issue on that line, however there are some more issues that are 
occuring downstreams.

I'll do some more investigation and look at a USB dump I made yesterday to see 
if I can find the sequence and provide further info.

Best Regards,

Wouter

Original comment by dzendr...@gmail.com on 13 Jan 2011 at 11:02

GoogleCodeExporter commented 9 years ago
I made the following changes to the code

fix_length_send:
/* Following Lines have been added by Wouter Beke for the SB5000TL-20 */
   case 0x52: cp[3]=0x2c; break;
   case 0x5a: cp[3]=0x24; break;
/* End changes by WB */

fix_length_received
/* Following Lines have been added by Wouter Beke for the SB5000TL-20 */
   case 0x5a: received[3]=0x24; break;
   case 0x66: received[3]=0x1a; break;
/* End changes by WB */

This brings me to the retrieval of the Power.
Next line it brakes again, but I'll look into that tomorrow
Details below
-------------------------------------------------------------
[37] Extracting
2011-01-13 16:47:52 Current power = 0 Watt
[38] Waiting for string
[4255993]   waiting for: 7e 39 00 47 aa 38 17 25 80 00 

[38] Waiting for data on rfcomm
7e 6d 00 
Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 6d 00 13 
    00000010: aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 00 00 
    00000020: 88 7d 33 00 00 01 00 00 00 01 1f 41 00 b2 2e 2f 
    00000030: 4d 88 7d 33 00 00 88 7d 33 00 00 00 00 00 00 88 
    00000040: 7d 33 00 00 00 00 00 00 01 20 41 00 b2 2e 2f 4d 
    00000050: 88 7d 33 00 00 88 7d 33 00 00 00 00 00 00 88 7d 
    00000060: 33 00 00 00 00 00 00 01 66 41 00 b2 2e 2f 4d ff 
    00000070: ff ff ff ff ff ff ff ff ff  rr=109

13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 00 00 88 13 00 00 01 00 00 00 01 
1f 41 00 b2 2e 2f 4d 88 13 00 00 88 13 00 00 00 00 00 00 88 13 00 00 00 00 00 
00 01 20 41 00 b2 2e 2f 4d 88 13 00 00 88 13 00 00 00 00 00 00 88 13 00 00 00 
00 00 00 01 66 41 00 b2 2e 2f 4d ff ff ff ff ff ff ff ff ff ff sum=80length 
change from 6d to 66
received3 13 

7e 6d 00 13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 00 00 88 13 00 00 01 00 
00 00 01 1f 41 00 b2 2e 2f 4d 88 13 00 00 88 13 00 00 00 00 00 00 88 13 00 00 
00 00 00 00 01 20 41 00 b2 2e 2f 4d 88 13 00 00 88 13 00 00 00 00 00 00 88 13 
00 00 00 00 00 00 01 66 41 00 b2 2e 2f 4d ff ff ff ff ff ff ff ff ff ff 

  [38] looking for: 7e 39 00 47 aa 38 17 25 80 00 
  [38] received:    7e 6d 00 13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 00 00 88 13 00 00 01 00 00 00 01 1f 41 00 b2 2e 2f 4d 88 13 00 00 88 13 00 00 00 00 00 00 88 13 00 00 00 00 00 00 01 20 41 00 b2 2e 2f 4d 88 13 00 00 88 13 00 00 00 00 00 00 88 13 00 00 00 00 00 00 01 66 41 00 b2 2e 2f 4d ff ff ff ff ff ff ff ff ff ff 

[38] Did not find string
7e 6d 00 
Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 6d 00 13 
    00000010: aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 ff ff 
    00000020: ff ff ff ff 01 00 00 00 01 7f 41 00 b2 2e 2f 4d 
    00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
    00000040: 01 00 00 00 01 40 46 40 a8 1e 2f 4d 00 00 00 80 
    00000050: 00 00 00 80 00 00 00 80 00 00 00 80 01 00 00 00 
    00000060: 01 41 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 80 
    00000070: 00 00 00 80 00 00 00 80 01  rr=109

13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 ff ff ff ff ff ff 01 00 00 00 01 
7f 41 00 b2 2e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 
00 01 40 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 01 
00 00 00 01 41 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 
80 01 
7e 6d 00 13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 ff ff ff ff ff ff 01 00 
00 00 01 7f 41 00 b2 2e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
01 00 00 00 01 40 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 80 00 00 00 80 00 00 
00 80 01 00 00 00 01 41 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 80 00 00 00 80 
00 00 00 80 01 

  [38] looking for: 7e 39 00 47 aa 38 17 25 80 00 
  [38] received:    7e 6d 00 13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 ff ff ff ff ff ff 01 00 00 00 01 7f 41 00 b2 2e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 40 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 01 00 00 00 01 41 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 01 

[38] Did not find string
7e 6d 00 
Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 6d 00 13 
    00000010: aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 00 00 
    00000020: 00 01 42 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 
    00000030: 80 00 00 00 80 00 00 00 80 01 00 00 00 01 48 46 
    00000040: 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff 
    00000050: ff ff ff ff ff 01 00 00 00 01 49 46 00 a8 1e 2f 
    00000060: 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
    00000070: ff 01 00 00 00 01 4a 46 00  rr=109

13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 00 00 00 01 42 46 40 a8 1e 2f 4d 
00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 01 00 00 00 01 48 46 00 a8 1e 
2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 49 46 00 
a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 4a 
46 00 
7e 6d 00 13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 00 00 00 01 42 46 40 a8 
1e 2f 4d 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 01 00 00 00 01 48 46 
00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 
49 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 
00 01 4a 46 00 

  [38] looking for: 7e 39 00 47 aa 38 17 25 80 00 
  [38] received:    7e 6d 00 13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 00 00 00 01 42 46 40 a8 1e 2f 4d 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 01 00 00 00 01 48 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 49 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 4a 46 00 

[38] Did not find string
7e 6d 00 
Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 6d 00 13 
    00000010: aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 a8 1e 
    00000020: 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
    00000030: ff ff 01 00 00 00 01 50 46 00 a8 1e 2f 4d ff ff 
    00000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 
    00000050: 00 00 01 51 46 00 a8 1e 2f 4d ff ff ff ff ff ff 
    00000060: ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 52 
    00000070: 46 00 a8 1e 2f 4d ff ff ff  rr=109

13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 a8 1e 2f 4d ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff 01 00 00 00 01 50 46 00 a8 1e 2f 4d ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 51 46 00 a8 1e 2f 4d ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 52 46 00 a8 1e 2f 4d ff 
ff ff 
7e 6d 00 13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 a8 1e 2f 4d ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 50 46 00 a8 1e 2f 4d ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 51 46 00 a8 1e 2f 4d 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 52 46 00 a8 1e 
2f 4d ff ff ff 

  [38] looking for: 7e 39 00 47 aa 38 17 25 80 00 
  [38] received:    7e 6d 00 13 aa 38 17 25 80 00 8d 88 43 83 15 00 08 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 50 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 51 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 52 46 00 a8 1e 2f 4d ff ff ff 

[38] Did not find string
7e 42 00 
Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 42 00 3c 
    00000010: aa 38 17 25 80 00 8d 88 43 83 15 00 01 00 ff ff 
    00000020: ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 
    00000030: 57 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff 
    00000040: ff ff ff ff ff ff ff 01 00 00 00 5b 83 7e  rr=66

3c aa 38 17 25 80 00 8d 88 43 83 15 00 01 00 ff ff ff ff ff ff ff ff ff ff ff 
ff ff 01 00 00 00 01 57 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff 01 00 00 00 5b 83 7e 
7e 42 00 3c aa 38 17 25 80 00 8d 88 43 83 15 00 01 00 ff ff ff ff ff ff ff ff 
ff ff ff ff ff 01 00 00 00 01 57 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff 01 00 00 00 5b 83 7e 

  [38] looking for: 7e 39 00 47 aa 38 17 25 80 00 
  [38] received:    7e 42 00 3c aa 38 17 25 80 00 8d 88 43 83 15 00 01 00 ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 01 57 46 00 a8 1e 2f 4d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00 00 00 5b 83 7e 

[38] Did not find string
Timeout reading bluetooth socket

Original comment by dzendr...@gmail.com on 13 Jan 2011 at 4:58

GoogleCodeExporter commented 9 years ago
Thanks for the details. I've found that the inverter will echo the sent command 
if it has an incorrect command. I'm looking at how to catch this on multiple 
commands as I don't want to thread the send and recieve streams at the moment. 
If I can catch it under the current system I shouldn't need the mapping. I have 
no idea why the two values add to 0x80 or 0x7e and the difference is important 
but has no reason yet.

Original comment by stephenb...@gmail.com on 13 Jan 2011 at 11:29

GoogleCodeExporter commented 9 years ago
I'll fix this problem by using the data stream function. This will eliminate 
the necessity of a valid end value.

Original comment by stephenb...@gmail.com on 13 Jan 2011 at 11:49

GoogleCodeExporter commented 9 years ago
fixed

Original comment by stephenb...@gmail.com on 26 Jan 2011 at 8:00