writing a modbus program for a OpenWRT router using libmodbus C (rewrite Python app to C)
location: linuxexchange.com - date: November 26, 2014
I am trying to write a program that will run on my Open-wrt router, to reads some registers from a modbus device. The only way I have found to do this is to write the program in C. I have written a simple working Python app for communicating with the Modbus RTU slave device from my PC:
m = minimalmodbus.Instrument('/dev/ttyUSB0', 2) # port name, slave address (in decimal)
m.serial.baudrate = 19200
m.serial.bytesize = 8
m.serial.stopbits = 2
m.serial.parity = serial.PARITY_NONE
data = m.read_registers(0, 2, 3) # 3 = Read holding register
print "Value A = ", data
print "Value B = ", data
if (data < 20):
send = 1
send = 0
m.write_register(2, send, 0, 16) # 16 = Write multiple registers
Now I need to rewrite my code to C using libmodbus or some other C modbus library. I cannot install python to the device, as it only has 4MB of space, so my only option is to use C/C++.
I found this example code f
[SOLVED] CheckNRPE from Ubuntu server to OpenWRT router. Connection refused by host
location: linuxquestions.com - date: May 23, 2011
I am trying to monitorize an OpenWRT (Backfire 10.03, r23115) router from an Ubuntu server, but I am having some problems.
I have installed Nrpe (2.12) on the remote host (OpenWRT), I have executed the program as a deamon (/usr/sbin/nrpe -d) but when I start the NRPE deamon, I don't get anything about NRPE executing netstat -at or ps -ef.
I would need to install check_nrpe on OpenWRT to find out if NRPE is working, but I can't find any ipk package with it.
Now, once in the monitoring host when I try to reach the remote host from the server:
/usr/local/nagios/libexec/check_nrpe -H ip_remote_host
I get: Connection refused by host
Even, trying with localhost:
/usr/local/nagios/libexec/check_nrpe -H localhost
I get the same error: Connection refused by host
I have installed Nagios Plugins and the check_nrpe plugin.
I have edited the /etc/nrpe.cfg file:
So, I don't exactly know if it is remote host's fault,
Iptables Forwarding Problem OpenWRT
- date: November 30, 2006
Hey guys, I have a problem with OpenWrt and port forwarding. If anyone has ideas please let me know.
-bash-2.05b$ ssh -l root -v ****no.ip.info
OpenSSH_4.3, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to *******[75.40.***.**] port 22.
debug1: connect to address 75.40.***.*** port 22: Connection refused
ssh: connect to host ********* port 22: Connection refused
-bash-2.05b$ telnet *** 10001
-bash-2.05b$ telnet *** 10003
Followed these instructions for my firewall setup:
This is the odd message I recieve:
:/etc# . /etc/init.d/S35firewall restart
/etc/fwlib.sh: 18: interface: not found
/etc/firewall.user: 6: -j: not found
/etc/firewall.user: 6: -j: not found
/etc/firewall.user: 7: -j: not found
/etc/firewall.user: 7: -j: not found
FORWARDING 113 TO doug (192.168.0.107)
Which do you prefer: OpenWRT, DDWRT or Tomato?
location: linuxquestions.com - date: March 20, 2010
My main wireless is an ActionTek DSL modem: it handles my incoming DSL, all my DHCP and DDNS, and it's a good Wifi base station throughout the house. Life is Good.
I want wired access to a desktop PC upstairs: I tried a USB wireless stick, and it just isn't cutting it. I'm hoping I can use an old WRT54G wireless router, install some hew firmware, and use it as a wireless access point. I would like to plug the desktop into the WRT54G (cabled), have the WRT54G get a DHCP address and register the desktop's hostname in DDNS (wireless), and have everything work.
Q: Is "wireless access point" the correct term here?
Q: Should I go with OpenWRT (suggested in a previous post: looks very promising), DD-WRT, or Tomato?
Any feedback, suggestions or advice would be appreciated!
Thanx in advance .. PSM
seeking "List of Features" for OpenWRT
location: linuxquestions.com - date: July 5, 2011
I just spent an hour at Google and the OpenWRT site looking for something that might be called a "List of Features." I did not find one.
I did find this: https://forum.openwrt.org/viewtopic.php?pid=33 but it is not an official project document so I'm left with as many questions as answers.
I know that OpenWRT uses dynamic packages for feature deployment, but I'd expect some sort of grid page -- package vs. edition -- or similar so that one might have some idea what is available to choose from.
I know that part of the Linux sociology involves some amount of "you just gotta know." However, unless one is a networking maven or wonk one does not know enough about network features to state which features one wants ... much less know what name to use in search or discussion.
Playing with 802.11 MAC Layer in OpenWRT Question!
location: linuxquestions.com - date: October 30, 2010
I'm using OpenWRT (linux distro) for research. I would like to do some small mods to the MAC layer. Specifically on the ID/Duration field sent on each packet.
So in order to do this:
1) Do I have to change the src MAC files and re-build OpenWRT (and of course install on the WRT54GL box)? (what files should i need to change?)
2) Can I simply use unix raw sockets to write this field, or is that field finally written by the driver/prebuilt process? Can I write the MAC Duration field with raw sockets?
Ubuntu vs OpenWrt for x86 embedded hardware
location: ubuntuforums.com - date: January 20, 2014
what are the advantages in installing Ubuntu Linux on x86 based hardware compared to x86?
Besides the increased kernel loading time (which is likely to be smaller for OpenWrt), I don't see any advantage in installing openwrt in such devices
Do you agree?
Any good books on linux networking for a beginner? (re: OpenWRT)
location: linuxquestions.com - date: April 25, 2005
I'm a newbie to linux. I've used it before, but only very very little. I know enough to get it running but I don't know the first thing about setting up networking with it or even how to read the routing table (eg. "route" command).
So, this weekend I purchased a WRT54G router and installed OpenWRT onto it (basically it's a mini-linux distribution that gives you incredible control over the router).
That brings me to where I'm at now. I'm looking to setup port forwarding, etc, but I'd like to learn how to do it. Moreso, I'd like to learn about linux networking in general so I can better understand how things work and not just how to get them to work.
Basically I'm looking for a good book (or other resource, but I'd prefer a good book) on linux networking. I'm a subscriber to O'Reilly Network Safari Bookshelf, so any books that are available on there is a plus.
Here's what I'm looking to learn:How routing works <--- this is a big one and I think I need to
Do you use ddwrt or OpenWrt on your router? Tell us about it!
location: ubuntuforums.com - date: October 7, 2007
The title pretty much sums it up!
My personal interest is that I have a Linksys WRT54GL V1.1 which I plan to install either dd-wrt or OpenWrt on. For me it's not simply a case of wanting to run Linux on the router. By default the router has support for DDNS through DynDNS. But I want to use it with my provider, which is compatible with the DynDNS service but has their own servers. There is no option to change that by default, which is why I hope either one of these can help me out.
Tell us about what problems you have faced, if it was difficult to install, what you use it for. There's at least one person who's interested in reading everything you have to say about these two software replacements.
Thanks for reading, I hope you have somthing to share with us!
openwrt Vs ddwrt Vs tomato
location: linuxquestions.com - date: December 8, 2010
i have dlink dir-300 router which i flashed to dd-wrt v24 preSP2 (Build13064.
I wish to try openwrt now,but i do not know how is openwrt Different from dd-wrt? Does any one have any info regarding this? All i read was openwrt is much more linux like than dd-wrt. Thanks !
Page: 1 2 3 4 5 6 7 8 9 10