I want to develop a personal project which includes a heavyweight scale.
This scale usually connects to the computer using an RS232 port.
I want to learn how to read/write information into one.
But I can't physically connect to the scale. I thought of buying a smaller scale and do my tests on it, but it is just not practical.
Would you suggest an emulator for such port?
My operating system is Windows 11.
Related
Is it possible to connect the HC-08 UART bluetooth module to computers? (PCs with bluetooth dongles, laptops). Does the OS matter? I have both Windows 10 and Ubuntu 20.04 machines to test with. I can successfully connect my Samsung Galaxy A5 with the bluetooth module but I haven't done so with computers.
The short answer is yes.
The longer answer is that it appears the HC-08 supports the Serial Port Profile (SPP) and it is user configurable as to if it takes the client or server role. Typically you would have the HC-08 in the server role.
You need to have the SPP client running on your PC (Linux or Windows). As this is a site about getting programming help, I'll assume you want to end up accessing them with code. This is likely to look different depending which operating system and programming language you are using. Searching he internet for " bluetooth spp client" should turn something up
Examples of how to do this on Linux with Python:
http://blog.kevindoran.co/bluetooth-programming-with-python-3/
https://bluedot.readthedocs.io/en/latest/btcommapi.html#bluetoothclient
These two examples take slightly different approaches to achieve the same thing. Pick whichever one feels more natural to you.
Let me keep it simple. I am working in a company on a Software which has a built in auto marking system (Which needs a lot of computer resources). There are Many PCs in my department all with Windows 7 32-Bit and have almost same specs (Same Modal, RAM, Processor). They are connected by LAN Network with 100 Mbps speed. Now i want to make a cluster of computers so i can Run that software on that by utilizing maximum resources of all computers. Is there any special software for that?
I would recommend using a much faster switch. Because they are limited to 100mbps, you will see a low performance gain if any. Here is a link where there are instructions of how to setup a cluster with Windows. But I recommend getting at least a 1Gbps switch since the nodes will need to send data back and forth to each other. Of course, make sure that the computer's ethernet port supports 1Gbps.
https://social.technet.microsoft.com/wiki/contents/articles/2539.diy-supercomputing-how-to-build-a-small-windows-hpc-cluster.aspx
I need to run tests against physical mobile devices, and need to deploy unit tests to many concurrent devices at the same time.
Conceptually, this is similar to the Xamarin Mobile Test Cloud, or Microsoft Mobile cloud... but I need an on-premise equivalent so that I can test Bluetooth and GPS features
I'm looking to test 7 to 14 physical devices all connected to the same USB hub.
Question
How many devices can a single Mac / Windows machine talk to over a single USB port?
What are the power considerations I need to keep in mind while selecting hardware?
Here is a visual example of what I imagine, however this device is focused on charging, not connecting a USB backplane to a computer.
Per USB controller you can have a 127 devices (128 minus the controller), bu I am not saying you can simultaneously have 127 devices communicating to the host and maintain any type of data throughput, that is a different story....
The core USB issue with a lot of devices is the power draw. We use special Y cables that have a data only side and a power only side even when using the so-called "powered" USB hubs.
The really good cables that do this are typically found via companies that cater to audiophiles and as such are typically very expensive and work great but are overkill for this usage. But also avoid the cheap Y-cables where the data-only side is "ungrounded" as you will have data transfer failures. Low quality cables will kill data through-put and have you running in circles chasing test failures.
Consumer external USB hubs are not created equal and wildly vary in their power output and simultaneous throughput across each port. While most will do well with one/two devices talking simultaneously, many start failing when 4-8 devices are all talking. Also trying to cascade them for increasing the number of ports can cause failures across the entire chain. Make sure you have a good return policy where ever you can buying it from.
You did not stated the testing framework, but some Appium info:
For Appium-based Android testing I have use a combination of:
Android<-USB->Host(adb)
8 devices is about the threshold for reliable simultaneously (bi-directional) testing
Android<-Wifi->AP<-Host(adb)
A DHCP server handles assigning an IP to the Android device via MAC address so we can create a static mapping of ports to IPs for remapping via adb
8 simultaneous Appium servers (thus devices) running per Window server/host is about what to expect
This works for about 32/64 devices per dedicated AP.
Remember the AP has to be ~4/5 feet away from the devices for proper signal attenuation
Mobile cloud datacenters use EMI / faraday cages to isolate each mobile device rack where multiple servers, an AP and the devices are installed within each rack
Android<-USB2Ethernet<-Host(adb)
Not all devices support OTG, so this is not always an option, but works great.
A DHCP server is required just like the Android<-Wifi->AP setup
iOS is a totally different can of worms:
4 iOS devices connected to a Mac is about all you can achieve with reliable results.
Remember a separate Xcode Instruments is spun up per Appium server on the host.
Mac Minis work great for dedicated Appium test servers.
In terms of GPS testing, mocking is the easiest way to go. There are hardware devices designed for GPS testing that are use by the top tier app developers (mapping, traffic, avionics, etc..) but for an ad-hoc in-house device lab these are usually way to expensive to purchase and setup (EMI / faraday cages are needed enclosing the device and the GPS injector antenna).
Bluetooth can be a big problem in a device lab due to interference, pairing issues, etc..., having a number of devices in close proximity competing for a single (or more) bluetooth accessory can make the accessories fail to pair with any device. Basically bluetooth testing simultaneously does not work well, but you can use Appium to automate the turning the wifi/bluetooth/airplane mode on/off, but for Android devices this requires that they are all USB connected and not using adb to remap host ports to IP addresses over wifi...
I have a data buffer of data on my Serial port. This communication is developed in order to transfer the "maximum" value of possible data. Hence, the value of samples "send" if there is no connection with a computer is around ~11500 data/sec. If I attach the controller (who send the data) on a Windows 10 machine and I try to read (with java) the data, the information frequency drops down to ~ 950/1000 data/sec. Otherwise, if I attach the controller to the same machine, with the same software, but under Ubuntu, it reaches ~6000/7000 data/sec. So, there is a way to improve the Serial port under Windows?
If you are using a cheap USB-serial port, it is possible it only works at USB1 speeds, and/or the driver is basically a rebadged device driver demo from the Windows SDK (which is very poor). More expensive USB ports generally have their own drivers which are much better at higher data rates.
It is also possible that there is some sort of hardware flow control that isn't quite as efficient on Windows as it is on Linux.
Without knowing exactly which USB port you have, it's difficult to make suggestions.
I'm developing a project that has a number of hardware sensors connecting to the deployment machine through RS232 serial ports.
But ... I'm developing on a machine without an physical RS232 serial ports, but I would like to make fake serial ports that I can connect to and output data from with the aim of faking input from hardware sensors.
Does anyone know of a way to create a fake serial port and control it on Windows XP?
If you are developing for Windows, the com0com project might be, what you are looking for.
It provides pairs of virtual COM ports that are linked via a nullmodem connetion. You can then use your favorite terminal application or whatever you like to send data to one COM port and recieve from the other one.
EDIT:
As Thomas pointed out the project lacks of a signed driver, which is especially problematic on certain Windows version (e.g. Windows 7 x64).
There are a couple of unofficial com0com versions around that do contain a signed driver. One recent verion (3.0.0.0) can be downloaded e.g. from here.
I know this is an old post, but in case someone else happens upon this question, one good option is Virtual Serial Port Emulator (VSPE) from Eterlogic
It provides an API for creating kernel mode virtual comport devices, i.e. connectors, mappers, splitters etc.
However, some of the advertised capabilities were really not capabilities at all.
EDIT
A much better choice, Eltima. This product is fully baked. Good developer tech support. The product did all it claimed to do. Product options include both desktop applications, as well as software development kits with APIs.
Neither of these products are open source, or free. However, as other posts here have pointed out, there are other options. Here is a list of various serial utilities:
com0com (current)
com0com - With Signed Driver (old version)
Yet another place for com0com with Signed Driver (Pete's Blog)
Tactical Software
Termite
COM Port Serial Emulator
Kermit (obsolete, but still downloadable)
HWVSP3
HHD Software (free edition)
I use com0com - With Signed Driver, on windows 7 x64 to emulate COM3 AND COM4 as a pair.
Then i use COM Dataport Emulator to recieve from COM4.
Then i open COM3 with the app im developping (c#) and send data to COM3.
The data sent thru COM3 is received by COM4 and shown by 'COM Dataport Emulator' who can also send back a response (not automated).
So with this 2 great programs i managed to emulate Serial RS-232 comunication.
Hope it helps.
Both programs are free!!!!!
There's always the hardware route. Purchase two USB to serial converters, and connect them via a NULL modem.
Pro tips:
1) Windows may assign new COM ports to the adapters after every device sleep or reboot.
2) The market leaders in chips for USB to serial are Prolific and FTDI. Both companies are battling knockoffs, and may be blocked in future official Windows drivers. The Linux drivers however work fine with the clones.
Another alternative, even though the OP did not ask for it:
There exist usb-to-serial adapters.
Depending on the type of adapter, you may also need a nullmodem cable, too.
They are extremely easy to use under linux, work under windows, too, if you have got working drivers installed.
That way you can work directly with the sensors, and you do not have to try and emulate data.
That way you are maybe even save from building an anemic system.
(Due to your emulated data inputs not covering all cases, leading you to a brittle system.)
Its often better to work with the real stuff.
i used eltima make virtual serial port for my modbus application debug work. it is really very good application at development stage to check serial port program without connecting hardware.