Kiangara
Posts: 2
Joined: Fri Jul 12, 2013 7:50 am
Location: Aalst, Belgium
Contact: Website

Can Raspberry Pi do this?

Fri Jul 12, 2013 9:14 am

The situation;
We have a machine (CNC machine), the only way to communicate with this machine is through USB, we can put a USB memory in the machine and R/W files from this key.
We want to send programs directly to the machine without walking around with a usb key.

Is it possible to connect the machine with the USB port to the USB port on the Raspberry PI and can the machine through this port R/W to the USB memory?
We will also connect the Raspberry PI to the network, can a computer on the same network put files on the USB memory key?


Thanks in advance for your reply!

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1665
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Can Raspberry Pi do this?

Fri Jul 12, 2013 9:52 am

Ah, I like the idea!

So the Raspberry Pi needs to spoof a USB media drive to the CNC machine but have the contents of this drive shared over the network via Samba/Windows Networking or Apple AFP etc. I'm sure this will be possible, but off the top of my head I wouldn't know how to do it. I presume it may involve some USB device driver programming which is way above my head. It's certainly not a beginner project, unless someone else has already done it.

I did find this on stack exchange though, seems similar to what you want to do.
http://raspberrypi.stackexchange.com/qu ... age-device

And there is a previous post on this forum about it here;
http://www.raspberrypi.org/phpBB3/viewt ... f=8&t=4938

PiGraham
Posts: 3939
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Can Raspberry Pi do this?

Fri Jul 12, 2013 10:07 am

Did i read somewhere that the pi has full OTG USB hardware? It may one day work as a USB slave memory device, like a smart phone.
Probably requires clever low level code to do that though.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Can Raspberry Pi do this?

Fri Jul 12, 2013 10:23 am

The broadcom SoC has OTG hardware, but on a model B the built in hub prevents it. There are also no OTG drivers for the PI.

PiGraham
Posts: 3939
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Can Raspberry Pi do this?

Fri Jul 12, 2013 11:14 am

Thanks Mahjong.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Can Raspberry Pi do this?

Fri Jul 12, 2013 11:46 am

AFAIK OTG is impossible on both model A and B , because
some parts are missing. But device mode might be
possible.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Kiangara
Posts: 2
Joined: Fri Jul 12, 2013 7:50 am
Location: Aalst, Belgium
Contact: Website

Re: Can Raspberry Pi do this?

Fri Jul 12, 2013 2:02 pm

Thanks four the answers!
My search continuous.

Thanks again for the quick replys!

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Can Raspberry Pi do this?

Sat Jul 13, 2013 11:03 pm

AFAIK the "missing part" is simply a readout signal that tells the driver whether or not to use OTG mode, could be done using a dedicated GPIO pin. Still only possible on a model A.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Can Raspberry Pi do this?

Mon Jul 15, 2013 10:25 am

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “Beginners”