From: Hanguang <han...@ho...> - 2008-04-12 20:20:15
|
My team planed to transfer file from Gumstix to PC or PC grab file from Gumstix through Wifistick, either way is fine. We already assigned the IP address for the Wifistick, and we can wirelessly login Gumstix on Fedora terminal using "ss...@ro..." command and transfer files using "rz". What we want to do is try to make the transfer process run automatically so we don't have to manually login and manually transfer files. How to accomplish this task, anybody has idea? Thank you! -- View this message in context: http://www.nabble.com/How-to-transfer-file-through-Wifi-automaticlly-tp16656454p16656454.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Mark A. <m_a...@co...> - 2008-04-12 20:35:30
|
Hi Hanguang, why not use the built-in command "scp" ? See the nice example Steve created in the Hello World example on the gumstix.net site. 'mark See the nice example in the Hanguang wrote: > My team planed to transfer file from Gumstix to PC or PC grab file from > Gumstix through Wifistick, either way is fine. > We already assigned the IP address for the Wifistick, and we can wirelessly > login Gumstix on Fedora terminal using "ss...@ro..." command and > transfer files using "rz". What we want to do is try to make the transfer > process run automatically so we don't have to manually login and manually > transfer files. > How to accomplish this task, anybody has idea? > Thank you! > |
From: Hanguang <han...@ho...> - 2008-04-13 17:52:07
|
Are you talking about this link: http://docwiki.gumstix.org/index.php/Hello_World There is not much detail here. Did I go to a wrong page? Would you please send me the right link or show some more detail. Thank you! m_ahlenius wrote: > > Hi Hanguang, > > why not use the built-in command "scp" ? > > See the nice example Steve created in the Hello World example on the > gumstix.net site. > > 'mark > > See the nice example in the > > Hanguang wrote: >> My team planed to transfer file from Gumstix to PC or PC grab file from >> Gumstix through Wifistick, either way is fine. >> We already assigned the IP address for the Wifistick, and we can >> wirelessly >> login Gumstix on Fedora terminal using "ss...@ro..." command >> and >> transfer files using "rz". What we want to do is try to make the transfer >> process run automatically so we don't have to manually login and manually >> transfer files. >> How to accomplish this task, anybody has idea? >> Thank you! >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > -- View this message in context: http://www.nabble.com/How-to-transfer-file-through-Wifi-automaticlly-tp16656454p16662003.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Jason <gu...@la...> - 2008-04-13 18:33:46
|
Hanguang wrote: > Are you talking about this link: > http://docwiki.gumstix.org/index.php/Hello_World > There is not much detail here. Did I go to a wrong page? > Would you please send me the right link or show some more detail. > Thank you! If you try 'gumstix "hello world" scp' in google, this [1] is the first link. Scrolling down to "Installing Our Package" shows how to use the scp command. This [2] also may be of some help. It will allow you to do the transfers without typing a password each time. hth, Jason. [1] - http://www.gumstix.net/Software/view/Build-system-overview/Hello-world-tutorial/111.html [2] - http://wiki.openwrt.org/DropbearPublicKeyAuthenticationHowto |
From: Mark A. <m_a...@co...> - 2008-04-13 19:13:15
|
Hi, That section is shown below. That hello world example is where I learned that this command was available in the Gumstix version of Linux. Otherwise, just google "scp" which stands for secure copy. Quoting from the hello world example: " Installing our package Installation is a two step process. First, from your build machine command line, copy the ipkg file to your gumstix using the scp utility: $ scp ~/gumstix/gumstix-oe/tmp/deploy/glibc/ipk/armv5te/helloworld_1.0.0-r0_armv5te.ipk root(at)192.160.0.2:/home/root The above assumes that the IP address of your gumstix is 192.168.0.2, you will need to change this to reflect the actual IP adress of your gumstix (you can find your IP address using the ifconfig command." 'mark Hanguang wrote: > Are you talking about this link: > http://docwiki.gumstix.org/index.php/Hello_World > There is not much detail here. Did I go to a wrong page? > Would you please send me the right link or show some more detail. > Thank you! > > > m_ahlenius wrote: > >> Hi Hanguang, >> >> why not use the built-in command "scp" ? >> >> See the nice example Steve created in the Hello World example on the >> gumstix.net site. >> >> 'mark >> >> See the nice example in the >> >> Hanguang wrote: >> >>> My team planed to transfer file from Gumstix to PC or PC grab file from >>> Gumstix through Wifistick, either way is fine. >>> We already assigned the IP address for the Wifistick, and we can >>> wirelessly >>> login Gumstix on Fedora terminal using "ss...@ro..." command >>> and >>> transfer files using "rz". What we want to do is try to make the transfer >>> process run automatically so we don't have to manually login and manually >>> transfer files. >>> How to accomplish this task, anybody has idea? >>> Thank you! >>> >>> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save $100. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> >> >> > > |
From: Mark A. <m_a...@co...> - 2008-04-13 21:59:15
|
Hi, ok, yes that is a lot more info for what you are trying to do, as I was under the impression this was a "one of" file transfer situation. But since you need to do continual updates, there are a number of ways this could be handled. While you could certainly write a script to use scp once every few seconds, this would be a very ugly implementation using scripting languages. My first approach would be to use a socket-based connection and poll for the data from the PC to the Gumstix. Since you stated you don't have very much C/C++ background, you may want to look at other options. Perl or Python could be used for this too, but am not sure if this is feasibly with your programming skillsets as well. Another approach, but I don't have a lot of expertise in this area would be to use the boa program, which is a web server on the Gumstix. Then have the humidity data stuffed into an html doc which boa servers up, or pushes to somewhere else. This has been done on several other postings. One which "sounds" similar is: http://168.103.183.91/SolarServer/ This would make testing very easy as you can view the Gumstix humidity page with a wifi-connected computer and a web browser. So this might be one avenue to investigate. hth 'mark Hanguang wrote: > I believe I didn't express my question clearly. > You proposed a suggestion that I should use "scp" command, which is > wonderful. But I think what I need is the way more than that. > Let me explain my situation. We mounted a humidity sensor on Robostix. The > measurement need to be send to the PC and show on its screen. We currently > are working on how to store humidity data on Gumstix. Our goal is to update > the file, which contain the humidity data, every 2 second. In the other > hand, the file should be send to PC every 2 second. The whole process should > be executed by itself after the Gumstix was connected to power, NOT manually > type command to send file to PC. > Since my team don't have strong C/C++ background and experience, we don't > have a clear idea what should we do step by step. > |
From: Hanguang <han...@ho...> - 2008-04-13 18:08:46
|
I have a question which is maybe kind stupid, what exactly the "Hello World" do? It is my understanding that it just print "Hello World" when you run it. I don't see any relationship between this and transfer file automatically. BTW, I don't see how did command "scp" involve in this issue. Thank you! -- View this message in context: http://www.nabble.com/How-to-transfer-file-through-Wifi-automaticlly-tp16656454p16662579.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Mark A. <m_a...@co...> - 2008-04-13 19:08:16
|
Hanguang wrote: > I have a question which is maybe kind stupid, what exactly the "Hello World" > do? > It is my understanding that it just print "Hello World" when you run it. I > don't see any relationship between this and transfer file automatically. > BTW, I don't see how did command "scp" involve in this issue. > Thank you! > I just referenced that tutorial because I showed the scp example in the context of file transfer after a build. nothing more. And yes, you are correct, its perhaps the first ever C program which was demonstrated, strikes a chord in those of us who remember Bell Labs and that early compiler. 'mark |
From: Mark A. <m_a...@co...> - 2008-04-13 22:13:20
|
As a follow up to my previous post, that site i listed does not really have much to say about "how" they did their project, which is probably more what you'd like to know. So I'd recommend searching on the nabble site for a solar panel site and find the postings which descibe that method used. Again, this is just one of many ways you can use to get automatic updates sent using wifi or the web. 'mark Mark Ahlenius wrote: > Hi, > > ok, yes that is a lot more info for what you are trying to do, as I was > under the impression this was a "one of" file transfer situation. But > since you need to do continual updates, there are a number of ways this > could be handled. While you could certainly write a script to use scp > once every few seconds, this would be a very ugly implementation using > scripting languages. > > My first approach would be to use a socket-based connection and poll for > the data from the PC to the Gumstix. Since you stated you don't have > very much C/C++ background, you may want to look at other options. Perl > or Python could be used for this too, but am not sure if this is > feasibly with your programming skillsets as well. > > Another approach, but I don't have a lot of expertise in this area would > be to use the boa program, which is a web server on the Gumstix. Then > have the humidity data stuffed into an html doc which boa servers up, or > pushes to somewhere else. This has been done on several other > postings. One which "sounds" similar is: > http://168.103.183.91/SolarServer/ > > This would make testing very easy as you can view the Gumstix humidity > page with a wifi-connected computer and a web browser. > > So this might be one avenue to investigate. > > hth > > 'mark > > > Hanguang wrote: > >> I believe I didn't express my question clearly. >> You proposed a suggestion that I should use "scp" command, which is >> wonderful. But I think what I need is the way more than that. >> Let me explain my situation. We mounted a humidity sensor on Robostix. The >> measurement need to be send to the PC and show on its screen. We currently >> are working on how to store humidity data on Gumstix. Our goal is to update >> the file, which contain the humidity data, every 2 second. In the other >> hand, the file should be send to PC every 2 second. The whole process should >> be executed by itself after the Gumstix was connected to power, NOT manually >> type command to send file to PC. >> Since my team don't have strong C/C++ background and experience, we don't >> have a clear idea what should we do step by step. >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > |
From: Jason <gu...@la...> - 2008-04-13 23:23:11
|
Hanguang wrote: > I believe I didn't express my question clearly. > You proposed a suggestion that I should use "scp" command, which is > wonderful. But I think what I need is the way more than that. > Let me explain my situation. We mounted a humidity sensor on Robostix. The > measurement need to be send to the PC and show on its screen. We currently > are working on how to store humidity data on Gumstix. Our goal is to update > the file, which contain the humidity data, every 2 second. In the other > hand, the file should be send to PC every 2 second. The whole process should > be executed by itself after the Gumstix was connected to power, NOT manually > type command to send file to PC. > Since my team don't have strong C/C++ background and experience, we don't > have a clear idea what should we do step by step. You may want to look at socat [1]. You could do it like this: On the gumstix, 'mkfifo /tmp/humid.fifo'. Then, on boot, launch the following into the background on the gumstix: socat -u /tmp/humid.fifo,ignoreeof udp4-datagram:224.0.0.1:50505 & Now, every time your program (that reads the humidity from the robostix) writes the humidity, have it write it to '/tmp/humid.fifo'. Every write will result in a UDP packet sent over the network. Your PC can then listen for these UDP packets. To test this, I set this up as I described and then typed the following on the gumstix: echo "345" >/tmp/humid.fifo In wireshark, I saw a UDP packet sent to 224.0.0.1, port 50505 and the data portion of the packet was 0x33 0x34 0x35 0x0a, or ascii '345\n' In my example, I used 224.0.0.1, which is a multicast address. Any computer on the local network could subscribe to that address, and will receive a message every time the humidity is written to the file. Alternately, you could send to a unicast address, like 192.168.1.100. hth, Jason. PS - If you're looking to make it more secure, socat can also do SSL encrypted TCP connections. Unfortunately, those are only unicast. Of course, socat will also do an SSL TCP server, which each PC could connect to... :-) [1] - http://www.dest-unreach.org/socat/doc/socat.html |
From: Jason <gu...@la...> - 2008-04-15 20:54:31
|
Dante Sanchez wrote: > > Hi Jason, > > > Jason-156 wrote: >> You may want to look at socat [1]. You could do it like this: >> >> On the gumstix, 'mkfifo /tmp/humid.fifo'. Then, on boot, launch the >> following into the background on the gumstix: >> >> socat -u /tmp/humid.fifo,ignoreeof udp4-datagram:224.0.0.1:50505 & >> > > Do you know of any command I can use to allow bidirectional traffic on the > fifo? I'd like to be able to write to the gumstix using a socket interface > too. socat should handle that. If not, it will also do unix domain sockets which will. Check the link in the previous post for more detail. hth, Jason. |
From: Dante S. <da...@ma...> - 2008-04-22 20:12:11
|
Hi Jason, Jason-156 wrote: > >>> On the gumstix, 'mkfifo /tmp/humid.fifo'. > I'd been experimenting with socat between two computers, but when I tried to create a fifo on the gumstix, I got the following: # mkfifo broad.fifo -sh: mkfifo: not found Does that mean I have to install mkfifo?? How can I do that on a buildroot system? Cheers, Dante -- View this message in context: http://www.nabble.com/How-to-transfer-file-through-Wifi-automaticlly-tp16656454p16826026.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Hanguang <han...@ho...> - 2008-04-13 21:23:42
|
I believe I didn't express my question clearly. You proposed a suggestion that I should use "scp" command, which is wonderful. But I think what I need is the way more than that. Let me explain my situation. We mounted a humidity sensor on Robostix. The measurement need to be send to the PC and show on its screen. We currently are working on how to store humidity data on Gumstix. Our goal is to update the file, which contain the humidity data, every 2 second. In the other hand, the file should be send to PC every 2 second. The whole process should be executed by itself after the Gumstix was connected to power, NOT manually type command to send file to PC. Since my team don't have strong C/C++ background and experience, we don't have a clear idea what should we do step by step. -- View this message in context: http://www.nabble.com/How-to-transfer-file-through-Wifi-automaticlly-tp16656454p16668375.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Hanguang <han...@ho...> - 2008-04-13 23:12:07
|
Thank you, Mark. I checked the web you gave. Seems like that guy is not using Wifistix but NetCF stix, so there is no wireless transfer involved. I don't think it is possible for us to change the hardware part. BTW, did I mention that we want to show the data at real-time, and the direction is sending data from Gumstix to PC. I'm try to understand your first 2 suggestion: The "socket-based connection", is it mean we store data in a memory card like micro-SD, and then unplug the card and plug into PC? If that is what you mean, that approach is not what we want in terms of "real-time" issue. Maybe I misunderstand the meaning of "socket-based connection". I'm checking "Perl or Python" right now... -- View this message in context: http://www.nabble.com/How-to-transfer-file-through-Wifi-automaticlly-tp16656454p16669188.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Mark A. <m_a...@co...> - 2008-04-14 01:19:46
|
Hi Hanguang, as long at the medium (netCF or WifiStix) runs TCP/IP, you can do the same types of xfers over them. A socket-based connection is a software term which means that two (or more) devices make a connection over either a wire, BlueTooth, Wifi, etc. to share data. That is a very simplistic definition of what it does. They can be uni- or bi-directional. A very powerful tool. See http://www.troubleshooters.com/codecorn/sockets/ , or look it up on Google for more info. So I was not talking about using the memory card approach, as that would not be real time. A socket-based approach is definitely something which could be used for real-time data acquisition. hth, 'mark Hanguang wrote: > Thank you, Mark. > > I checked the web you gave. Seems like that guy is not using Wifistix but > NetCF stix, so there is no wireless transfer involved. I don't think it is > possible for us to change the hardware part. > > BTW, did I mention that we want to show the data at real-time, and the > direction is sending data from Gumstix to PC. > > I'm try to understand your first 2 suggestion: > The "socket-based connection", is it mean we store data in a memory card > like micro-SD, and then unplug the card and plug into PC? If that is what > you mean, that approach is not what we want in terms of "real-time" issue. > Maybe I misunderstand the meaning of "socket-based connection". > I'm checking "Perl or Python" right now... > |
From: Dante S. <da...@ma...> - 2008-04-15 16:36:10
|
Hi Jason, Jason-156 wrote: > > You may want to look at socat [1]. You could do it like this: > > On the gumstix, 'mkfifo /tmp/humid.fifo'. Then, on boot, launch the > following into the background on the gumstix: > > socat -u /tmp/humid.fifo,ignoreeof udp4-datagram:224.0.0.1:50505 & > Do you know of any command I can use to allow bidirectional traffic on the fifo? I'd like to be able to write to the gumstix using a socket interface too. Thanks, Dante -- View this message in context: http://www.nabble.com/How-to-transfer-file-through-Wifi-automaticlly-tp16656454p16702026.html Sent from the Gumstix mailing list archive at Nabble.com. |