ROBIN -  Open Source Mesh Network Forum Index ROBIN - Open Source Mesh Network
users community forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

add plugin

 
Post new topic   Reply to topic    ROBIN - Open Source Mesh Network Forum Index -> Absolute Beginner Talk
View previous topic :: View next topic  
Author Message
Ads






Posted: Sun Sep 24, 2017 11:07 am    Post subject: Ads

Back to top
dodolzg
Intermediate User
Intermediate User


Joined: 05 Dec 2010
Posts: 71
Location: Beijing,China

PostPosted: Thu Jan 20, 2011 8:01 am    Post subject: add plugin Reply with quote

first, I edit code in the file rc.httpd and then reboot the router, but it did not work out.
Then I follow the steps by 'adding-plugin-mini-guide.pdf' and create my-plugin file, also did not work out.

My question is do I have to do 'make' to build the image after adding plugin?
Thank you Smile
Back to top
View user's profile Send private message
ispyisail
Site Admin
Site Admin


Joined: 12 Sep 2008
Posts: 4604
Location: New Zealand

PostPosted: Thu Jan 20, 2011 9:55 am    Post subject: Reply with quote

Quote:
adding-plugin-mini-guide.pdf


where?

_________________
ROBIN-Mesh Wiki:

Only registered users can see links on this forum!
Register or Login on forum!

Test Network:
Only registered users can see links on this forum!
Register or Login on forum!



Please donate to ROBIN by paypal:

Only registered users can see links on this forum!
Register or Login on forum!

!
Back to top
View user's profile Send private message
dodolzg
Intermediate User
Intermediate User


Joined: 05 Dec 2010
Posts: 71
Location: Beijing,China

PostPosted: Thu Jan 20, 2011 9:59 am    Post subject: Reply with quote


Only registered users can see links on this forum!
Register or Login on forum!

Back to top
View user's profile Send private message
Antonio (isleman)
Site Admin
Site Admin


Joined: 10 Feb 2008
Posts: 2323
Location: Toscana, Italy

PostPosted: Thu Jan 20, 2011 10:20 am    Post subject: Re: add plugin Reply with quote

dodolzg wrote:
first, I edit code in the file rc.httpd and then reboot the router, but it did not work out.
Then I follow the steps by 'adding-plugin-mini-guide.pdf' and create my-plugin file, also did not work out.

My question is do I have to do 'make' to build the image after adding plugin?
Thank you Smile

If you edit an executable file inside a node (and you save the changes) that file will work according your changes. Then, if you want consolidate your changes on all your nodes you might:
- copy the edited file to the other nodes (easiest way)
or
- copy the edited file in your toolchain, build your own image and flash all the nodes

Can you share your changes to rc.httpd script? maybe a typo or a syntax error is hidden there... more eyes are better than two Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dodolzg
Intermediate User
Intermediate User


Joined: 05 Dec 2010
Posts: 71
Location: Beijing,China

PostPosted: Thu Jan 20, 2011 10:34 am    Post subject: Reply with quote

Code:
case $1 in
   start)
      #here is edited code
      ifconfig ath1 101.231.100.1 netmask 255.255.255.0 up
     /etc/init.d/dhcpd start
    
      [ -x "$HTTPD_BIN" ] || return 1

      httpd_config
#E-MESH
      /usr/sbin/httpd -p 80 -h /www -c /etc/httpd.conf -r "E-MESH"
      logger -st ${0##*/} "started"
      ;;

   stop)
      killall httpd
      logger -st ${0##*/} "stopped"
      ;;

   restart)
      killall httpd
      logger -st ${0##*/} "stopped"
      sleep 3
      
      #here is edited code
      ifconfig ath1 101.231.100.1 netmask 255.255.255.0 up
     /etc/init.d/dhcpd start
    
      [ -x "$HTTPD_BIN" ] || return 1
      httpd_config
#E-MESH
      /usr/sbin/httpd -p 80 -h /www -c /etc/httpd.conf -r "E-MESH"
      logger -st ${0##*/} "started"
      ;;
esac
Back to top
View user's profile Send private message
Antonio (isleman)
Site Admin
Site Admin


Joined: 10 Feb 2008
Posts: 2323
Location: Toscana, Italy

PostPosted: Thu Jan 20, 2011 11:19 am    Post subject: Reply with quote

Code:
      #here is edited code
      ifconfig ath1 101.231.100.1 netmask 255.255.255.0 up
     /etc/init.d/dhcpd start


dnsmasq (or better, nameserver and dhcpd) is already running when rc.httpd is launched, so invoking
/etc/init.d/dhcpd start
will fail because dnsmasq cant bind the needed socket (it's already in use by the running dnsmasq process).

Anyway, changing ath1 IP address on-the-fly is not a good idea.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dodolzg
Intermediate User
Intermediate User


Joined: 05 Dec 2010
Posts: 71
Location: Beijing,China

PostPosted: Fri Jan 21, 2011 2:08 am    Post subject: Reply with quote

Antonio (isleman) wrote:

dnsmasq (or better, nameserver and dhcpd) is already running when rc.httpd is launched, so invoking
/etc/init.d/dhcpd start
will fail because dnsmasq cant bind the needed socket (it's already in use by the running dnsmasq process).

Anyway, changing ath1 IP address on-the-fly is not a good idea.


Actually, I use E-Mesh, I tested the command
Code:
ifconfig ath1 101.231.100.1 netmask 255.255.255.0 up
     /etc/init.d/dhcpd start

via SSH after booting router, 'ifconfig' works well, 'dhcpd start ' return some error message 'no entry to leases'.
After I did these two command, PC could access address by DHCP although 'dhcpd start ' failed.
Back to top
View user's profile Send private message
Antonio (isleman)
Site Admin
Site Admin


Joined: 10 Feb 2008
Posts: 2323
Location: Toscana, Italy

PostPosted: Fri Jan 21, 2011 7:57 am    Post subject: Reply with quote

Quote:
Actually, I use E-Mesh,...

ask them, I can offer help only about not-customized Robin Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dodolzg
Intermediate User
Intermediate User


Joined: 05 Dec 2010
Posts: 71
Location: Beijing,China

PostPosted: Fri Jan 21, 2011 8:11 am    Post subject: Reply with quote

thank you Very Happy
Back to top
View user's profile Send private message
dodolzg
Intermediate User
Intermediate User


Joined: 05 Dec 2010
Posts: 71
Location: Beijing,China

PostPosted: Wed Feb 23, 2011 3:52 am    Post subject: Reply with quote

Q1:In 'adding-plugin-mini-guide', I don't understand step b)reply section, any one explain it?

Q2:If I don't have to use variable, do I need to do the step a and b?
Back to top
View user's profile Send private message
dodolzg
Intermediate User
Intermediate User


Joined: 05 Dec 2010
Posts: 71
Location: Beijing,China

PostPosted: Wed Feb 23, 2011 9:27 am    Post subject: Reply with quote

forget e-mesh, now I am talking about robin mesh Smile
Back to top
View user's profile Send private message
dodolzg
Intermediate User
Intermediate User


Joined: 05 Dec 2010
Posts: 71
Location: Beijing,China

PostPosted: Sat Mar 19, 2011 7:02 am    Post subject: Reply with quote

I tried to add plugin 'Hello World' by following the file: 'adding-plugin-mini-guide.pdf'
I am confused with some points.
a) UCI configuration file for my-plugin /etc/config/my-plugin
b) the related section #@#config my-plugin and its directives in the dashboard reply, aimed to change the plugin configuration via the dashboard entries.
c) the "updater" script /usr/sbin/update-my-plugin.sh that has the task to parse and update the configuration file
d) start/stop script /etc/init.d/rc.my-plugin if my-plugin acts as a daemon

Question:I just want to add a plugin that printf 'Hello World!', so do I need to do the step a) ,b) and c)? cause the plugin 'Hello World' don't need to configue variable. I did step d), the plugin can run by command './my-plugin start', but it can't run at boot.
Any idea? Thanks! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ROBIN - Open Source Mesh Network Forum Index -> Absolute Beginner Talk All times are GMT + 1 Hour
Page 1 of 1

 
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
c d
e



Powered by phpBB © 2001, 2005 phpBB Group

Abuse - Report Abuse - TOS & Privacy.
Powered by forumup.it free forum, create your free forum! Created by Hyarbor & Qooqoa
Confirmed

Page generation time: 0.43