<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silicon Labs | LogikDevelopment</title>
	<atom:link href="https://www.logikdev.com/tag/silicon-labs/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.logikdev.com</link>
	<description>&#34;Il n&#039;y a pas de problème, il n&#039;y a que des solutions. L&#039;esprit de l&#039;homme invente ensuite le problème.&#34; André Gide</description>
	<lastBuildDate>Tue, 25 Apr 2017 13:57:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>
	<item>
		<title>CP2102 on DNS-323</title>
		<link>https://www.logikdev.com/2012/08/09/cp2102-on-dns-323/</link>
					<comments>https://www.logikdev.com/2012/08/09/cp2102-on-dns-323/#comments</comments>
		
		<dc:creator><![CDATA[smoreau]]></dc:creator>
		<pubDate>Thu, 09 Aug 2012 16:36:57 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CP2101]]></category>
		<category><![CDATA[CP2102]]></category>
		<category><![CDATA[D-Link]]></category>
		<category><![CDATA[dmesg]]></category>
		<category><![CDATA[DNS-313]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Silicon Labs]]></category>
		<category><![CDATA[USB to RS232 converter]]></category>
		<guid isPermaLink="false">https://www.logikdev.com/?p=1834</guid>

					<description><![CDATA[<p>In one of my personal projects, I needed to connect and use a USB to RS232 (Serial) converter on my D-Link DNS-323. Weird requirements, I know. Anyway&#8230; 😐 Plenty of these converters exist out there, but I choose to go for a CP2102: Innocently, I first tried to compile the code source of this module [&#8230;]</p>
<p>The post <a href="https://www.logikdev.com/2012/08/09/cp2102-on-dns-323/">CP2102 on DNS-323</a> first appeared on <a href="https://www.logikdev.com">LogikDevelopment</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>In one of my personal projects, I needed to connect and use a USB to RS232 (Serial) converter on my D-Link DNS-323. Weird requirements, I know. Anyway&#8230; 😐<br />
Plenty of these converters exist out there, but I choose to go for a <a href="http://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf" target="_blank"><strong>CP2102</strong></a>:</p>
<p><img decoding="async" class="aligncenter size-medium wp-image-1844" title="CP2102" src="https://www.logikdev.com/wp-content/uploads/2012/08/CP2102-300x125.jpg" alt="" width="300" height="125" srcset="https://www.logikdev.com/wp-content/uploads/2012/08/CP2102-300x125.jpg 300w, https://www.logikdev.com/wp-content/uploads/2012/08/CP2102.jpg 458w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>Innocently, I first tried to compile the code source of this module which can be found on the following page:<br />
<a href="http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx" target="_blank">http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx</a></p>
<p>After a few painful and unsuccessful tries, I decided to look around for the already-compiled module. 😉<br />
While wondering why I didn&#8217;t think of that before, I used the instructions below to install the required modules on my NAS:</p>
<pre class="brush: bash; light: true; title: ; notranslate">
cd /mnt/HD_a2/ffp/lib/
mkdir modules
mkdir modules/2.6.12.6-arm1
cd modules/2.6.12.6-arm1
wget http://dev.skcserver.de/dns323/modules_v1.03/kernel/drivers/usb/serial/usbserial.ko
wget http://dev.skcserver.de/dns323/modules_v1.03/kernel/drivers/usb/serial/cp2101.ko
chmod 755 usbserial.ko
chmod 755 cp2101.ko
</pre>
<p>Once the modules are installed, the next step is to initialize them.<br />
I wrote the following script for this purpose so you can execute it anytime you need it:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh

insmod /ffp/lib/modules/2.6.12.6-arm1/usbserial.ko
insmod /ffp/lib/modules/2.6.12.6-arm1/cp2101.ko
mknod /dev/ttyUSB0 c 188 0
chmod 0666 /dev/ttyUSB0
</pre>
<p>At this point in time, you should have your module initialized on your D-Link DNS-323.<br />
You can check the kernel ring buffer using the <strong>dmesg</strong> command to verify it loaded properly.<br />
This is a snapshot of what I have in my kernel ring buffer after I ran the script above:</p>
<pre class="brush: bash; light: true; title: ; notranslate">
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic
usbcore: registered new driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
drivers/usb/serial/usb-serial.c: USB Serial support registered for CP2101
CP2101 1-1:1.0: CP2101 converter detected
usb 1-1: reset full speed USB device using ehci_platform and address 5
usb 1-1: CP2101 converter now attached to ttyUSB0
usbcore: registered new driver CP2101
drivers/usb/serial/cp2101.c: Silicon Labs CP2101/CP2102 RS232 serial adaptor driver v0.04
</pre>
<p>Finally, you can test the communication with your USB to RS232 converter by connecting a LED between the RXD and 3V outputs and running the following script:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh

while &#x5B; true ]
do
echo &quot;hello world!!!&quot; &gt; /dev/ttyUSB0
echo &quot;sent&quot;
sleep 1
done
</pre>
<p>If you see the LED blinking, it means you succeed! 😀</p><p>The post <a href="https://www.logikdev.com/2012/08/09/cp2102-on-dns-323/">CP2102 on DNS-323</a> first appeared on <a href="https://www.logikdev.com">LogikDevelopment</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.logikdev.com/2012/08/09/cp2102-on-dns-323/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
