gepd / Deviot

Sublime Text plugin for IoT development based in PlatformIO ecosystem (Arduino IDE)
Apache License 2.0
307 stars 56 forks source link

osx serial ports do not show port id #214

Open tablatronix opened 6 years ago

tablatronix commented 6 years ago

I cannot tell which device is which, I love seeing the names, but when there are dups, its a problem

screen shot 2018-03-08 at 10 10 22 pm

$ pio device list 
/dev/cu.Bluetooth-Incoming-Port
-------------------------------
Hardware ID: n/a
Description: n/a

/dev/cu.SPhone-WirelessiAPv2
----------------------------
Hardware ID: n/a
Description: n/a

/dev/cu.SLAB_USBtoUART
----------------------
Hardware ID: USB VID:PID=10C4:EA60 SER=0001 LOCATION=20-1.3.1
Description: CP2102 USB to UART Bridge Controller - CP2102 USB to UART Bridge Controller

/dev/cu.SLAB_USBtoUART24
------------------------
Hardware ID: USB VID:PID=10C4:EA60 SER=0001 LOCATION=20-1.3.3
Description: CP2102 USB to UART Bridge Controller - CP2102 USB to UART Bridge Controller

2 lines per port with both names would be nice

gepd commented 6 years ago

I'll try to do this tomorrow I don't have a OSX or Linux machine to change this

tablatronix commented 6 years ago

Let me know where to start. I need to learn python at some point

gepd commented 6 years ago

It was easier than I thought, It should be resolved with https://github.com/gepd/Deviot/commit/3f92c9d0dc88d262f98027896bc4d07ed6730c5a, let me know if that is what you expect

tablatronix commented 6 years ago

This seems to be a breaking change, tested on windows, it says select port over and over in a loop.

[ Deviot 2.3.0.dev1 ] Starting...
Select a Port From The List
gepd commented 6 years ago

Fixed https://github.com/gepd/Deviot/commit/d400b88ed1263dc7d0f458c46af0d39d5a362064

tablatronix commented 6 years ago

This seems to work and help, although its still a bit of a mystery lol Can probably close.

screen shot 2018-06-13 at 7 05 09 pm

gepd commented 6 years ago

I see, I think it would be always confusing when you have multiples devices with the same spec.. A solution would be to add an alias, I could look for a kind of ID that will make possible to always assign an alias that can replace or be merged with the current name

tablatronix commented 6 years ago

Yeah this is on my list to look into, I will look into having some kind of tty alias or have a naming convention, Not sure where OSX is getting the 15,16,17 suffixes but it must be caching them somewhere.

It is mostly an edge case.

gepd commented 5 years ago

What about having an option that when it's active, it asks for an alias everytime you connect the device, I don't see other way to do it

tablatronix commented 5 years ago

Seems tedious, plus osx changes these when moving ports.

How might that work? How about indicating the last used port, colored highlighted? Might help a little bit.

I have another issue where some usb shows 2 ports, ill check if its a pio issue or not

gepd commented 5 years ago

Yes it may be tedious

Idicanting the last used port where?

tablatronix commented 5 years ago

In the devices list, can it appear highlighted? Does it already show which one is active? I forget

gepd commented 5 years ago

Oh now I understand, ST does not provide anyway to highlight it, but what I can do is to add a character at the beginning of the active ports.

* CP2102 USB to UART Bridge Controller...
CP2102 USB to UART Bridge Controller...
* CP2102 USB to UART Bridge Controller...

In the previous case the first one and the last one are active.

What do you think?

tablatronix commented 5 years ago

yeah that might be cool, my main issue is that I have over 5 uarts, some are connected to test equipment like lab power supplies and multimeter, and some arduino etc, and of course they are all just slab_uart, or ftdi, etc, and it is hard to keep track of them lol

Even better would be remember the last device that was used and indicate it, even if inactive , probably requires saving stuff somewhere so might not be a good idea and prohibitive.

This might be a waste of time though, as its usefulness is still limited.

gepd commented 5 years ago

To remember what was the last device used isn't a problem, but where should it be displayed?

And what about the cases when you have devices with the same name, until now I didn't find any unique parameter to identify each device