<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/</id><updated>2020-10-01T14:07:03.282000Z</updated><subtitle>Recent posts to USB Stick Detection</subtitle><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25&amp;page=1#f54c/07e1/341d/2971" rel="alternate"/><published>2020-10-01T14:07:03.282000Z</published><updated>2020-10-01T14:07:03.282000Z</updated><author><name>Morberis</name><uri>https://forge.codesys.com/u/morberis/</uri></author><id>https://forge.codesys.com2c8b8ea5e5569ab118ae3b9798391bd71c5f8c69</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I don't really need it thankfully. I do thank you for your help, as well everyone in this thread has been great. I'm just out of time for now. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25&amp;page=1#f54c/07e1/341d" rel="alternate"/><published>2020-10-01T07:37:17.767000Z</published><updated>2020-10-01T07:37:17.767000Z</updated><author><name>Chris.O</name><uri>https://forge.codesys.com/u/chris-o/</uri></author><id>https://forge.codesys.com1be7051e4e8ce8658d0fd7f3d69dac06257be7bf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If you need detection of USB drive I recommend to do it with the command lsblk (Like Reinier Geers) :-) It seems that it work very well.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25&amp;page=1#f54c/07e1" rel="alternate"/><published>2020-09-30T18:26:02.040000Z</published><updated>2020-09-30T18:26:02.040000Z</updated><author><name>Morberis</name><uri>https://forge.codesys.com/u/morberis/</uri></author><id>https://forge.codesys.com87e64ce627ab7853e95be6cf7333ef894606cb1c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Nah the path is definately correct. At least it's correct when the usb drive is inserted. &lt;/p&gt;
&lt;p&gt;For now I'm forgoing detection of a USB drive. If the copy operation fails or gets stuck that's all the feedback I need and it works consistently. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25#16ec/4e6a/c68d/1d3a/9b81/d684/9bd9/1476/0a55/111f/ef9c/fdec/fe32/0e78/a1da" rel="alternate"/><published>2020-09-30T14:05:55.567000Z</published><updated>2020-09-30T14:05:55.567000Z</updated><author><name>Chris.O</name><uri>https://forge.codesys.com/u/chris-o/</uri></author><id>https://forge.codesys.comcf262d4a9b4524b2c2dc05a94f792740489963a1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ok great... &lt;br/&gt;
I don't know what is the better way... I would use what works better... you can check if the cycle time of your task changes or your cpu load changes with this commands...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25#16ec/4e6a/c68d/1d3a/9b81/d684/9bd9/1476/0a55/111f/ef9c/fdec/fe32/0e78" rel="alternate"/><published>2020-09-30T13:40:55.431000Z</published><updated>2020-09-30T13:40:55.431000Z</updated><author><name>Reinier Geers</name><uri>https://forge.codesys.com/u/reinier-geers/</uri></author><id>https://forge.codesys.com090277fe67a9447c87cb8e9cc95f4274031dc7e7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thats working.  Now the end question. Witch on is better. DF or lsusb . Df reads the directory. and lsusb an  status.  so i would think that its better to check a status every second then to read every second a directory.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25#16ec/4e6a/c68d/1d3a/9b81/d684/9bd9/1476/0a55/111f/ef9c/fdec/fe32" rel="alternate"/><published>2020-09-30T12:55:31.486000Z</published><updated>2020-09-30T12:55:31.486000Z</updated><author><name>Chris.O</name><uri>https://forge.codesys.com/u/chris-o/</uri></author><id>https://forge.codesys.com8f4036b635e931fb7d4ef37d7bab3d8e5d902c73</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ok, sounds good.&lt;br/&gt;
Try command: df -h grep "your path name"&lt;/p&gt;
&lt;p&gt;e.g. df -h grep /media/sda1&lt;/p&gt;
&lt;p&gt;Then string should be shorter and you can see more.&lt;/p&gt;
&lt;p&gt;please try inside putty df -h and have a look what is displayed.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25#16ec/4e6a/c68d/1d3a/9b81/d684/9bd9/1476/0a55/111f/ef9c/fdec" rel="alternate"/><published>2020-09-30T12:19:35.392000Z</published><updated>2020-09-30T12:19:35.392000Z</updated><author><name>Reinier Geers</name><uri>https://forge.codesys.com/u/reinier-geers/</uri></author><id>https://forge.codesys.comc67d3362546db5115f019cab5ad8a1cad6d23d8f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;df -h  is working.  But cant find sda1.&lt;br/&gt;
ill think find also is limited to 255 &lt;br/&gt;
i can see it in the string&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25#16ec/4e6a/c68d/1d3a/9b81/d684/9bd9/1476/0a55/111f/ef9c" rel="alternate"/><published>2020-09-30T09:52:43.303000Z</published><updated>2020-09-30T09:52:43.303000Z</updated><author><name>Chris.O</name><uri>https://forge.codesys.com/u/chris-o/</uri></author><id>https://forge.codesys.coma3c91463ebecc0036b64394a0c14c127c817d1bb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ok.... may command df -h is working?&lt;/p&gt;
&lt;p&gt;Should give you something like this:&lt;br/&gt;
Filesystem      Size  Used Avail Use% Mounted on&lt;br/&gt;
udev            1.9G     0  1.9G   0% /dev&lt;br/&gt;
tmpfs           383M  5.9M  377M   2% /run&lt;br/&gt;
/dev/mmcblk0p2   27G  5.5G   20G  23% /&lt;br/&gt;
tmpfs           1.9G  1.5M  1.9G   1% /dev/shm&lt;br/&gt;
tmpfs           5.0M     0  5.0M   0% /run/lock&lt;br/&gt;
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup&lt;br/&gt;
tmpfs            70M  360K   70M   1% /var/log&lt;br/&gt;
/dev/mmcblk0p1  511M  5.1M  506M   1% /boot/efi&lt;br/&gt;
/dev/mmcblk1     30G   43M   29G   1% /media/sd&lt;br/&gt;
tmpfs           383M     0  383M   0% /run/user/0&lt;br/&gt;
none            120M   40K  120M   1% /mnt/ramdisk&lt;br/&gt;
/dev/sda         16G  4.8G   11G  32% /media/sda&lt;/p&gt;
&lt;p&gt;In my case here  /dev/mmcblk1 is my sd-card (mounted at /media/sd&lt;br/&gt;
and /dev/sda is my usb-stick (mounted at /medai/sda)&lt;/p&gt;
&lt;p&gt;with command df -h grep /media/sda&lt;br/&gt;
you should get&lt;br/&gt;
Filesystem      Size  Used Avail Use% Mounted on&lt;br/&gt;
/dev/sda         16G  4.8G   11G  32% /media/sda&lt;/p&gt;
&lt;p&gt;THis are 96 characters and you can search for /media/sda...or your usb-directory&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25#16ec/4e6a/c68d/1d3a/9b81/d684/9bd9/1476/0a55/111f" rel="alternate"/><published>2020-09-30T09:44:38.065000Z</published><updated>2020-09-30T09:44:38.065000Z</updated><author><name>Reinier Geers</name><uri>https://forge.codesys.com/u/reinier-geers/</uri></author><id>https://forge.codesys.com83c30f98c18d1130e28e4705ec5a2b8138286662</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;putty gives : -sh: lsblk: command not found&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>USB Stick Detection</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/92da99d5f9/?limit=25#16ec/4e6a/c68d/1d3a/9b81/d684/9bd9/1476/0a55" rel="alternate"/><published>2020-09-30T08:57:34.328000Z</published><updated>2020-09-30T08:57:34.328000Z</updated><author><name>Chris.O</name><uri>https://forge.codesys.com/u/chris-o/</uri></author><id>https://forge.codesys.com91a629cb9651e4f75c3497376729f38609a9314f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK, then may install putty to your desktop-pc and connect your sps to your desktop pc... with putty you will get connection to your sps (with the ip-adress) then you can log in with user and password (e.g. user = root and PW = root or something like this). THen please try your command lsblk&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>