<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>raspberry pi modbus slave</title><link>https://community.element14.com/products/raspberry-pi/f/forum/31984/raspberry-pi-modbus-slave</link><description>Hello There, Anyone Please help me with Modbus. I am completely new with modbus I am Stuck here. I have to make my Raspberry pi as slave device which will response to modscan32 software. Currently i am using libmodbus stack, but it constantly popping</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><lastBuildDate>Wed, 29 Nov 2017 07:59:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://community.element14.com/products/raspberry-pi/f/forum/31984/raspberry-pi-modbus-slave" /><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114418?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2017 07:59:11 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:1a2d674d-af91-45ca-9689-dc90b2817f1c</guid><dc:creator>rew</dc:creator><description>&lt;p style="margin:0;"&gt;It will be in /dev, but not in dev. The configured device name is wrong. Simple as that. Now we have the full error message it is clear as crystal: There is a typo in the confgured devicename. without the error message we were left guessing if there was a typo in the transcript from the error message, or if there was something else going on. With the full error message, there is a very small chance that he typed it all by hand, and the same device-name-with-typo is mentioned twice in the error message. There is no doubt about it.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Peter, the error message is: &amp;quot;no such file or directory&amp;quot;. So it is NOT a permissions problem. Apparently people have trouble with &amp;quot;it could be this, or it could be that&amp;quot;. Then when it turns out it is not &amp;quot;this&amp;quot;, then the &amp;quot;that&amp;quot; option should be investigated. By suggesting a permissions problem, that cannot be the cause, you risk patil going off on a wild goose chase again. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114401?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2017 07:50:59 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:7d14859e-6a41-45b2-98a1-daa5429e2f6d</guid><dc:creator>Robert Peter Oakes</dc:creator><description>&lt;p style="margin:0;"&gt;Have you enabled it through raspi-config and possibly given yourself permissions if your not running as root ?&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Also look in /dev you should see a file called ttyAMA&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;hope this helps&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114416?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2017 07:46:40 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8ace29cb-33ee-4d02-b6ef-8a9c9d61cce0</guid><dc:creator>rew</dc:creator><description>&lt;p style="margin:0;"&gt;May I refer you to my post above. It gives you the answer. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114400?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2017 07:25:22 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9e86e542-90ee-44fa-87e3-fcdc9e56499d</guid><dc:creator>patil.sunny9999</dc:creator><description>&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/members/rew"&gt;rew&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;&lt;p style="margin:0;"&gt;i have already disabled the bluetooth, and my serial communication is working properly too.&lt;/p&gt;&lt;p style="margin:0;"&gt;as i run my pymodbus server program it shows me that error&lt;/p&gt;&lt;p style="margin:0;"&gt;the complete error it show is as below.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;INFO:pymodbus.server.async:Starting Modbus Serial Server on dev/ttyAMA0&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Traceback (most recent call last):&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; File &amp;quot;/home/pi/pymodbus-master/examples/common/callback-server.py&amp;quot;, line 134, in &amp;lt;module&amp;gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StartSerialServer(context, identity=identity, port = &amp;#39;dev/ttyAMA0&amp;#39;)&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; File &amp;quot;/home/pi/.local/lib/python2.7/site-packages/pymodbus/server/async.py&amp;quot;, line 272, in StartSerialServer&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SerialPort(protocol, port, reactor, baudrate)&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; File &amp;quot;/home/pi/.local/lib/python2.7/site-packages/twisted/internet/_posixserialport.py&amp;quot;, line 37, in __init__&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xonxoff=xonxoff, rtscts=rtscts)&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; File &amp;quot;/home/pi/.local/lib/python2.7/site-packages/serial/serialutil.py&amp;quot;, line 240, in __init__&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.open()&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; File &amp;quot;/home/pi/.local/lib/python2.7/site-packages/serial/serialposix.py&amp;quot;, line 268, in open&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise SerialException(msg.errno, &amp;quot;could not open port {}: {}&amp;quot;.format(self._port, msg))&lt;/p&gt;&lt;p style="margin:0;"&gt;SerialException: [Errno 2] could not open port dev/ttyAMA0: [Errno 2] No such file or directory: &amp;#39;dev/ttyAMA0&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114413?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2017 07:01:24 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:447025c4-6f29-4de1-be22-3c707fab616d</guid><dc:creator>rew</dc:creator><description>&lt;p style="margin:0;"&gt;There are two possibilities. First, there is a / missing in /dev/ttyAMA0 .&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Second, you may have a raspberry pi 3, where ttyAMA is used to communicate with the bluetooth. I&amp;#39;m not sure what the best option would be, but the first thing to try is to&amp;nbsp; activate the disable-bt overlay:&amp;nbsp; Add to&amp;nbsp; /.boot/config.txt:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote class="jive-quote"&gt;&lt;code style="font-style:inherit;font-weight:inherit;font-family:Consolas, Menlo, Monaco, &amp;#39;Lucida Console&amp;#39;, &amp;#39;Liberation Mono&amp;#39;, &amp;#39;DejaVu Sans Mono&amp;#39;, &amp;#39;Bitstream Vera Sans Mono&amp;#39;, &amp;#39;Courier New&amp;#39;, monospace, sans-serif;"&gt;# Disable internal BT&lt;br /&gt;dtoverlay=pi3-disable-bt&lt;/code&gt;&lt;/blockquote&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;P.S. The new &amp;quot;scroll to top of thread&amp;quot; that happens when you press a key while editing a post is highly annoying. I had to finish typing this blind. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114399?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2017 06:34:39 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:06ab2af4-c69d-4453-bf92-dc6f32b6cbe1</guid><dc:creator>patil.sunny9999</dc:creator><description>&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/members/rew"&gt;rew&lt;/a&gt;&lt;/span&gt; &lt;span&gt;&lt;a href="https://community.element14.com/members/peteroakes"&gt;Robert Peter Oakes&lt;/a&gt;&lt;/span&gt; &lt;span&gt;The specified item was not found.&lt;/span&gt; @&lt;/p&gt;&lt;p style="margin:0;"&gt;hello there.&lt;/p&gt;&lt;p style="margin:0;"&gt;can any one please help me with this. &lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;SerialException: [Errno 2] could not open port dev/ttyAMA0: [Errno 2] No such file or directory: &amp;#39;dev/ttyAMA0&amp;#39;&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;i search alot but cannot find the proper solution for it.&lt;/p&gt;&lt;p style="margin:0;"&gt;i am using Raspberry pi 3.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;thank you in advance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114247?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 09:11:15 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:c3789d7c-7637-4db8-9856-2aa5408a41b1</guid><dc:creator>patil.sunny9999</dc:creator><description>&lt;p style="margin:0;"&gt;&lt;a class="jive-link-profile-small jiveTT-hover-user" href="https://www.element14.com/community/people/dhruvvyas90"&gt;dhruvvyas90&lt;/a&gt; &lt;span&gt;&lt;a href="https://community.element14.com/members/rew"&gt;rew&lt;/a&gt;&lt;/span&gt; As i Come out of one Error, I messed with Another one. please suggest me any solution for below error.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;pi@raspberrypi:~/libmodbus-master/rpi-test $ gcc test.c -o test `pkg-config --libs --cflags libmodbus`&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c: In function ‘main’:&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c:45:5: warning: implicit declaration of function ‘modbus_enable_rpi’ [-Wimplicit-function-declaration]&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modbus_enable_rpi(ctx,TRUE);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^~~~~~~~~~~~~~~~~&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c:46:5: warning: implicit declaration of function ‘modbus_configure_rpi_bcm_pin’ [-Wimplicit-function-declaration]&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modbus_configure_rpi_bcm_pin(ctx,BCM_PIN_NO);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c:47:5: warning: implicit declaration of function ‘modbus_rpi_pin_export_direction’ [-Wimplicit-function-declaration]&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modbus_rpi_pin_export_direction(ctx);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c:62:5: warning: implicit declaration of function ‘modbus_rpi_pin_unexport_direction’ [-Wimplicit-function-declaration]&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modbus_rpi_pin_unexport_direction(ctx);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/p&gt;&lt;p style="margin:0;"&gt;/tmp/ccorPCkV.o: In function `main&amp;#39;:&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c:(.text+0xc8): undefined reference to `modbus_enable_rpi&amp;#39;&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c:(.text+0xd4): undefined reference to `modbus_configure_rpi_bcm_pin&amp;#39;&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c:(.text+0xdc): undefined reference to `modbus_rpi_pin_export_direction&amp;#39;&lt;/p&gt;&lt;p style="margin:0;"&gt;test.c:(.text+0x19c): undefined reference to `modbus_rpi_pin_unexport_direction&amp;#39;&lt;/p&gt;&lt;p style="margin:0;"&gt;collect2: error: ld returned 1 exit status&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114252?ContentTypeID=1</link><pubDate>Sun, 19 Nov 2017 13:31:18 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:5a2d5188-c377-4d04-8a96-8e86ea92a1f0</guid><dc:creator>rew</dc:creator><description>&lt;p style="margin:0;"&gt;That means that the compilation requires a file called &amp;quot;modbus.h&amp;quot;. That would be something that comes with a modbus library. So you type:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;apt-cache search modbus&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;This looks for packages wtih &amp;quot;modubs&amp;quot; in the name. &lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;You will see &amp;quot;libmodubs&amp;quot; and libnmodubs-dev. ThThe first one is the run-time, that people running things that use the lib need, the second one will have development files that you need.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Sorry for the typos. &lt;/p&gt;&lt;p style="margin:0;"&gt;Element14 has changed the forum somehow to scroll to the top of the topic for every character that I type. &lt;/p&gt;&lt;p style="margin:0;"&gt;Interesting way to allow peopel eto eneter stuff into a form.... &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114206?ContentTypeID=1</link><pubDate>Sun, 19 Nov 2017 11:12:58 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f0fabc7b-bc82-4669-9b37-0f1931502f19</guid><dc:creator>patil.sunny9999</dc:creator><description>&lt;p style="margin:0;"&gt;&lt;a class="jive-link-profile-small jiveTT-hover-user" href="https://www.element14.com/community/people/dhruvvyas90"&gt;dhruvvyas90&lt;/a&gt; i am using your libmodbus-master stack for RPi test. as i compile test.c from Rpi-test folder it gives me following error&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;quot; test.c:10:20: fatal error: modbus.h: No such file or directory &amp;quot;&lt;/p&gt;&lt;p style="margin:0;"&gt;Please help me out I am beginner with linux and raspberry pi.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Thank you in advance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberry pi modbus slave</title><link>https://community.element14.com/thread/114130?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2017 03:52:08 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cafbf8cc-0165-4c9c-8781-e4c89168ca39</guid><dc:creator>luislabmo</dc:creator><description>&lt;p style="margin:0;"&gt;Hello &lt;span&gt;&lt;a href="https://community.element14.com/members/patil.sunny9999"&gt;patil.sunny9999&lt;/a&gt;&lt;/span&gt;, try these instructions&lt;br /&gt;&lt;a class="jive-link-external-small" href="https://github.com/stephane/libmodbus/wiki/Libmodbus-on-Raspberry-pi" rel="nofollow ugc noopener" target="_blank" title="https://github.com/stephane/libmodbus/wiki/Libmodbus-on-Raspberry-pi"&gt;https://github.com/stephane/libmodbus/wiki/Libmodbus-on-Raspberry-pi&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;Good luck!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>