<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jun wu</title>
    <description>The latest articles on DEV Community by Jun wu (@mershaywu).</description>
    <link>https://dev.to/mershaywu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F991379%2Fb5bdb089-59cd-4206-bd7b-41aa3830cfe6.gif</url>
      <title>DEV Community: Jun wu</title>
      <link>https://dev.to/mershaywu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mershaywu"/>
    <language>en</language>
    <item>
      <title>Capture VLAN tag with wireshark</title>
      <dc:creator>Jun wu</dc:creator>
      <pubDate>Fri, 16 Dec 2022 11:59:31 +0000</pubDate>
      <link>https://dev.to/mershaywu/capture-vlan-tag-with-wireshark-3c02</link>
      <guid>https://dev.to/mershaywu/capture-vlan-tag-with-wireshark-3c02</guid>
      <description>&lt;p&gt;Wireshark is widely used for Ethernet communication development.I have some projects need testing the Ethernet packets with &amp;amp; without VLAN tag.  In this case, we need consider the following conditions for validation.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The publisher send the packets with/without VLAN tag&lt;/li&gt;
&lt;li&gt;The Ethernet Switch can be setup to keep/remove the VLAN tag&lt;/li&gt;
&lt;li&gt;The subscriber may see / not see the VLAN tag depend on the OS and driver configuration.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Typically wireshark is used as a validation tool. Here is the link from wireshark&lt;br&gt;
&lt;a href="https://wiki.wireshark.org/CaptureSetup/VLAN"&gt;https://wiki.wireshark.org/CaptureSetup/VLAN&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My environment is windows + USB3 Ethernet Adapter (ASIX AX88179), there is an solution from the vendor to capture/keep VLAN tag in the driver:&lt;/p&gt;

&lt;p&gt;Please set the "Packet Priority &amp;amp; VLAN" parameter of ASIX USB to LAN Windows drivers to "Packet Priority &amp;amp; VLAN Disable" to capture the VLAN tagged packets on WireShark.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--meP1SrWA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8m8gjdj4rorpkdi2dxox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--meP1SrWA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8m8gjdj4rorpkdi2dxox.png" alt="Image description" width="640" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to print your log in VxWorks 6.x</title>
      <dc:creator>Jun wu</dc:creator>
      <pubDate>Fri, 16 Dec 2022 11:36:59 +0000</pubDate>
      <link>https://dev.to/mershaywu/how-to-print-your-log-in-vxworks-6x-2phf</link>
      <guid>https://dev.to/mershaywu/how-to-print-your-log-in-vxworks-6x-2phf</guid>
      <description>&lt;h2&gt;
  
  
  Issue:
&lt;/h2&gt;

&lt;p&gt;For embedded software developer using printf  is the most used debug method on target. But in vxworks6.x, it start to change because the default stdout/stderr is redirected. If you connect to device by shell/telnet, printf in the code will not put to the stdout/stderr in the current shell.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution:
&lt;/h2&gt;

&lt;p&gt;You can put a the following code in the debug version. Once you have connect to target by shell/telnet, call the function to redirect some task /all task io to the current shell.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void ioRedirect(void)
{
    int shellTid = 0;
    int shellOpFd = 0;
    int globalStdFd = 0;

    shellTid = taskIdSelf();
    shellOpFd = ioTaskStdGet(shellTid, 1);
    globalStdFd = ioGlobalStdGet(1);

    (void)logMsg("LM:Initial task output.shellFd %d, GlobalFd %d.\n", shellOpFd, globalStdFd, 0, 0, 0, 0);

    printf("p:Initial task output.shellFd %d, GlobalFd %d.\n", shellOpFd, globalStdFd);

    /*you can specify the task who need printf*/
    /*ioTaskStdSet(GSETaskId,1,shellOpFd);
    ioTaskStdSet(mstEvtId,1,shellOpFd);*/

    /*or set the global io*/
    ioGlobalStdSet(1, shellOpFd);
    globalStdFd = ioGlobalStdGet(1);

    logMsg("LM:Initial task output.shellFd %d, GlobalFd change to %d.\n", shellOpFd, globalStdFd, 0, 0, 0, 0);

    printf("p:Initial task output to globalStdFd %d.\n", globalStdFd);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Minikube on Ubuntu - Could Not Read CA certificate</title>
      <dc:creator>Jun wu</dc:creator>
      <pubDate>Fri, 16 Dec 2022 11:25:49 +0000</pubDate>
      <link>https://dev.to/mershaywu/minikube-on-ubuntu-could-not-read-ca-certificate-4ha2</link>
      <guid>https://dev.to/mershaywu/minikube-on-ubuntu-could-not-read-ca-certificate-4ha2</guid>
      <description>&lt;p&gt;Follow &lt;a href="http://computerbryan.com/minikube-on-ubuntu.html"&gt;http://computerbryan.com/minikube-on-ubuntu.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But with minor modifiton to the solution:&lt;br&gt;
Add the following line to file /var/lib/snapd/apparmor/profiles/snap.docker.docker&lt;/p&gt;

&lt;p&gt;&lt;code&gt;owner @{HOME}/.minikube/certs/* r,&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
