<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ganioc yang on Medium]]></title>
        <description><![CDATA[Stories by ganioc yang on Medium]]></description>
        <link>https://medium.com/@ganioc?source=rss-6275b1589bc8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-D827H76ezXt54YwJVMPHA@2x.jpeg</url>
            <title>Stories by ganioc yang on Medium</title>
            <link>https://medium.com/@ganioc?source=rss-6275b1589bc8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 11:52:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ganioc/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Use Raspberry Pi 4 to control R&S instruments]]></title>
            <link>https://medium.com/@ganioc/use-raspberry-pi-4-to-control-r-s-instruments-7b933434dbca?source=rss-6275b1589bc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b933434dbca</guid>
            <category><![CDATA[raspberry-pi-4]]></category>
            <dc:creator><![CDATA[ganioc yang]]></dc:creator>
            <pubDate>Wed, 06 Apr 2022 08:13:31 GMT</pubDate>
            <atom:updated>2022-04-06T08:13:31.777Z</atom:updated>
            <content:encoded><![CDATA[<p>I remember over 10 years ago , how heavily the automation testset relies on Windows operating system and NI-GPIB system in the manufacturing factory. C or C++ were used as the programming language. The USB-GPIB connector would easily cost more than 200 US dollars.</p><p>Nowadays, as I now am handling some Lora RF boards again after so many years, I found things changed a lot. It’s 2022, the 3rd year after Covid-19 born, we no longer need the GPIB gadget like before, and no windows PC required. This is because the open source movement and evolution of cheaper but greater single board linux computer.</p><p>The test setup:</p><ul><li>Raspberry Pi 4, as the test machine, powerful enough to do all the work</li><li>R&amp;S SMBV 100A, as the signal generator to test LoRa sensitivity</li><li>R&amp;S FSC3, as the spectrum analyzer to test LoRa TX performance</li><li>pyvisa, used as the middleware to communicate with the above testers over VXI-11 protocol in tcp/ip packets</li><li>Python2 or Python3 as the programming language</li><li>some LAN cables to connect Raspberry Pi with both testers, we no longer need expensive GPIB cable any more; Thanks God, R&amp;S tester has a default LAN on the back panel.</li></ul><p>Please reference the pyvisa github repository: <a href="https://github.com/pyvisa">https://github.com/pyvisa</a></p><p>Some example codes:</p><pre>import pyvisa</pre><pre>import time</pre><pre>ADDRESS=&quot;192.168.31.63&quot;</pre><pre>resource_manager = pyvisa.ResourceManager()</pre><pre># You can change the variable name and resource name</pre><pre>instrument = resource_manager.open_resource(&quot;TCPIP0::&quot; + ADDRESS + &quot;::inst0::INSTR&quot;)</pre><pre>rtn=instrument.write(&quot;*IDN?&quot;)</pre><pre>print(rtn)</pre><pre>rtn=instrument.read()</pre><pre>print(rtn)</pre><pre>(delay, code)=instrument.write(&quot;*RCL 1&quot;)</pre><pre>print(delay)</pre><pre>print(code)</pre><pre>time.sleep(2)</pre><pre>print(&quot;end&quot;)</pre><pre>instrument.close()</pre><pre># write() just output the remote control command<br># read()  read the feedback<br># query() combine write() , read() together, and get the feedback</pre><p>It’s easier than I have thought.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b933434dbca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[STM32F103 LWIp Ping not working]]></title>
            <link>https://medium.com/@ganioc/stm32f103-lwip-ping-not-working-9bf835e60013?source=rss-6275b1589bc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bf835e60013</guid>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[ganioc yang]]></dc:creator>
            <pubDate>Fri, 01 Sep 2017 07:41:41 GMT</pubDate>
            <atom:updated>2017-09-01T07:41:41.050Z</atom:updated>
            <content:encoded><![CDATA[<p>&gt;During my work of LWIP transfer to my FreeRTOS on stm32F103 , I met ping problem . There is no response at all.</p><p>## Description</p><p>I copied the LWIP code generated by STM32Cube for STM32F107 to my exact project directory. Also I copied STM32 official LWIP examples: HTTPD and TCP echo server as a working base. There is also a very good ENC28J60 driver file on the net. After some modification here and there, DHCP works but a Ping won’t bring any response.</p><p>## WireShark</p><p>I checked with Wireshark, I found the Ping Echo request item with “no response seen”. How could Wireshark know “No response” even before the response is sent back? As I opened the ICMP log by adding “#define ICMP_DEBUG LWIP_DBG_ON” in the lwipopts.h file. It shows my board have received the Ping req packet successfully and send out the response correctly. So what’s going wrong?</p><p>## Problem</p><p>After several hours searching, I double-clicked the log item in Wireshark log window. It shows incorrect checksum in Ping response. Wireshark displayed the log in a send-recv context, so it will add response information “no response” in the request log info.</p><p>## Solution</p><p>Now it’s easy. In lwipopts.h file,</p><pre>#define CHECKSUM_BY_HARDWARE 0 <br>// there is no hardware checksum , we have to do it in software</pre><p>But the checksum values are all 0 in the file . Everything is fine with Ping. Without this modification I don’t think normal TCP or UDP communication will work.</p><pre>// Necessary Modification<br>#define CHECKSUM_GEN_IP  1<br>#define CHECKSUM_GEN_UDP 1</pre><p>## Summary</p><p>IP Checksum should be enabled with hardware or software.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bf835e60013" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The IOT time is coming]]></title>
            <link>https://medium.com/@ganioc/the-iot-time-is-coming-d1477cea1a9b?source=rss-6275b1589bc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1477cea1a9b</guid>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[ganioc yang]]></dc:creator>
            <pubDate>Sun, 24 Jan 2016 01:25:03 GMT</pubDate>
            <atom:updated>2016-01-24T01:25:03.025Z</atom:updated>
            <content:encoded><![CDATA[<p>I wanted to do coding work, sitting in a cubicle, dealing with internet connection, or building apps. I have learned Codecamp course, android app development, but it still seems very hard to become an independent developer . Because I don’t know how to find a customer to pay me to write code for him/her.</p><p>But recently, a friend introduced some hardware work for me , they are willing to pay. I forgot to mention I have been a hardware engineer for a long time, I do RF matching, antenna design, embedded system, till I fed up , I hate telecommunication. And I dream to be working all day ,typing code inside EMACS, which I do spend some to learn, on my beautiful MAC book air. You know what I have been using in those telecommunication company? Old PC, heavy and slow IBM notebook, dirty keyboard. The equipment I use, things from R&amp;S, Agilent , the UI is tedious to the eye.</p><p>I accept one of the work. This customer needs a wifi module for door controller, you can use your smart phone to open the door within wifi range. He want someone to implement a cheaper solution than current one. No big case, I draw schematic, do layout, and pick up Cortex-m4 ARM programming, C language, oh, I miss JavaScript!</p><p>Another guy want a smart toy solution, you can talk to your phone and the toy speak the same word out . The other guy need an NFC solution with wifi connection, so he can change the NFC tag information dynamically.</p><p>All these things need an APP, a server-side program and something hardware with Wifi. This is IOT, Internet of things. And people, know little about hardware, eager to find cheap solution to control something through the internet.</p><p>I see IOT, all of them talk as if they are building something big, and will succeed and then change the world. Nowadays Hardware engineers are cheaper than Internet engineers. But these people can’t afford to hire and make their own hardware development team. They just want to use some hardware solution in their big map, as easy as downloading some open source software. Traditional hardware, mechanical development process does not fit, so they turn to some cheap freelancer.</p><p>IOT products must be cheap from every aspect. I’m still thinking the right way to do it. The customers know the general concept of wifi, some of them even know 3D printing, but none of them know anything inside of the PCB. Of course, do you know the OS kernel? People just use the API provided by OS without bothering to understand it. That’s the way hardware should be.</p><p>A simple APP+Cloud server+Wifi hardware solution is what they want. It must be cheap, robust, full control , easy to use. There will be a lot of customers, sure. I am in Shanghai China, this is what’s happening right now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1477cea1a9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>