where to ask question about adding a web service?

Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware
Goto page 1, 2  Next
Author Message
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Thu Jul 07, 2016 0:58    Post subject: where to ask question about adding a web service? Reply with quote
i tried to post http://www.dd-wrt.com/phpBB2/viewtopic.php?t=302958, but apparently that's against the rules.

where is the appropriate place to post this?

i want to add a web service to my new router.

it has:

Firmware Version
DD-WRT v24SP2- (11/05/13) std - build 22750
Kernel Version
Linux 3.10.18 #37 Tue Nov 5 08:17:35 CET 2013 mips

where can i find information about the httpd that is responding to the submits in the router's admin pages?

thanks

thanks
Sponsor
glees5
DD-WRT Novice


Joined: 29 Jun 2016
Posts: 47

PostPosted: Thu Jul 07, 2016 3:49    Post subject: Reply with quote
See if NoCatSplash meet your need. Check this wiki for more information on NoCatSplash: https://www.dd-wrt.com/wiki/index.php/NoCatSplash
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Thu Jul 07, 2016 5:46    Post subject: Reply with quote
glees5 wrote:
See if NoCatSplash meet your need. Check this wiki for more information on NoCatSplash: https://www.dd-wrt.com/wiki/index.php/NoCatSplash


it might work, but i was hoping to use the existing httpd.

thanks
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Fri Jul 08, 2016 4:53    Post subject: Reply with quote
looking at the code in http://svn.dd-wrt.com/browser/src/router/httpd/httpd.c, i can see code that builds and executes shell scripts (sometimes with a query) and sends the result back to the browser.

it also looks like there may be some ajax calls and CGI helper functions in the code also.

also, lots of javascript in /www.

is there any documentation on this stuff? (i am a programmer, but not a javascript/web programmer).

i just need to get some android clients to send an id and about 10 bits of information (maybe with a post?) and have the web server save that id and those 10 bits and have the clients poll using a get. non need for speed or scalability here.

i would like to do this with the stock firmware.

thanks
glees5
DD-WRT Novice


Joined: 29 Jun 2016
Posts: 47

PostPosted: Sat Jul 09, 2016 11:10    Post subject: Reply with quote
It sounds like you are trying to develop your own hotspot system based on httpd to collect and log client information. You said that you want to do that with the stock firmware. Do you mean you want to recompile the stock firmware? I think it is really out of the scope of the dd-wrt forum.
Specimen
DD-WRT User


Joined: 22 Mar 2013
Posts: 112

PostPosted: Sat Jul 09, 2016 12:08    Post subject: Reply with quote
glees5 wrote:
It sounds like you are trying to develop your own hotspot system based on httpd to collect and log client information. You said that you want to do that with the stock firmware. Do you mean you want to recompile the stock firmware? I think it is really out of the scope of the dd-wrt forum.


I think that by stock firmware he means he wants just to download and install a precompiled binary firmware without having to do any changes to it, then he wants it to act as a custom hotspot with minimal coding.

@rtayek
First, I hate this game of ping pong between forum sections, but really, why the Ralink/Mediatek subforum for this question?

Secondly, httpd binary comes with the precompiled firmwares, but so does various hotspot systems, like nocatsplash, wifidog, sputnik, chillispot and hotspot system, try looking at these hotspot systems first, if they fit your purpose.
Specifically, NoCatSplash should do the trick, you just have to do a bit of research on it, it's all available online.

More here: http://dd-wrt.com/wiki/index.php/NoCatSplash

Finally, if none fits the purpose the next place you should go to is to startup commands/scripts and cron jobs, specifically launching another instance of httpd with a customized environment and settings. No C coding is necessary, just bash scripting, and setting the right parameters for the already present binaries (httpd).

PS: But another user had already pointed you to NCS, and you said you would rather user the existing httpd, because it's already in the 'stock firmware'. Well, that proves you didn't research NCS, or else you would know it already comes baked in in every 'stock firmware'. Just do more research instead of asking others to do it for you.
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Sun Jul 10, 2016 4:49    Post subject: Reply with quote
glees5 wrote:
It sounds like you are trying to develop your own hotspot system based on httpd to collect and log client information. You said that you want to do that with the stock firmware. Do you mean you want to recompile the stock firmware? I think it is really out of the scope of the dd-wrt forum.


no, i am trying to just use the stock system, not recompile it.

thanks
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Sun Jul 10, 2016 4:56    Post subject: Reply with quote
Specimen wrote:
glees5 wrote:
... I think it is really out of the scope of the dd-wrt forum.


I think that by stock firmware he means he wants just to download and install a precompiled binary ...

@rtayek
First, I hate this game of ping pong between forum sections, but really, why the Ralink/Mediatek subforum for this question?


[/b]


sorry for posting in the wrong place. i tried to post http://www.dd-wrt.com/phpBB2/viewforum.php?f=4&sid=3637c340377259f85dce802888b67415 for the right forum, but was discouraged (and i can't find the post now).

this forum what where i got an answer in the first place, so i posted here.
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Sun Jul 10, 2016 5:11    Post subject: Reply with quote
Specimen wrote:
...

Secondly, httpd binary comes with the precompiled firmwares, but so does various hotspot systems, like nocatsplash, wifidog, sputnik, chillispot and hotspot system, try looking at these hotspot systems first, if they fit your purpose.
Specifically, NoCatSplash should do the trick, you just have to do a bit of research on it, it's all available online.

...


the router is used by some android tables and is not connected to the internet. i got the impression that ncs was something that require me to modify the firmware.

i now see the ncs and other items under the services admin page and will do more research.

thanks
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Sun Jul 10, 2016 5:15    Post subject: Reply with quote
Specimen wrote:
... Finally, if none fits the purpose the next place you should go to is to startup commands/scripts and cron jobs, specifically launching another instance of httpd with a customized environment and settings. No C coding is necessary, just bash scripting, and setting the right parameters for the already present binaries (httpd). ...


this what i have been looking at. i am trying to find the program that handles the submits and which one handles the cgi requests.

thanks
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Wed Jul 13, 2016 6:54    Post subject: Reply with quote
rtayek wrote:
... i am trying to find the program that handles the submits and which one handles the cgi requests. ...


seems like it's the nvram program. https://www.dd-wrt.com/wiki/index.php/Hardware

thanks
Specimen
DD-WRT User


Joined: 22 Mar 2013
Posts: 112

PostPosted: Wed Jul 13, 2016 19:37    Post subject: Reply with quote
rtayek wrote:
rtayek wrote:
... i am trying to find the program that handles the submits and which one handles the cgi requests. ...


seems like it's the nvram program. https://www.dd-wrt.com/wiki/index.php/Hardware

thanks


NVRAM is the Non-Volatible Memory, it's where settings are saved to survive power down and reboots. When you change a setting via the WebUI it's where it saves it.
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Wed Jul 13, 2016 20:46    Post subject: Reply with quote
Specimen wrote:
... NVRAM is the Non-Volatible Memory, it's where settings are saved to survive power down and reboots. When you change a setting via the WebUI it's where it saves it.


yes, now i need to find the code or program that is handling the data when the submit is done.

does anyone know where this code lives?

thanks
Specimen
DD-WRT User


Joined: 22 Mar 2013
Posts: 112

PostPosted: Wed Jul 13, 2016 21:01    Post subject: Reply with quote
rtayek wrote:
Specimen wrote:
... NVRAM is the Non-Volatible Memory, it's where settings are saved to survive power down and reboots. When you change a setting via the WebUI it's where it saves it.


yes, now i need to find the code or program that is handling the data when the submit is done.

does anyone know where this code lives?

thanks


I really don't think you are going about this the right way.
I don't know if you ended up using NCS or httpd, but if it's teh first you use the variables it provides in a script, if it's the second you set it up also in a script.
In Administration > Commands > Start up/Custom script.

And also use the scheduler in Administration > Management > Cron.

All this requires Bash knowledge.

On the other hand, modifying the code, which seems to be your method, might originate bugs, conflicts and makes it impossible to upgrade.
rtayek
DD-WRT Novice


Joined: 02 Jul 2016
Posts: 23

PostPosted: Thu Jul 14, 2016 14:59    Post subject: Reply with quote
Specimen wrote:
...

I really don't think you are going about this the right way.
I don't know if you ended up using NCS or httpd, but if it's teh first you use the variables it provides in a script, if it's the second you set it up also in a script.
In Administration > Commands > Start up/Custom script.

And also use the scheduler in Administration > Management > Cron.

All this requires Bash knowledge.

On the other hand, modifying the code, which seems to be your method, might originate bugs, conflicts and makes it impossible to upgrade.


i may be going down the wrong track.

i want to see if i can use the existing httpd without any modifications to it. the routers admin pages save and restore state. httpd uses nvram to persist state. i am trying to find the code or program that does this for the state that gets posted to the admin pages.

i understand sh.

i would like to add my own web page that saves and restores one string variable. this is for some dedicated android tablets talking to a dedicated router.

there are dozens of .webconfig files in www/ that fool around with nvram and capture, so i assume that this is where that persistence gets done, but i don't know where capture is defined.

is there any docs on how the .webconfig filed get used or the capture function?

thanks
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum