Closed stanleyyang2001 closed 1 year ago
@stanleyyang2001 I am unable to get the virtual ports to appear on my Windows machine. I'm not sure what OS you are running on, but the issue I am running into seems to be a common occurrence when using PySerial on Windows: https://github.com/pyserial/pyserial/pull/70
@loganwyas That's odd. I'm running on Windows 10 and PySerial did list all my com ports and virtual ports. Are you sure that you have the virtual ports downloaded as the simulator only shows the specific virtual ports downloaded from com0com.
@stanleyyang2001 This is what I am seeing under my device manager, so I would assume that they are downloaded.
@loganwyas Try removing it and downloading it again. On my device there's only the com0com-serial port emulator (COM4) and com0com-serial port emulator (COM5).
How my code works is that it gets the port from the list_ports, and then check each port's description for com0com. If it finds com0com, then it adds the name of the port. I think the problem here is that the com0com port you have doesn't have the name COM#, so it won't appear.
I was able to get it working, thanks. I'll merge the code now.
Fixes #112
A new GUI, SerialSimulator, was added in the map_rfid.py file that allow user to download the needed ports to simulate writing to and reading from the downloaded virtual ports.
The changes were implemented because Mouser application requires functionality that allows data transfer from other devices to Mouser application through serial port connection. However, our team haven't have the chance to use actual hardware required for developing. Therefore, a simulator that simulate how serial port connections would behave in such circumstances is needed.
The changes were implemented with new GUI that can be accessed from a button in SerialSelection GUI. For new users that haven't downloaded the virtual serial ports yet, a prompt that asks if the user would like to download the virtual serial port will appear and lead the user to the download site when the user press yes. After that, a new GUI will create that contains three parts: text display, input entry, and serial ports drop down selection. The drop-down list contains all virtual serial ports available to be selected and write to once the user selects the port and press the confirm button. The user can then write to the serial port by entering the desired message and press the sent button. Lastly, the message that the user write to the serial port will be read by the other virtual serial port and displayed onto the text display.
Screenshots that show the changes (if applicable): [Uploading issue_serial_port_simulator.pdf…]()