I have a Singer XL420 automatic embroidery machine that I use with Windows 10. The software will only open when the embroidery machine is plugged in. This is a nightmare as I have to set up the embroidery machine, when all I want to do is design something on the PC.
It is obviously doing a simple check to see if the machine is plugged in when the software opens.
What I would love to know is ... is it possible to use an Arduino to emulate a device being plugged into Windows .... it doesn't have to do anything whatsoever other than simulate that the device is plugged in.
The handshake or device check is literally a one off when the software opens. Once open you can disconnect the device and carry on.
The it likely to be something as simple as giving an Arduino the same manufacturer ID etc so that the driver thinks it's the same device ? If so any clues on where to start?
I've used Arduinos LOTS before so not a complete newbie and I've done a virtual mouse using a Leonardo before - guessing it would have to be a similar device to facilitate the USB function in this instance?
jay123:
I have a Singer XL420 automatic embroidery machine that I use with Windows 10. The software will only open when the embroidery machine is plugged in.
I hope you have complained to the software developers.
I'm not an expert on Windows but I wonder that shows up in Device Manager when you connect to the sewing machine without the design program. My guess is that any alternative to the sewing machine will have to emulate that device and if the purpose of the restriction is to prevent pirate copies of the software then I suspect the emulation won't be simple.
This is the "dongle" problem. Dongles are essentially an electronic version of a key used to unlock a software function.
What is quite absurd, is when some software requires both the dongle and the separate device to which it connects - I have that situation with my present ECG system. Common sense would be at least to incorporate the dongle into the device itself - as appears to be the case with your embroidery machine, alternatively the dongle may allow the other function of the software to proceed in its absence.
It tends to coincide with really amateurish (dare I say, Chinese) software.
In any case, it is likely that the device/ dongle performs some non-trivial task such as encryption. As zwieblum suggest, you could use wireshark to monitor the connection transaction between the program and the machine; it might be simple and the same on every connection; something you can emulate with an Arduino as it may just be that the designers thought it would be a "good idea" to have the machine connected, or sadly, they may be bloody-minded.
In short, the use of a dongle suggests that you should avoid using that system unless there is absolutely no other choice!
It's possible it's as simple as recognizing the VID/PID of the device attached to the computer. If so, that is a fairly simple thing to do with an Arduino that has a programmable USB chip. Any manufacturer who was serious about locking down their software would not use this approach and would instead have the validation via encrypted communication with the device, but there is a possibility they took the easy way out. Since it's fairly fast and easy to test this, I think it's worth a try.
I'd say the easiest way to quickly create a USB device with a custom VID/PID would probably be to use an FTDI FT232. FTDI provides a tool named FT_prog that allows you to program the FT232 to a custom VID/PID via a GUI.
If you don't have an FT232 board, the second easiest is to use any Arduino with native USB (Leonardo, Micro, Pro Micro, MKR). You can set the VID/PID of the board by editing its build.vid and build.pid properties in boards.txt, then uploading any sketch to the board. In the case of the Leonardo, Micro, Pro Micro, you might have multiple boards.txt files on your computer, but only one will be active, so you need to make sure you're editing the right file. If you need assistance finding and editing boards.txt, let me know and I'll provide detailed instructions.
It's also possible to do this with any Arduino board that uses the ATmega16U2 USB chip (e.g., official and faithful clone Uno and Mega), but this is a significantly more complex process so probably not worth the effort.
You wrote: "I have a Singer XL420 automatic embroidery machine that I use with Windows 10. The software will only open when the embroidery machine is plugged in. This is a nightmare as I have to set up the embroidery machine, when all I want to do is design something on the PC.".
That makes me wonder why you don't keep the machine plugged in to the USB all the time? You can use powered multiport extenders to connect several things to the USB of your PC and just leave them connected.
Paul_KD7HB:
That makes me wonder why you don't keep the machine plugged in to the USB all the time? You can use powered multiport extenders to connect several things to the USB of your PC and just leave them connected.
Heh, heh, that may have been too simple.
Perhaps the concern is that it would need to be (mains) powered.
I don’t think there’s anything complicated about the “dongle” function. The software comes free with the Singer machine. There are a load of plugins which are really high price and yet none of them have any serial number or activation / protection whatsoever so I really don’t think the software is that sophisticated. It also runs like a dog and is really badly put together. The only issue is it’s the only way to send files to the machine so there’s no alternative!
Robin's reply #9 is worth a try; unfortunately you might have to get used to another user interface and it might be lacking functions that you're used to.
There are free embroidery softwares that support various file formats (extensions); not all of them support all possible formats and your current Singer software might only allow you to save files in its native format which might not be supported by 3rd party programs. One search revealed Comparison of embroidery software - Wikipedia which lists some free options that support the (Singer) .XXX extension/format; others outside that link might support FHE and CHE format.
Are Singer being deliberately awkward (entirely possible) or is it simply that the software needs to know the capabilities of the target embroidery machine so it can avoid designing in something (stitch types?) that your hardware can't actually do?
I don’t think so get are trying to prevent you doing something that the machine isn’t capable of as it’s specific software for the machine .... I think it’s just really bad software - plus probably a very basic attempt to prevent people using the software unless they are Singer owners.
I can get other software that does design etc but alternative commercial software can cost hundreds of pounds. The alternatives can save in the Singer.XXX file format but aren’t able to transmit the files to the machine and operate the machine - this is the only one that can do that. The free software is no better than the Singer one - usually a lot worse - or very limited unless you pay for plugins. So if I can stick with the Singer one but allow the program to open without having to go to the effort of getting the machine out and setting it up it would be great. Also I travel a lot for work so it would be good to be able to design stuff on my laptop when I’m travelling without the machine.
Why not try the simplest possible solution of emulating the VID/PID before jumping into the complexity of trying to sniff and interpret the USB communication via WireShark and then attempting to reproduce that via an Arduino?
Please read my reply #4. I think that explains it pretty well.
After that, if you decide to go for it and have questions about how to proceed (e.g., how to determine the VID/PID of your embroidery machine, how to find boards.txt), then let me know and I'll provide instructions.
I don't have much experience with the PL2303 so I don't know whether it's possible to customize the VID/PID on that chip (as I know is possible on the FT232) and, if so, what the procedure would be.
I’ve actually got the board that I think you mean in my bag that I’m travelling with (total coincidence as I use it to flash firmware in something else).