Improved Serial Library For UNIX/Linux/Solaris Users
Posted: Tue Sep 08, 2009 6:39 pm
Greetings Fellow Unix/Linux/Solaris/etc Users,
Due to problems in the current JP1.x (Flash) serial library code, some of the most serious of which are specific to Linux users of that library, I've made some important bug fixes and improvements and uploaded a new beta version of the library for anyone who'd like to try it out.
The critical changes in this new library are as follows:
For anyone using the command-line utilities under Linux, this library should be useful too. I think those utilities are still being distributed to expect the 'libjp12serial.so' library to be in the same directory as the command-line executable, so you should be able to replace the file pretty simply.
I'd greatly appreciate any feedback on this new library, both positive and negative. If it works well, I plan to recommend it for inclusion in the next release of RM/RMIR.
Please let me know if there are any questions or problems....
Regards,
Bill
Due to problems in the current JP1.x (Flash) serial library code, some of the most serious of which are specific to Linux users of that library, I've made some important bug fixes and improvements and uploaded a new beta version of the library for anyone who'd like to try it out.
The critical changes in this new library are as follows:
- Fixed a bug whereby the routine used to delay ('sleep') in a non-Windows (Unix, Linux, Solaris, et al) environment was off by a factor of 1000, erroneously sleeping for the specified number of MICROseconds instead of the specified number of MILLIseconds.
- Fixed a bug whereby the code intended to set and hold a UART 'break' condition in a
non-Windows (Unix, Linux, Solaris, et al) environment was erroneously using code to set the 'break' condition, sleep for a while (250 milliseconds in many implementations), then release the 'break' condition.
This problem was substantially masked by the 'sleep' bug mentioned above, which was causing the process of putting a remote control into 'serial communication' mode to succeed where it would have otherwise failed with this bug in place.
A corresponding fix was also needed to release the UART 'break' condition when commanded. - Properly preserve and restore the port settings of any opened RS-232 serial port. Previously, the port's settings were overwritten, corrupting the settings for all ports (and therefore potentially all devices connected to them, like a dial-up modem) which may have been opened in the search for a valid JP1.x (Flash) remote control.
- Added support for Solaris environments, courtesy of 'Barf' and 'osolfan'.
For anyone using the command-line utilities under Linux, this library should be useful too. I think those utilities are still being distributed to expect the 'libjp12serial.so' library to be in the same directory as the command-line executable, so you should be able to replace the file pretty simply.
I'd greatly appreciate any feedback on this new library, both positive and negative. If it works well, I plan to recommend it for inclusion in the next release of RM/RMIR.
Please let me know if there are any questions or problems....
Regards,
Bill