PDA

View Full Version : USB Emulator



Will_D
20-02-2018, 02:00 PM
I have a DDCSV controller that reads g-Code off of a USB stick. There is no editin available on this controller so I have to remove the USB stick, plug it into a PC, open the drive, edit the file, save it and eject the USb. Then walk over to the mill and plug in the stick!

Now correct me if I am wrong but this is the 21st century so what I need is a USB emulator.

The controller is connected to the computer by a suitably sexed cable. A piece of software (aka Emulator) then creates a virtual USB between the PC and the Controller. Edit the file on the PC and load it into the controller. There may need to be a bit of extra hardware in the middle of the cables!

Simple requirement but does it exist.

Googling USB Emulastor pulls up thousand of floppy drive emulators that replace a floppy drive in a controller or machine and accept a USB stick as the data medias.

Cheers

Will

magicniner
20-02-2018, 02:19 PM
What you need to ask yourself is how big is the market for the device you want ;-)

JOGARA
20-02-2018, 05:48 PM
What about using one of those wireless SD cards?
They are pretty cheap and would allow you to send Gocde over the air to your machine.
Should work as a SD to USB adapter just acts as a USB drive.

magicniner
20-02-2018, 06:03 PM
I've got an EyeFi wireless SD card but it only came with "Upload" functionality to move files from the card to another network location, does someone do an SD card with wireless capability that allows transfer of files to the card from a PC?
Surely everyone would be using one in their 3D printer?

JOGARA
20-02-2018, 06:18 PM
I thought they had host FTP service?

cropwell
20-02-2018, 09:17 PM
https://www.pcworld.co.uk/gbuk/computing-accessories/data-storage/usb-flash-drives/sandisk-connect-wireless-usb-memory-stick-32-gb-black-10140015-pdt.html

Is this the sort of thing you want ?

magicniner
20-02-2018, 10:50 PM
https://www.pcworld.co.uk/gbuk/computing-accessories/data-storage/usb-flash-drives/sandisk-connect-wireless-usb-memory-stick-32-gb-black-10140015-pdt.html

Is this the sort of thing you want ?

That looks spot on, well spotted!

cropwell
20-02-2018, 11:37 PM
I was also researching the same sort of thing but in the format of an SD card. My 3D printer is supposed to run with a serial (USB) link, but I can't get the port driver working. I have to load up the .x3g file on an SD card to run the print. It would be an advantage to load the file using WiFi. They are available, but around £30 even from China. a micro SD wireless adapter at £15 seems a better solution for me (I'm only a poor old pensioner guv!).

Cheers,

Rob

magicniner
20-02-2018, 11:46 PM
Rob,
I can't find any SD cards where transfer to the card is mentioned in the description of functionality, have you found one that does?

cropwell
21-02-2018, 12:16 AM
None of the cards mention specifically loading to the card memory with WiFi. These are two I have been looking at https://www.ebay.co.uk/itm/Micro-SDHC-Speicherkarte-um-WIFI-SD-Adapter-Wireless-Speicherkarte-fur-DV-Kamera/391344989203?_trkparms=aid%3D222007%26algo%3DSIM.M BE%26ao%3D2%26asc%3D49130%26meid%3Dbc8f90ad36d24b7 59d539ce76fca4d5e%26pid%3D100005%26rk%3D6%26rkt%3D 6%26mehot%3Dlo%26sd%3D232550027833%26itm%3D3913449 89203&_trksid=p2047675.c100005.m1851 this is cheaper and to be honest , it is my choice for experimentation. The Toshiba FlashAir ought to have more documentation, but I have yet to find it.

It seems that the FlashAir acts as a Wireless Hotspot, so you have to connect your wifi to it. this puts me off as I already have a WFS210 oscilloscope, which acts on the same principle and it a capricious bugger to connect to my Win7 PC or my Win10 tablet and I have yet to get any success connecting to my Win10 PC.

Cheers,

Rob

magicniner
21-02-2018, 10:19 AM
You'd think all the 3D printing Gurus would be shouting about wireless SD cards that you can transfer files to, I'd buy one for my printer!

magicniner
21-02-2018, 10:34 AM
Looks like with the right version of FlashAir you can, but it's not an intended or supported function :D

https://mattshub.com/2017/04/11/flashair-sd-card/

cropwell
21-02-2018, 11:04 AM
Looks like with the right version of FlashAir you can, but it's not an intended or supported function :D

https://mattshub.com/2017/04/11/flashair-sd-card/

Got to go for it now! Thanks Nick, that guy Matt has posted a well written article!

Will_D
21-02-2018, 02:13 PM
Not sure if the WiFi stick will do the job. It seems more to WiFi whatevers been loaded onto the stick.

Then I had a thought;

All I need is a 4 way 2 pole switch to connect my USB stick to either the PC or the controller!

cropwell
21-02-2018, 04:28 PM
Not sure if the WiFi stick will do the job. It seems more to WiFi whatevers been loaded onto the stick.

Then I had a thought;

All I need is a 4 way 2 pole switch to connect my USB stick to either the PC or the controller!

Cannabalise 2 USB leads, get a box for the switch and a panel mount USB socket and away you go, just keep lead length to the switch box less than 5 metres for reliability, so you have up to 10 metres of separation and you only have to walk a max of 5 metres to the switch.

magicniner
21-02-2018, 07:30 PM
Cannabalise 2 USB leads, get a box for the switch and a panel mount USB socket and away you go, just keep lead length to the switch box less than 5 metres for reliability, so you have up to 10 metres of separation and you only have to walk a max of 5 metres to the switch.

Crikey! Good old Sneaker Net is an easier option! :D

cropwell
21-02-2018, 08:43 PM
Crikey! Good old Sneaker Net is an easier option! :D

Nick, may I refer you to OP's #1 post :smile: 'Sneaker net indeed, when I started in computing there was only one net everybody used, Annette !

I have ordered that WiFi SD card, there's just enough geek in me to say I have to have a play!

pinballdave
21-02-2018, 11:56 PM
There's a good reason why WiFi SD cards (or USB sticks) are generally read only from the wireless connection. If you were to make a change to a file on the SD card via the wireless connection, there is no way of telling the host system it's physically plugged into that the file system has been changed.

So if you try to read a new/changed file, the host system may have cached the old directory structure/file and not be able to see the changes. Or worse, the host computer wants to write some data and overwrites the blocks containing your new file which then corrupts the file system.

File systems that can be modified by two separate clients are quite complicated, and require both clients to know that the file system is volatile (something that SD cards and USB mass storage do not support). So given that 99% of the potential users won't have a clue about how the underlying technology works and simply want something that 'just works' you can see why manufacturers are reluctant to enable this behavior (or won't support it if it is possible), as it would be a nightmare to have to keep explaining it to the non technical users.

From the article about the Toshiba cards, it looks like there is an option on the 3D printer specifically for this. This is likely to make the 3D printer aware that the contents of the card might have changed since it last read something from it. Your controller is unlikely to have this kind of option.

However, if your controller never writes to the USB storage, then you might get away with it if you simply unplug and replug the storage after it's been modified via WiFi.

At this point a clunky switch box sounds even more attractive. ;)

cropwell
22-02-2018, 01:29 AM
Fortunately the 3D printer only reads files from the root directory of the SD card, so provided that you do not alter the file structure whilst the print is active, I anticipate that there should be no problem. I have yet to receive my Flashair card and reconfigure it to operate in STA mode. This is a side issue from the OP's USB problem and as I am not familiar with the DDSV controller, I have hesitated to offer any solution other than to agree with the OP when he suggested a two way switch. If I had a DDSV, I would probably take on the problem of using a WiFi USB stick, that sort of project intrigues me, but I ain't got one, so I won't. The best guy to give an opinion on the DDSV is probably MadModder.

I suspect that the DDSV will be a simplistic read of the USB when running the Gcode, much the same as the 3D printer, using the stick as a memory extension. The stick would only be read when running a job and I would not think it likely or desirable to mess with the files while chewing metal or wood.

My own CNC machine runs Mach3 from files on my personal cloud and the CNC computer has the Internet gateway disabled, so I have the benefit of LAN access to everything without Microsoft deciding that an update is more important. I apply the principle that, once the job is running, leave the files alone until it finishes.

Having spent 33 years in IT, I am surprised and delighted when something 'just works'.

magicniner
22-02-2018, 01:39 AM
My 3D Printer (Marlin based) can and does read from sub-directories.

cropwell
22-02-2018, 02:33 AM
My 3D Printer (Marlin based) can and does read from sub-directories.

My printer (Sailfish based) can see a directory, but not get into it. I have never found it a problem as I print from root anyway.

cropwell
02-03-2018, 06:01 PM
I now have uploaded files to the Flashair card in my 3D printer and just warming up to print. (Actually printing now !)

It was a bit of a struggle, but this is the way I have done it :-

The flashair card was updated to the latest firmware and set to AP mode and the alternative web page according to the instructions in
https://mattshub.com/2017/04/11/flashair-sd-card/. Then I used a WIFI USB dongle to connect to the SSID broadcast by the card, in a computer with a wired connection to my network, so I could access my 3D printing files on a NAS drive.

All a little Heath Robinson, but it works and I don't have to keep farting about swapping the SD card between the computer and the printer.

It should be possible to do the same with a USB connection, just using a SD reader plugged into the USB port.

magicniner
06-03-2018, 10:50 AM
Nice one!
Being it's own access point and so not having any internet-facing connectivity seems like common sense rather than Heath Robinson ;-)

cropwell
08-03-2018, 12:03 AM
Just as a postscript,(and I know it is not really relevant to this thread) my 3d printer had been playing up on the right extruder. I thought it could be a stepper cable fault, so I replaced the cables to both extruders, which made no difference. On stripping down the hotend, I discovered the thing was choked, so nozzles were put in acetone whilst I waited for the spares I needed to come from Wanhao UK.

Anyway, I got an email acknowledging my order which said they were including a thank-you gift for my past custom.

Todays post brought me the ceramic wraps I needed PLUS an 8GB SanDisk SD card, an all-in-one card reader, a 0.4mm drill, a good quality pair of tweezers and a filament pusher. Did they know it was my birthday last week?

Gobsmacked Rob !

magicniner
09-03-2018, 09:26 PM
It's nice to know that a company that isn't open source supports their customers ;-)