nebgor / sma-bluetooth

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

SMAtool 0.15+ gives error "not all codes set" #62

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. compile and use any version above 0.14 
2. Run smatool
3.

What is the expected output? What do you see instead?
SMAtool reports:
root@debian:~/sma-bluetooth-0.16# dir
invcode.in  sma.in.new  smatool.c     smatool.conf.new
mysql.c     smatool     smatool.conf
root@debian:~/sma-bluetooth-0.16# ./smatool

 Error ! not all codes set
*** glibc detected *** ./smatool: double free or corruption (top): 0x00022038 
**                                                                              
                   *
Aborted 

What version of the product are you using? On what operating system?
all above 0.14 give the same error. or I get the error invcode.in missing

Please provide any additional information below.
this is my config file:

# Configuration for smatoool bluetooth inverter logger
#
# Copy this to smatool.conf this is to avoid damaging your
# config on every update
#
# Not all fields are compulsory
#
# Inverter (compulsory) type 1700TL, 2100TL, 3000TL, 3000TLHF, 4000TL, 5000TL, 
10000TL  others not tested
Inverter        5000TL
# Inverter (compulsory bluetooth address) use "hcitool scan" to find
BTAddress       00:80:25:1F:ED:0B
# Inverter Bluetooth timeout (optional) defaults to 5 seconds
BTTimeout
# Inverter User password (compulsory)
Password        0000
# Config file (optional) defaults to ./smatool.conf
Config
# String file (compulsory) data strings to drive the system
File            sma.in.new
# Location (optional) required to avoid waking up system in the dark.
# Requires  mysql below.
Latitude 51.3
Longitude 5.13
# Mysql (optional) required for storing data
MySqlHost       localhost
MySqlDatabase   smatool
MySqlUser       XXXXXX
MySqlPwd        XXXXXX
# PVOutput.org specific data if you are outputting to PVOutput.org.
PVOutputURL     http://pvoutput.org/service/r1/addstatus.jsp
PVOutputKey     Here i put my key.
PVOutputSid     Systemnumber 

Original issue reported on code.google.com by jurgensc...@gmail.com on 16 Jan 2012 at 8:23

GoogleCodeExporter commented 8 years ago
Maybe its worth reporting that i run this on à sheevaplug with latest debian 
distro.

Jurgen

Original comment by jurgensc...@gmail.com on 18 Jan 2012 at 5:36

GoogleCodeExporter commented 8 years ago
I have the exact same error when running the "smatool -v" command on an ARM 
system running Debian Squeeze.

I compiled version 0.17 
I have configured converter type 5000TL, the actual device type I have is SMA 
5000TL21

Original comment by jo.kl...@gmail.com on 13 Mar 2012 at 7:18

GoogleCodeExporter commented 8 years ago
On ARM this seems to be caused by an alignment problem.
echo 3 > /proc/cpu/alignment solves the segfault.

See http://lecs.cs.ucla.edu/wiki/index.php/XScale_alignment

(on a Synology ds207+ nas)

Original comment by m...@peter-vos.net on 22 Apr 2012 at 7:48

GoogleCodeExporter commented 8 years ago
Is there a trick like this for a mips processor?

# cat /proc/cpuinfo 
system type     : Atheros AR7161 rev 2
machine         : NETGEAR WNDR3700/WNDR3800/WNDRMAC
processor       : 0
cpu model       : MIPS 24Kc V7.4
BogoMIPS        : 452.19
wait instruction    : yes
microsecond timers  : yes
tlb_entries     : 16
extra interrupt vector  : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0e90, 0x0f18, 
0x06e0]
ASEs implemented    : mips16
shadow register sets    : 1
kscratch registers  : 0
core            : 0
VCED exceptions     : not available
VCEI exceptions     : not available

I'm getting the same error on my netgear wndr3700 / OpenWRT.

Original comment by stefan.v...@gmail.com on 28 May 2012 at 7:59

GoogleCodeExporter commented 8 years ago
Could this issue be caused by the compile errors seen in 
https://code.google.com/p/sma-bluetooth/issues/detail?id=75 ?

Is this one similar to it too? https://code.google.com/p/lz4/issues/detail?id=4

Original comment by stefan.v...@gmail.com on 8 Jul 2012 at 8:46

GoogleCodeExporter commented 8 years ago
This patch fixes it on my wndr3700. Thanks to janus44444!

Original comment by stefan.v...@gmail.com on 22 Jul 2012 at 12:06

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hello,

On my sheevaplug (with Debian), I have the same problem.

Compilation is OK, but can't launch the program file

root@debian:/home/temp# gcc -lbluetooth -lcurl -lmysqlclient -g -o smatool018 
smatool.c
root@debian:/home/temp# ./smatool018

 Error ! not all codes set
*** glibc detected *** ./smatool018: double free or corruption (top): 
0x00023038 ***
Aborted
root@debian:/home/temp# 

Solved after typing

echo 3 > /proc/cpu/alignment

Thank you!

Original comment by dje...@gmail.com on 1 Sep 2012 at 12:45

GoogleCodeExporter commented 8 years ago
Hi, 

I get the exact same error when using debian on my raspberry pi (B-model) 
trying to communicate with my Sunny Boy 2500HF.

I have made all the changes in invcode.in but I still get "Error ! not all 
codes set"

And I cannot solve anything running echo 3 > /proc/cpu/alignment. Here I get 
the error: "bash: /proc/cpu/alignment: permission denied" (translated).

Can any one tell me how I can align my Raspberry cpu or why I cannot run the 
command?

Br. P. Borg

Original comment by prebenb...@gmail.com on 2 Mar 2013 at 7:01

GoogleCodeExporter commented 8 years ago
Hi 

Now I have solved this part. I had miss spelled the inverter model in my 
smatool.conf file. 25000HF in stead of 2500HF.

But now I have major problems with two different date formats read from the 
inverter. 

2001-02-03 and 3/2/2001. Have anyone seen and solved this issue before?

Br. P.

Original comment by prebenb...@gmail.com on 9 Mar 2013 at 11:33