SpacehuhnTech / Huhnitor

Intergalactic serial monitor for ESP8266 Deauther
MIT License
324 stars 44 forks source link

Better serial port picker #2

Closed spacehuhn closed 4 years ago

spacehuhn commented 4 years ago

This is how I imagine it:

  1. Application starts
  2. Lists all available ports (line by line) with some sort if ID/numerbing
  3. User either types in the port name, the ID/number or plugs in a new device
  4. When a new serial device was detected or the manual port selection was successful, print the connected message and continue the program.

A parameter, maybe --no-auto disables to auto connect feature. So that if a new port was detected, it just gets added/printed to the previous port selection list.

the-Jamz commented 4 years ago

That parameter does seem more intuitive compared to -s, and yes detecting new devices plugged in while in the --no-auto mode does sound good, but as far as numbing the ports goes: I wanted to leave it a little bit more open (eg. user is able to type in any path they like) in case a port isn't detected by Huhnitor for some reason.

spacehuhn commented 4 years ago

but as far as numbing the ports goes: I wanted to leave it a little bit more open (eg. user is able to type in any path they like) in case a port isn't detected by Huhnitor for some reason.

I'd say we can do both like

[0] /dev/ttyUSB0
[1] /dev/ttyS3

typing /dev/ttyUSB0 would work just like 0. Making it as easy as possible for the user.

I guess we'd have to think of a way to distinguish user input between the number and a real serial port.

the-Jamz commented 4 years ago

Yeah a sort of hybrid sounds perfect.