Skip to content

Create a Serial Stream Adapter #231

Description

@DominicOram

At ISIS we have legacy drivers that talk to devices that are connected via a serial port. For testing purposes it would be useful to write an emulator that these drivers can communicate with. We are currently doing this by running another script to convert Serial <-> TCP, see diagram below

image

Note that the physical loopback is unfortunately required for the OS to properly recognise the port.

It would be useful if Lewis could communicate using serial, therefore removing the need for the script. I am happy to do the work for this, if you think it's something that would benefit Lewis.

Activity

  1. MichaelWedel commented on Apr 19, 2017

    @MichaelWedel
    Contributor

    Thanks for taking the time to write up the issue, I think it's an interesting use case and would enable Lewis to be used for testing a larger variety of higher level software.

    Is the TCP <-> Serial script available somewhere? It would be interesting to take a look and maybe it already provides a base for an implementation.

    I'm adding it to the current milestone and some tags as well.

  2. added this to the Release 1.1 milestone on Apr 19, 2017
  3. MikeHart85 commented on Apr 19, 2017

    @MikeHart85
    Contributor

    The script is available here: com2tcp.py

    The related IBEX issue is here: Emulator: Connect LabView drivers to emulator

  4. modified the milestones: Release 1.2, on Sep 21, 2017
  5. FreddieAkeroyd commented on Jan 9, 2018

    @FreddieAkeroyd
    Member

    Is it OK for me to take a look at this?

  6. MikeHart85 commented on Jan 9, 2018

    @MikeHart85
    Contributor

    Absolutely!

    I think we left this be mostly because the com2tcp script approach seemed to be working and actually looked like an elegant approach, as far as amount of code required to accomplish the goal goes.

    An integrated solution would be cleaner in terms of less interacting components, but will likely require much more code / refactoring of existing code.

    You'll want almost all of the code from the TCP Stream adapter, except have it connect via serial port somehow. Last time I looked, I remember not seeing a clean way to do this, without either copy-pasting huge chunks of stream adapter code into a new serial adapter, or some major refactoring to allow two adapters to share the same code.

  7. removed this from the milestone on Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions