Onboard serial ports show themselves as /dev/ttyS0-4, so maybe you can
tighten the filter.

We prefer to use the /dev/serial/by-id/* links since those don't
change after reboots, where as the normal /dev/tty device do. (with
usb interfaces)
That's why you see extra code to read the links, you can leave it out
if not needed.

Regards,
Ron.

2015-06-01 14:20 GMT+02:00 Shane <shanep1...@tpg.com.au>:
> Thanks heaps this is exactly what i wanted.
> just one thing i get some 30 odd ttys's and I'm sure there all not
> usable serial ports but this is not a problem for me i can just use the
> ones with values
> also i would have thought that a filter of 'tty[ACM|USB]*' would stop this
>
>
> On 01/06/15 21:55, Ron wrote:
>> https://domotiga.nl/projects/domotiga/repository/revisions/master/entry/DomotiGa3/.src/Util.module#L218
>>
>> Where argument are '/dev/', 'tty[ACM|S|USB]*'
>>
>> Regards,
>> Ron.
>>
>> 2015-06-01 13:31 GMT+02:00 Benoît Minisini <gam...@users.sourceforge.net>:
>>> Le 01/06/2015 12:23, Shane a écrit :
>>>> what would be the best way to make a list of available serial ports in a
>>>> gambas program?
>>>>
>>>> thanks Shane
>>>>
>>> Does anyone have an idea?
>>>
>>> ls /dev/lp* maybe?
>>>
>>> --
>>> Benoît Minisini
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Gambas-user mailing list
>>> Gambas-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to