[Mono-dev] Question on SerialPort - Serial.c
foros at arocholl.com
foros at arocholl.com
Sun Jan 13 18:21:03 UTC 2013
Hi,
My first post here. Let me introduce myself: I am a 25+ experienced C/C++/C#
DOS/Windows developer so more than willing to help on this outstanding
project with my 2 cents. Some experience on Linux and getting some in Mac OS
as well, but my real skills are on Windows. Please forgive me by asking
perhaps something obvious to an experienced Linux developer, I am happy to
be pointed to a specific How-to or whatever knowledge base that can describe
my question. As a long time user of distribution lists, I always do my
homework before posting a question.
I have been using Mono for some time, but never had the need or time to do
changes to the foundation myself.
I am using Mono 2.11.4 on Ubuntu 12.04, that is my setup for questions
below. My serial device is a Silabs USB-COM driver CP2102.
My specific question is about SerialPort class as well as some basic rules
about how to deal with custom changes:
* I found SerialPort class rejects a custom baudrate I need (500,000
bauds - 500Kbaud). Looking into the source code I found the limitation to be
in Serial.c file, so I added the B500000 and works fine. So I have now a
2.11.4.xxxx that is my specific version that resolves a problem I have. What
would be the best way to offer this version to my users so they get and
install the 2.11.4.xxx? My first thought was to deliver a .tar source code
file structure as the official website does, so every user compiles and
install this updated version. On the other hand, it would be easier for
users to get the baseline 2.11.4 and update the specific library only. I am
not sure either if distributing my own source code file structure is against
any of the Mono development recommendations. Any general suggestion on how
to distribute these changes so they are available to users of my software
are welcome.
* Should I submit this fix/enhancement to the GIT source code base or
is this kind of too custom for baseline branch? Just for reference, the
standard Windows SerialPort driver accepts 500,000bauds, so probably Mono
should do as well. Furthermore, the underlying Linux serial COM driver has
no problem with this custom baudrate as long as the device supports it.
* Another (albeit generic) question is from a build perspective. When
I update the Serial.c and do a <make>, I need to do a <make install> for the
library to be installed. All that is very time consuming, is there any
recommended way to update on the serial library update on the system only,
rather than having to make and install everything again and again with every
change? I am probably missing something obvious.
* A second problem I have on SerialPort class is apparently the
timeout parameter is not being honored. The SerialPort class changes the
timeout to the value I set, but the underlying Linux driver shows <dmesg>
with no changes in timeout. For instance if I set timeout=5000 for a 5sec
timeout, the software goes back immediately (as it apparently uses the 100ms
default) rather than waiting up to 5sec to get back with a timeout error. So
my question is if this is a known limitation and anyone has a fix I could
use. I saw nothing on the archive devel list nor the bugzilla. Any help
appreciated.
Best regards,
Ariel Rocholl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130113/6717dcc5/attachment.html>
More information about the Mono-devel-list
mailing list