Topic: Trying to save data on local system from a web page

I need to save some data on to the local system.  I've tried the following:

-- Cookies seem to be session only and on persistent.  Even if they were session only, don't know how to access them from another program or script.

-- I've tried to use the setparam and getparam commands from the bridge system.  Doesn't seem to write to the parameters.ini file.

any clever tricks out there?

dan

Re: Trying to save data on local system from a web page

What kind of data are you trying to save?
It's helpful to know your firmware version too. You can use Hello command or UI on TV to find it out.

SetParam & GetParam are the only commands we developed for this purpose.
We are using these 2 commands to save parameters of the Control Panel.

There is a bug while migrating from the old XML format.
The names of the parameters has to be prefixed with 'xmldata_'.
I've just updated the wiki for this. Sorry.

Re: Trying to save data on local system from a web page

hmmmm

Still not working -

here is the command

http://192.168.1.100/bridge?cmd=setpara … ntest=1234

reply:
<xml><status>1</status><cmd>SETPARAM</cmd><data><value>0</value></data></xml>

replay from 'hello':
<xml><status>1</status><cmd>HELLO</cmd><data><guid>169C9111-D428-6B2E-9D72-5530FFCE8B27</guid>
<dcid><chum>
  <vers>0002</vers>
  <rgin>0001</rgin>
  <skin>0001</skin>
  <part>1000</part>
  <camp>0006</camp>
</chum></dcid>
<hwver><cpi version='1.0'>
  <response_list>
    <response type="hwvr" result="success">00000000000000000000000000060000</response>
  </response_list>
</cpi></hwver>
<fwver>19</fwver>
<minAndroid>0.6.3</minAndroid>
<minIOS>0.0.0</minIOS>
<flashver>10.62.0</flashver>
<internet>true</internet>
<mac>48:5D:60:A3:AC:50</mac>
<ip>192.168.1.100</ip>
<network>
    <interface if="wlan0" up="true" link="true" ip="192.168.1.100" broadcast="192.168.1.255" netmask="255.255.255.0" gateway="192.168.1.1" nameserver1="68.87.71.230" nameserver2="68.87.73.246">
    </interface>
</network></data></xml>

Here is my getparam call:
http://192.168.1.100/bridge?cmd=getpara … ta_dantest

response:
<xml><status>1</status><cmd>GETPARAM</cmd><data><value></value></data></xml>

I also noted that parameters.ini remains at 0 length.

Re: Trying to save data on local system from a web page

Sorry, my bad. It should be dataxml_ instead.

http://192.168.1.100/bridge?cmd=setpara … ntest=1234

Re: Trying to save data on local system from a web page

We're close!

setparam seems to work.  Returns the right value.
I can see that data in parameters.ini

However, can't seem to get GETPARAM to work

command:
http://192.168.1.100/bridge?cmd=getpara … ml_dantest

returns:
<xml><status>1</status><cmd>GETPARAM</cmd><data><value></value></data></xml>

Re: Trying to save data on local system from a web page

FOUND THE PROBLEM WITH GETPARAM

You DO NOT add the xmldata_ prefix and it works just fine.

command:
http://192.168.1.100/bridge?cmd=getpara … ue=dantest

response:
<xml><status>1</status><cmd>GETPARAM</cmd><data><value>1234</value></data></xml>

Re: Trying to save data on local system from a web page

ok. thanks for that.
This is very hairy to start with.
I will fix this in the next release.

Re: Trying to save data on local system from a web page

Are you going to add the xmldata_ prefix of leave it as is?  We're starting to code and just let us know what the final standard will be.

thanks again, very nice system BTW.  We're going to do some very interesting things with it.

d.

Re: Trying to save data on local system from a web page

I will probably have it compatible with both standards.
Meaning you can choose to use 'xmldata_' or not, making your transition less painful.

I'll PM you once there's a new update.