Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device works perfectly - though has naming problems #1

Closed
scruss opened this issue Feb 20, 2011 · 7 comments
Closed

Device works perfectly - though has naming problems #1

scruss opened this issue Feb 20, 2011 · 7 comments

Comments

@scruss
Copy link

scruss commented Feb 20, 2011

This works fine, but — like failberg's fork — gives me a very strange device special name, complete with non-printing characters. Currently, it's attached on:

/dev/tty.PL2303-12345678Z qRz™�¨�l

That special name contains a newline, which is a bit difficult to use with applications.

@hugovincent
Copy link
Owner

The suffix (the bit after "tty.PL2303-") is generated from the serial number stored in the device, so I guess this means your device(s) have corrupt or badly formatted serial numbers. Check in "USB Prober" (installed with Xcode) or "System Profiler" if the serial number for the device looks wrong?

I've just checked all my PL2303 devices and none have a serial number set. In this case, the driver creates a suffix from the USB port number/location.

If you're a programmer, I'd suggest fixing the code around lines 986 to 1004 in osx_pl2303.cpp - it's supposed to reject serial numbers that aren't valid ASCII, but in your case it's obviously not doing that properly.

@hugovincent
Copy link
Owner

I just uploaded a version with a hack that bypasses the serial number logic and always uses the location info for the suffix. Hope this helps.

@scruss
Copy link
Author

scruss commented Feb 20, 2011

Thanks - but it still does the same thing.

The USB Probe indicated that the serial number is 12345678, with no cruft on the end. Looks like the rest of the string is uninitialized buffer, as the device special seems to have random characters after the string.

The device I'm playing with is the ultra-cheapo MS Streets & Trips GPS that came with S&T 2008.

@hugovincent
Copy link
Owner

Try the one I just uploaded.

@scruss
Copy link
Author

scruss commented Feb 21, 2011

It seems to be identical to the 13 Dec version.

@hugovincent
Copy link
Owner

I added a line of code to clear the buffer and make sure it's correctly terminated. Try again - I uploaded it again in case I accidentally uploaded the wrong file. Sorry for this back-and-forth, but I have no way of testing this (as I said, my devices don't have serial numbers).

@scruss
Copy link
Author

scruss commented Mar 14, 2011

Same device name issue as before, sorry. Is there any easy way that you can prevent non-alphanumeric characters getting into the device special name?

This issue was closed.
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

No branches or pull requests

2 participants