r/BeagleBone • • Jul 24 '14

Sending Python files to the BBB

Hey guys, so I'm pretty new to the embedded systems but have done a bit of C++ on MCU's in the past. I'm working with a BBB right now and the language I would like to work with is Python. I'm able to run Python codes by creating a .py file within the BBB through the PuTTy SSH terminal (copy and paste method). But is there a crafty way of having the file/s written in Notepad++ on my desktop and then transferring it to the BBB. Thanks in advance!

1 Upvotes

16 comments sorted by

5

u/battery_go Jul 24 '14

WinSCP is what you're looking for (if you can SSH into the BBB)

1

u/Derpherpenstein Jul 24 '14

This and filezilla worked for me. Just log into your BBB and you will see the directories. Select the files on the left (your computer directories) and paste them to the directories on the right (BBB directories)

1

u/kelei Jul 24 '14

Cool, I will check this out. Would the BBB have to be connected to a shared router for this to work? As of now I've only been using the USB port.

2

u/Derpherpenstein Jul 24 '14

I believe that you can do it through USB also. If I remember correctly, that is how I transferred files to it.

1

u/battery_go Jul 24 '14

Yeah, you should have the BBB on your local network and make sure you can connect to it over SSH.

1

u/leadbasedtoy Jul 25 '14

You can set up the Linux USB gadget driver to create a network interface on the USB client port, then set up SSHd to listen on that interface. Then you can connect to it as normal. There is plenty of info out there on how to set this up.

2

u/destroyman1337 Jul 24 '14

Using WinSCP you can transfer stuff using its default IP address. 192.168.7.2.

I usually just wrote my .py files by connecting through SSH and using VIM directly on the BBB. But sometimes I would do them in Notepad++ on windows and just transfer them over.

1

u/kelei Jul 25 '14

Just got the WinSCP to work through USB, thanks!

1

u/_yertle_the_turtle Jul 24 '14

Sftp will get the job done. Are you running Angstrom?

1

u/kelei Jul 24 '14

No, I have it on Debian as it was pre-programmed.

2

u/_yertle_the_turtle Jul 24 '14

Ahh ok. I had an older version running stock angstrom but I just flashed debian the other day. Go with WinSCP

3

u/zombieregime Jul 24 '14

i usually use filezilla to transfer files back and forth. if you right click a remote file youll get a "view/edit" option which, on my desktop, opens the document in wordpad.

2

u/mooktank Jul 24 '14

There's a built in option in Windows Explorer for adding FTP locations. See here.

1

u/[deleted] Jul 24 '14

Did anyone try sharing files over samba and editing them from the folder directly?

1

u/Ashrafnabil Aug 08 '14

Filezilla is a good option.

1

u/[deleted] Aug 14 '14

I use samba and nfs. Samba for accessing from windows, nfs for accessing from Linux. Or, a mount directly to my dev pc (using samba or nfs) and run stuff from there for development. Edit on dev pc, run/compile on bb.

Or...you could use FTP or some usage insanity like that.

Blows my mind that people are using ftp...