Code Monkey home page Code Monkey logo

multcprelay's People

Contributors

nabla-c0d3 avatar teknogeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multcprelay's Issues

Multcprelay only supports up to 3 idevices

Hello,

It appears that this code, through the virtue of polling only 3 times https://github.com/nabla-c0d3/multcprelay/blob/master/tcprelay.py#L90 will only ever find three idevices even if more are available. I have confirmed this behavior by modifying the code to call process more times, and each time it finds more devices

python /opt/multcprelay-master/tcprelay.py -t 22:5000 -u       3651d993a87da228a7453e465186a9d5f93fc38d
Forwarding local port 5000 to remote port 22
Incoming connection to 5000
Waiting for devices...
Devices:
<MuxDevice: ID 382 ProdID 0x12a8 Serial 'e89e3a7dae988a087d1b640f1807bc6347f36046' Location 0x14720000>
Devices:
<MuxDevice: ID 382 ProdID 0x12a8 Serial 'e89e3a7dae988a087d1b640f1807bc6347f36046' Location 0x14720000>
<MuxDevice: ID 381 ProdID 0x12a8 Serial '5c632c0075c7becca705b83382a716a58ff6737a' Location 0x14630000>
Devices:
<MuxDevice: ID 382 ProdID 0x12a8 Serial 'e89e3a7dae988a087d1b640f1807bc6347f36046' Location 0x14720000>
<MuxDevice: ID 381 ProdID 0x12a8 Serial '5c632c0075c7becca705b83382a716a58ff6737a' Location 0x14630000>
<MuxDevice: ID 380 ProdID 0x12a8 Serial 'ee97cdec1c7c706068425fc4f6de3179a1d13782' Location 0x14610000>
Devices:
<MuxDevice: ID 382 ProdID 0x12a8 Serial 'e89e3a7dae988a087d1b640f1807bc6347f36046' Location 0x14720000>
<MuxDevice: ID 381 ProdID 0x12a8 Serial '5c632c0075c7becca705b83382a716a58ff6737a' Location 0x14630000>
<MuxDevice: ID 380 ProdID 0x12a8 Serial 'ee97cdec1c7c706068425fc4f6de3179a1d13782' Location 0x14610000>
<MuxDevice: ID 376 ProdID 0x12a8 Serial 'f687347fb37bf8121a4e04b7ecb8dba5894e68a6' Location 0x14230000>
Devices:
<MuxDevice: ID 382 ProdID 0x12a8 Serial 'e89e3a7dae988a087d1b640f1807bc6347f36046' Location 0x14720000>
<MuxDevice: ID 381 ProdID 0x12a8 Serial '5c632c0075c7becca705b83382a716a58ff6737a' Location 0x14630000>
<MuxDevice: ID 380 ProdID 0x12a8 Serial 'ee97cdec1c7c706068425fc4f6de3179a1d13782' Location 0x14610000>
<MuxDevice: ID 376 ProdID 0x12a8 Serial 'f687347fb37bf8121a4e04b7ecb8dba5894e68a6' Location 0x14230000>
<MuxDevice: ID 375 ProdID 0x12a8 Serial '74e91e5d81d623b5cdbac86a75713553d3c0a86b' Location 0x14620000>
Devices:
<MuxDevice: ID 382 ProdID 0x12a8 Serial 'e89e3a7dae988a087d1b640f1807bc6347f36046' Location 0x14720000>
<MuxDevice: ID 381 ProdID 0x12a8 Serial '5c632c0075c7becca705b83382a716a58ff6737a' Location 0x14630000>
<MuxDevice: ID 380 ProdID 0x12a8 Serial 'ee97cdec1c7c706068425fc4f6de3179a1d13782' Location 0x14610000>
<MuxDevice: ID 376 ProdID 0x12a8 Serial 'f687347fb37bf8121a4e04b7ecb8dba5894e68a6' Location 0x14230000>
<MuxDevice: ID 375 ProdID 0x12a8 Serial '74e91e5d81d623b5cdbac86a75713553d3c0a86b' Location 0x14620000>
<MuxDevice: ID 374 ProdID 0x12a8 Serial '3651d993a87da228a7453e465186a9d5f93fc38d' Location 0x14220000>
Connecting to device <MuxDevice: ID 374 ProdID 0x12a8 Serial '3651d993a87da228a7453e465186a9d5f93fc38d' Location 0x14220000>
Connection established, relaying data

When I first read the code it looked like this was just trying 3 times for reliability, but it appears each call always finds a new device as each call processes a single packet which corresponds to one device (https://github.com/nabla-c0d3/multcprelay/blob/master/usbmux.py#L190)

Is it possible to increase this value? Perhaps with a flag? Or perhaps just process until the timeout occurs three times.

Let me know what you think,
Vinay

Minor changes

Thanks for making it work with multiple devices. Would be great if you can provide some changes

  • port to python 3
  • package it and publish to pypi
  • expose an api(maybe)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.