Hi,
I noticed a while ago that on a Mac the Makefile did not properly
recognize a tmote connected on a USB port. It seems that Mac OS X uses
some fancy interface names for the connected motes like
"/dev/tty.usbserial-M4ABD8MF". The regular expression used in the
Makefile (tinyos-2.x/support/make/msp/bsl.extra) parses until the first
number appears, and then continues to parse only numbers. The reason is
that on Windows systems the port number of the serial port has to be
recognized. As a consequence the above interface name gets shortened to
"/dev/tty.usbserial-M4" (stops once the first non-number symbol appears
after a number has been detected).
To resolve this issue I propose that the regular expression be changed
such that it also continues to parse after the number. The following two
lines show first the original version and then the proposed modification
(the regular expression has to be changed in two places within the
mentioned Makefile extension):
BSLTEST = $(shell motelist -c | perl -e '<> =~ /^[^,]+,(\S+?(\d+))/;
print $$1;' )
BSLTEST = $(shell motelist -c | perl -e '<> =~
/^[^,]+,(\S+?(\d+)[^,]*)/; print $$1;' )
Theoretically this should work on Linux and Windows as it always has (I
haven't tested this). In addition it will now also work on Mac OS X.
Any comments?
Cheers,
Urs
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help