{"id":8595,"date":"2015-07-01T11:42:47","date_gmt":"2015-07-01T16:42:47","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=8595"},"modified":"2021-09-13T15:58:33","modified_gmt":"2021-09-13T20:58:33","slug":"mtac-mfser-usage","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/mlinux-using-accessory-cards\/mtac-mfser-usage\/","title":{"rendered":"MTAC-MFSER Usage"},"content":{"rendered":"<div class=\"note\">Hardware specific information for this card is available on the <a href='https:\/\/www.multitech.net\/developer\/products\/multiconnect-conduit-platform\/accessory-cards\/mtac-mfser\/' title='MTAC-MFSER'>MTAC-MFSER<\/a> page.<\/div>\n<p>The multi-function serial accessory card supports these modes:<\/p>\n<ul>\n<li>Loopback (<strong><em>default<\/em><\/strong>) (<code>loopback<\/code>)<\/li>\n<li>RS-232 with RTS\/CTS flow control (<code>rs232<\/code>)\n<ul>\n<li>For RS232, the supported range of speeds are (in bps): 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, and 921600.<\/li>\n<\/ul>\n<\/li>\n<li>RS422\/485 full-duplex (<code>rs422-485-full<\/code>)<\/li>\n<li>RS-485 half-duplex (<code>rs485-half<\/code>)\n<ul>\n<li>For rs422-485-full with 1000ft cable, the speeds that have been tested are (in bps): 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600, 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, 3500000, and 4000000.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Use the provided <a href='https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/utilities\/io-control-using-mts-io\/' title='I\/O Control Using mts-io'>mts-io-sysfs utility<\/a> to interface with the accessory card.<\/strong><\/p>\n<p><strong>Examples:<\/strong><\/p>\n<p>Set RS-232 mode (depending on which port the card is connected to):<\/p>\n<pre class=\"brush:shell\">$ mts-io-sysfs store ap1\/serial-mode rs232<\/pre>\n<p>OR<\/p>\n<pre class=\"brush:shell\">$ mts-io-sysfs store ap2\/serial-mode rs232<\/pre>\n<p>Set RS-422-485-full mode (depending on which port the card is connected to):<\/p>\n<pre class=\"brush:shell\">$ mts-io-sysfs store ap1\/serial-mode rs422-485-full<\/pre>\n<p>OR<\/p>\n<pre class=\"brush:shell\">$ mts-io-sysfs store ap2\/serial-mode rs422-485-full<\/pre>\n<p>Launch terminal with microcom:<\/p>\n<pre class=\"brush:shell\">$ microcom -s 115200 \/dev\/ttyAP1<\/pre>\n<pre class=\"brush:shell\">$ microcom -s 115200 \/dev\/ttyAP2<\/pre>\n<p>Ctrl-X will close the microcom session.<br \/>\n<strong>Additional configuration for RS-485 half duplex mode:<\/strong><\/p>\n<p>In addition to configuring the serial transceiver using mts-io-sysfs, the UART must also be configured for RS-485 half-duplex.\u00a0mLinux<sup>\u2122\u00a0<\/sup>provides a simple command-line utility to configure this mode using an ioctl() C call.<\/p>\n<p>Note that if you are using set-rs485 in conjunction with other software that doesn&#8217;t enable RS485 mode (such as minicom), you must call set-rs485 *after* the port has been opened and initialized. Otherwise, the RS485 mode setting will be cleared when the port is initialized. <em>Also, note that the RS-485 half duplex requires a different cable from the full duplex.\u00a0<\/em><\/p>\n<p>Configure UART for RS-485 half-duplex:<\/p>\n<pre class=\"brush:shell\">$ set-rs485 \/dev\/ttyAP1 1<\/pre>\n<p>Disable:<\/p>\n<pre class=\"brush:shell\">$ set-rs485 \/dev\/ttyAP1 0<\/pre>\n<p>To integrate this functionality into your own C application, see the <code>setRS485()<\/code> function in the set-rs485 source for an example:<br \/>\n<a title=\"set-rs485.c\" href=\"http:\/\/git.multitech.net\/cgi-bin\/cgit.cgi\/meta-mlinux.git\/tree\/recipes-extended\/multitech\/set-rs485\/set-rs485.c\">http:\/\/git.multitech.net\/cgi-bin\/cgit.cgi\/meta-mlinux.git\/tree\/recipes-extended\/multitech\/set-rs485\/set-rs485.c<\/a><\/p>\n<p><strong>Getting Started<\/strong><br \/>\nBasic RS422-485-full test:<\/p>\n<ol>\n<li>Install DTE card in API and DCE card in AP2 of MTCDT.<\/li>\n<li>Type the following commands to MTCDT:<br \/>\n<code>\"mts-io-sysfs store ap1\/serial-mode rs422-485-full\"<br \/>\n\"mts-io-sysfs store ap2\/serial-mode rs422-485-full\"<br \/>\n\"mts-io-sysfs store ap1\/rs4xx-term-res 1\"<br \/>\n\"mts-io-sysfs store ap2\/rs4xx-term-res 1\"<\/code><\/li>\n<li>Connect ports together through 1000-foot Cat 5e cable.<\/li>\n<li>Establish to ssh connections to MTCDT and run minicom on each one. Have one minicom session use serial device \/dev\/ttyAP1. Have the other one use \/dev\/ttyAP2. Configure both for required speed with HW flow control enabled.<\/li>\n<li>Type some characters in each minicom session and observe whether the characters are output in the opposite minicom session.<\/li>\n<\/ol>\n<p>Basic RS-232 test:<\/p>\n<ol>\n<li>Install DTE serial card in AP1, and install DCE serial card in AP2 of MTCDT.<\/li>\n<li>Power up the MTCDT, log in as root, and Enter the following commands:<br \/>\n<code>mts-io-sysfs store ap1\/serial-mode rs232<br \/>\nmts-io-sysfs store ap2\/serial-mode rs232<\/code><\/li>\n<li>Establish two SSH connections to the MTCDT. On one run minicom and connect to \/dev\/ttyAP1. On the other run minicom and connect to \/dev\/ttyAP2. Set both connections to required speed and hardware flow control.<\/li>\n<li>Connect a serial cable between the two serial cards.<\/li>\n<li>Type some characters in each minicom session and observe whether the characters are visible on the opposite minicom session.<\/li>\n<\/ol>\n<p>File Transfer:<\/p>\n<p>For further testing, you can also try transferring files between two ports using zmodem file transfer.<\/p>\n<ol>\n<li>Perform zmodem file transfers between the serial ports &#8211; first in one direction, then in the other using a utility that supports zmodem for example TeraTerm.<\/li>\n<li>Observe the file transfer speeds.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Hardware specific information for this card is available on the page. The multi-function serial accessory card supports these modes: Loopback (default) (loopback) RS-232 with RTS\/CTS flow control (rs232) For RS232, the supported range of speeds are (in bps): 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, and 921600. RS422\/485 full-duplex (rs422-485-full) [&hellip;]<\/p>\n","protected":false},"author":1235,"featured_media":0,"parent":7909,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-8595","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/8595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1235"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=8595"}],"version-history":[{"count":18,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/8595\/revisions"}],"predecessor-version":[{"id":9140,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/8595\/revisions\/9140"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/7909"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=8595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}