Skip to content

Conversation

@larsch
Copy link

@larsch larsch commented Jun 30, 2020

How about leaving specifier[2] as it is now (serial or device number), but add support for specifier[3] being serial number only. I'd open it with bitbang.open_bitbang_from_url("ftdi://vid:pid::0025/1") instead.

Resolved #209

@eblot
Copy link
Owner

eblot commented Jun 30, 2020

The issue is that this syntax breaks backward compatibility...

@eblot
Copy link
Owner

eblot commented Jun 30, 2020

Sorry I misread the code.
I need to check it does not break the bus:address code though

@larsch
Copy link
Author

larsch commented Jun 30, 2020

I intended to leave support for current styles (but sort-of deprecate using index field for serial number, since it is unreliable anyway).

@eblot
Copy link
Owner

eblot commented Jun 30, 2020

Maybe it is time to break compatibility with index-based syntax, (re-)using your proposed syntax:

URL scheme: ftdi://[vendor[:product[:serial]]]/interface
URL scheme: ftdi://[vendor[:product[:bus:address]]]/interface
URL scheme: ftdi://[vendor[:product[::@index]]]/interface

?

@larsch
Copy link
Author

larsch commented Jun 30, 2020

That would certainly work for me, as I don't need the backwards compatibility. And it's much simpler overall.

@eblot
Copy link
Owner

eblot commented Jun 30, 2020

Ok, as index is not really reliable anyway - and that the new bus:address syntax is a far better way to refer to S/N-less devices, I think it is worth reworking this.

I just need to find some spare time to implement it (and test & document it...)

@f423r
Copy link

f423r commented Jan 27, 2021

I would also prefer prioritizing serial number over index :) I have till now used this field as a serial number, in my organization we use integer serial numbers so I had to add literal prefix to use pyftdi. This causes an inconsistencies with other platforms which do not have such an issue, and questions why devices which work with "python apps" must be marked differently.

@eblot
Copy link
Owner

eblot commented Jan 27, 2021

I'm ok with that. I think I will remove the index support for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

URL with integer serial number doesn't match device

3 participants