sheofir / open-tr069 Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/open-tr069
Automatically exported from code.google.com/p/open-tr069
Hi, men. Do u have any tutorial for using this item. The usage of the software
writen too, too simply to lead a fresh man into it.
Original issue reported on code.google.com by [email protected]
on 29 Jul 2010 at 3:24
INFORM HANDSHAKING PROBLEM:
1. I have installed openACS server, and configured evcmp (edit tr098_data.xml)
to work with my server.
2. evcmp send a correct inform message to the server, but it is not able
to understand the server response.
3. I debugged the code and I found a problem on xml response format
compatibility. Server response contain the attribute
xmlns:cwmp="urn:dslforum-org:cwmp-1-0 on SetParameterValues node.
When evcmp parse this node, the function evcpe_xmlns_table_add (xmlns.c) fail
on this control:
***********************************************************************
if ((ns = evcpe_xmlns_table_find(table, name, name_len))) {
evcpe_error(__func__, "namespace already exists: %.*s",
name_len, name);
rc = -1;
goto finally;
}
***********************************************************************
because the attribute xmlns:cwmp="urn:dslforum-org:cwmp-1-0 is already present
on the SOAP-ENV:Envelope node.
XML-SOAP server message is compliant with the protocol specification.
4. To workaround the problem I disabled the check (commented it). In this way
the inform handshaking works well, and is also possible to perform
getParameterValues operation. Any suggestion to fix this problem?
setParameterValues PROBLEM:
1. The setParameterValues invoked by the openacs default script fail
2. The xml format is not compliant, because evcmp doesn't manage the
<ParameterKey>CommandKey</ParameterKey> node sended by the server:
<cwmp:SetParameterValues xmlns:cwmp="urn:dslforum-org:cwmp-1-0">
<ParameterList SOAP-ENC:arrayType="cwmp:ParameterValueStruct[1]">
<ParameterValueStruct>
<Name>InternetGatewayDevice.ManagementServer.Test</Name>
<Value xsi:type="xsd:string">test_value</Value>
</ParameterValueStruct>
</ParameterList>
<ParameterKey>CommandKey</ParameterKey> /**** <--- not managed ****/
</cwmp:SetParameterValues>
3. To workaround this problem I added I added :
evcpe_strncmp("SetParameterValues", parent->name, parent->len) in
evcpe_msg_xml_elm_begin_cb function (file msg_xml.c), see below
***********************************************************************
else if (!evcpe_strncmp("ParameterKey", name, len)) {
if (evcpe_strncmp("AddObject", parent->name, parent->len) &&
evcpe_strncmp("DeleteObject", parent->name, parent->len) && evcpe_strncmp("SetParameterValues", parent->name, parent->len)) {
goto unexpected_parent;
}
}
if (!(parent = calloc(1, sizeof(struct evcpe_xml_element)))) {
evcpe_error(__func__, "failed to calloc evcpe_soap_element");
return ENOMEM;
}
***********************************************************************
and I also added a case entry in function evcpe_msg_xml_data_cb in
"ParameterKey" case:
***********************************************************************
case EVCPE_SET_PARAMETER_VALUES: /**** <--- added ****/
break;
default:
evcpe_error(__func__, "unexpected evcpe_method_type: %d",
parser->msg->method_type);
goto syntax_error;
}
} else if (len > 0) {
evcpe_error(__func__, "unexpected element: %.*s",
elm->len, elm->name);
goto syntax_error;
}
rc = 0;
finally:
return rc;
***********************************************************************
4. Any suggestion to fix this problem?
Original issue reported on code.google.com by [email protected]
on 14 Jul 2010 at 3:45
Hi,
I need a help on making a decision on how to implement a basic TR135 data model as I'm facing problem with FrontEnds.
As specified in TR135
(http://www.broadband-forum.org/cwmp/tr-135-1-1-0.html#D.STBService.{i}.Componen
ts.FrontEnd.{i}.), the data model could have many FrontEnd like:
Device.Services.STBService.{i}.Components.FrontEnd.{i}.DVBT.Modulation.xxxx
Device.Services.STBService.{i}.Components.FrontEnd.{i}.IP.Inbound.{i}.xxxx
I've tried a data model where I've addedthe 2 frontends (IP and DVBT) and
created 2 FrontEnd instances using evcpe_attr_add_obj() applied on the
multi-object FrontEnd but what I've got is wrong:
Expected:
---------
Device.Services.STBService.1.Components.FrontEnd.1.DVBT.Modulation.xxxx
Device.Services.STBService.1.Components.FrontEnd.2.IP.Inbound.1.xxxx
(note here the index of each FrontEnd)
Results:
--------
Device.Services.STBService.1.Components.FrontEnd.1.DVBT.Modulation.xxxx
Device.Services.STBService.1.Components.FrontEnd.1.IP.Inbound.1.xxxx
Device.Services.STBService.1.Components.FrontEnd.2.DVBT.Modulation.xxxx
Device.Services.STBService.1.Components.FrontEnd.2.IP.Inbound.1.xxxx
This is wrong as the schema has been duplicated across the 2 objects.
My data model declaration was:
------------------------------
Device: object
Services: object
STBService: multi-object
Components: object
FrontEnd:multi-object
DVBT: object
Modulation: object
xxxx: parameter
IP: object
Inbound: multi-object
My temporary solution is
------------------------
Instead of using multi-objects, use a simple object. However this is ugly in my
humble opinion
Device: object
Services: object
STBService: multi-object
Components: object
FrontEnd:object
1: object <<<<< Note here the instance number as an object
DVBT: object
Modulation: object
xxxx: parameter
2: object <<<<< Note here the instance number as an object
IP: object
Inbound: multi-object
Is there an ideal solution to deal a such complex data model ?
Thank you
Original issue reported on code.google.com by [email protected]
on 15 Aug 2011 at 7:23
First of all: thank you for the good project. It's seems promising even if it
lacks for now many features as SSL, download and upload.
I'm trying to use the data model on TR135 paths and I've run into a parse error.
I was trying to access the following parameter:
Device.Services.STBService.1.Components.FrontEndNumberOfEntries
Where
Device: object
Services: object
STBService: multi-object
Components: object
FrontEndNumberOfEntries: a unsigned integer
The function evcpe_repo_locate() cannot parse this path and exit with an error:
"failed to convert to integer: Components"
I've make a little path that resolved my problem and I hope this is correct.
The data model design seems to be good but it lack documentation (doxygen as an
example):
int evcpe_repo_locate(struct evcpe_repo *repo, const char *name,
struct evcpe_obj **obj, struct evcpe_attr **attr, unsigned int *index)
{
int rc;
const char *start, *end;
int inst_read = 0; /* Set when an instance is read */
*obj = repo->root;
*attr = NULL;
start = end = name;
while(*end != '\0') {
if (*end != '.') {
end ++;
continue;
}
if (end == start) {
// expression neglecting root object (compatible to all
// TR-069 enabled device
*attr = RB_ROOT(&repo->root->attrs);
*obj = (*attr)->value.object;
} else if ((*attr) && (*attr)->schema->type == EVCPE_TYPE_MULTIPLE) {
if (!inst_read) {
if (!(*index = atoi(start)) && errno) {
evcpe_error(__func__, "failed to convert to integer: "
"%.*s", end - start, start);
rc = EINVAL;
goto finally;
}
if (*index <= 0) {
evcpe_error(__func__, "invalid instance number: "
"%d", *index);
rc = EINVAL;
goto finally;
}
if ((rc = evcpe_attr_idx_obj(*attr, (*index) - 1, obj))) {
evcpe_error(__func__, "indexed object doesn't exist: "
"[%d]", (*index) - 1);
goto finally;
}
} else {
/* Read the next object */
if ((rc = evcpe_obj_get(*obj, start, end - start, attr))) {
evcpe_error(__func__, "failed to get attribute: %.*s",
end - start, start);
goto finally;
}
if ((rc = evcpe_attr_get_obj(*attr, obj))) {
evcpe_error(__func__, "failed to get object: %.*s",
end - start, start);
goto finally;
}
}
} else if ((rc = evcpe_obj_get(*obj, start, end - start, attr))) {
evcpe_error(__func__, "failed to get attribute: %.*s",
end - start, start);
goto finally;
// } else if (!(*attr)) {
// evcpe_error(__func__, "attribute doesn't exist: %.*s",
// end - start, start);
// rc = EINVAL;
// goto finally;
} else if ((*attr)->schema->type == EVCPE_TYPE_MULTIPLE) {
inst_read = 0;
} else if ((*attr)->schema->type == EVCPE_TYPE_OBJECT) {
*obj = (*attr)->value.object;
} else {
evcpe_error(__func__, "not an object/multiple attribute: %s",
(*attr)->schema->name);
rc = EVCPE_CPE_INVALID_PARAM_NAME;
goto finally;
}
start = ++ end;
}
if (start != end) {
if ((rc = evcpe_obj_get(*obj, start, end - start, attr))) {
evcpe_error(__func__, "failed to get attribute: %.*s",
end - start, start);
goto finally;
} else if ((*attr)->schema->type == EVCPE_TYPE_OBJECT ||
(*attr)->schema->type == EVCPE_TYPE_MULTIPLE) {
evcpe_error(__func__, "not a simple attribute: %.*s",
end - start, start);
rc = EVCPE_CPE_INVALID_PARAM_NAME;
goto finally;
}
}
rc = 0;
finally:
return rc;
}
I've added a boolean state to bypass reading the instance number {i} when
applicable.
Again many thanks for the program and your effort.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2011 at 7:07
What steps will reproduce the problem?
1. compile the code
2.
3.
What is the expected output? What do you see instead?
Code should have been compiles successfully but it is showing compilation error.
What version of the product are you using? On what operating system?
latest code from SVN
Please provide any additional information below.
Follwing compilation issue is reported:
evcpe.c:54: error: conflicting types for âshutdownâ
/usr/include/sys/socket.h:232: note: previous declaration of âshutdownâ was
here
make: *** [evcpe.o] Error 1
Original issue reported on code.google.com by [email protected]
on 8 Sep 2011 at 4:30
In order to find setters and getters, the actual code depends on dlopen() and
dlsym() to open the process as a shared library and to look for symbols.
However, this implies compiling with extra flags which not suitable for all
projects.
I've made a simple wrapper around these calls so that a someone could replace
this mecanism with a lookup table:
void *evcpe_symboldb_open(void);
void *evcpe_symboldb_find(void *handle, char *symbol);
int evcpe_symboldb_close(void *handle);
/* -------------- EVCPE IMPLEMENTATION ------------*/
void *evcpe_symboldb_open(void)
{
return dlopen(NULL, RTLD_LAZY|RTLD_GLOBAL);
}
void *evcpe_symboldb_find(void *handle, const char *symbol)
{
return dlsym(handle, symbol);
}
int evcpe_symboldb_close(void *handle)
{
return dlclose(handle);
}
/* -------------- SIMPLE LOOKUP TABLE ------------*/
struct entry_s
{
void *fn; /**< function's ptr */
const char *name; /**< function's name */
};
static struct entry_s methods[] =
{
/* ............... */
};
void *evcpe_symboldb_open(void)
{
return 0;
}
void *evcpe_symboldb_find(void *handle, const char *symbol)
{
int i;
for (i = 0; i < sizeof(methods)/sizeof(struct entry_s); ++i)
{
if (!strcmp(methods[i].name, symbol))
{
return 0;
}
}
return -1;
}
int evcpe_symboldb_close(void *handle)
{
return 0;
}
Original issue reported on code.google.com by [email protected]
on 10 Oct 2011 at 7:58
http.c
void evhttp_connection_fail(struct evhttp_connection *evcon,
enum evhttp_connection_error error)
{
.............
/* inform the user */
if (cb != NULL)
(*cb)(NULL, cb_arg);
............
}
session.c
void evcpe_session_http_cb(struct evhttp_request *http_req, void *arg)
the first parameter http_req maybe NULL, must check it.
Original issue reported on code.google.com by [email protected]
on 11 Nov 2010 at 10:15
The function evcpe_type_validate() cannot handle the UINT_MAX 4294967295 number.
In order to reproduce, try to make a call to evcpe_attr_set() on an unsignedInt
pareameter. The following message will be displayed:
not a positive integer: -1.
I've patched the function in order to use the strtoul() but with more check as
suggested in one of the site that I've visited:
int evcpe_strtoul(const char *str, int base, unsigned long *ul)
{
char *bad_char = NULL;
unsigned long num = 0;
if (!str || !ul || (base > 36) || (base < 0))
{
return -1;
}
errno = 0;
num = strtoul(str, &bad_char, base);
if(ERANGE == errno)
{
if((0 == num) && (str == bad_char))
{
evcpe_error(__func__, "cannot convert the string: %s", str);
}
else if(ULONG_MAX == num)
{
evcpe_error(__func__, "an overflow has been detected");
}
}
else if((0 == errno) && ((NULL != bad_char) && ('\0' == *bad_char)))
{
*ul = num;
return 0;
}
evcpe_error(__func__, "cannot convert the string: %s", str);
return -1;
}
Original issue reported on code.google.com by [email protected]
on 29 Aug 2011 at 1:18
What steps will reproduce the problem?
1. Run OpenACS
2. Run evcpe with test data model
3. Get the parameter using the ACS configuration script
var parameters = new Array();
parameters[0]='Device.DeviceInfo.SerialNumber';
var response = cpe.GetParameterValues(parameters);
logger ('='+response[0].value);
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Debian Linux
Please provide any additional information below.
Following error seen
[2013-10-30 21:06:06 IST] INFO evcpe_session_send_do - making HTTP request
[2013-10-30 21:06:06 IST] INFO evcpe_start_session_cb - scheduling periodic
inform in 60 second(s)
[2013-10-30 21:06:06 IST] INFO evcpe_session_http_cb - HTTP response code: 401
[2013-10-30 21:06:06 IST] DEBUG evcpe_session_http_cb - HTTP response content:
<html><head><title>JBossWeb/2.0.1.GA - Error report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-s
ize:22px;} H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-s
ize:16px;} H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-s
ize:14px;} BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px
;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 401 - </h1><HR size="1"
noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b>
<u></u></p><p><b>description</b> <u>This request requires HTTP authentication
().</u></p><HR size="1"
noshade="noshade"><h3>JBossWeb/2.0.1.GA</h3></body></html>
Please reply ASAP, what can be done for this error.
Original issue reported on code.google.com by [email protected]
on 30 Oct 2013 at 3:36
I can't find evhttp.h in the directory.
Original issue reported on code.google.com by [email protected]
on 22 Jul 2010 at 7:19
The idea is to have a separate issue with information about overall project
status, missing and implemented features and so on. In particular it should be
useful for evaluating open-tr069, now it looks like there's no public
information of this kind whatsoever.
Original issue reported on code.google.com by [email protected]
on 14 Mar 2013 at 12:45
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.