CE 6 Serial Port Problems
Navigates to RoboticsConnection.com Home RoboticsConnection.com HomePage
RoboticsConnection User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



CE 6 Serial Port Problems Expand / Collapse
Author
Message
Posted Thursday, April 03, 2008 8:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Wednesday, April 16, 2008 10:08 AM
Posts: 3, Visits: 10
There seems to be an annoying serial port problem with CE6 and the .NET framework, but I see no mention on these forums or how people have worked around it.

I am about to describe the problem, but here is a very clear explanation given by somebody else who has the problem:
http://www.learningce.com/816.aspx

In the CE6 Serial Port driver, Microsoft disabled the ability to set the queue or buffer size for the serial port. Apparently, when you call serialport.open in a .NET application, it tries to set this queue size and an exception is thrown. In my own programs, I can simply ignore this exception and go on my way. I run into problems when trying to use the .NET library for the Serializer as I cannot add a try catch block around the line that opens the serial port. I have tried just putting Serializer.Run in a try catch block, but at the moment its not appearing to work. By that I mean that I took the client server example application, put the Serializer.Run line in a try block and catch any exception. I have the null modem cable hooked up between my ebox and pc as well. When I run the client GUI, I can successfully connect to the ebox over the network, but when I use the controls, no serial data is ever sent out of the port. When writing my own programs, I can get serial port data to work correctly.


So in the link above, the guy solved his problem by editing the CE driver code. Unfortunately, after editing this code, it doesn't seem that this modified code is ever actually getting compiled. I don't know how to force VS and Platform Builder to rebuild this serial module.

I've made this suggestion before, but it would be very handy if the .NET serializer library accepted a serial port reference instead of just a name and baud rate. This would allow much more flexibility with the library and allow users to better debug and repair issues with the hardware / software interface.

I'm surprised more people aren't having this problem??
Post #296
Posted Friday, April 04, 2008 5:45 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Yesterday @ 8:31 AM
Posts: 270, Visits: 396
Hey Matthew,

James Y. Wilson is the guy who owns www.learningce.com, and he's the guy who wrote the Serializer C++ lib.   You'll also see posts from him sprinkled throughout the forum.  I know he's been slammed w/ a large project at work, which has a impending deadline, but I'll ping him and get him to provide some feedback to help you get the driver recompiled.

For whatever reason, I've never hit these situations, and a few weeks back, I verified that I'm using the latest CF 2.0 SP2.   Another friend, Jim Hamblin (whos also a freind of James Y. Wilson) has also been hitting these issues.  I'm guessing the fix that they figured out is what Jim posted on his www.learningce.com website.

I have added your request to the Serializer.NET Lib TODO list.  I'm expecting that I'll be able to get to it in about three weeks.  We have some new products coming out soon, and I'm trying to get documentation, examples, & website updated right now.

At some point, I'm going to make the Serializer .NET Lib src available, but not until I figure out which licencse I want to use.

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #298
Posted Friday, April 04, 2008 7:02 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Saturday, June 07, 2008 10:02 PM
Posts: 5, Visits: 8
Other folks have definitely had this problem.  You don't need the work around that I described on my website any longer, with the release of .NET CF SP2 described here.

With regard to compiling in changes to drivers (which you shouldn't really need with SP2), you need to do a "Clean Sysgen" build, available in the Build | Advanced Build menu.  A regular Sysgen should work as well and will take less time, but I have seen the build system fail to compile changed source modules in the Public source tree before.  A "Clean Sysgen" takes a long time to complete, but will build your changes without fail.

James Y. Wilson
Windows Embedded MVP
Fortudine Vincimus!
www.learningce.com

Post #300
Posted Friday, April 04, 2008 9:42 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Wednesday, April 16, 2008 10:08 AM
Posts: 3, Visits: 10
Thanks very much for the help. I had tried installing the 3.5 beta compact framework and at first it didn't work. I got to work this morning and it worked. We have a robotics competition coming up in 2 weeks and unfortunately, I didn't have time to work out the idiosyncrasies of platform builder, so I decided to use Via's Artigo pico-itx system to run the full version of XP. This is certainly overkill (our tasks could be done with a pic16), but it provides a familiar environment and an easier development process than CE. It seems to me that there are still a few issues that need to be ironed out in CE 6. Additionally, we were never able to get USB to serial adapters working. Whenever we tried to use the FTDI provided drivers, it would either repetitively ask for the driver name, or lock the system up. I'm sure its possible, but I simply didn't have time to figure it out right now.

Thanks again, and when I get more time, I'll spend some time trying to work out my issues with CE.
Post #301
Posted Sunday, April 06, 2008 7:28 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Yesterday @ 8:31 AM
Posts: 270, Visits: 396
Matthew,

I'm working to get the FTDI drivers working now...I broke my build somehow, and I'm trying to figure out why.  Once I get that working, I'll determine one way or another if the FTDI drivers will work.

Heck, I'm not even getting asked for the correct driver when I plug our USB module in to the USB port!

If you learn anything that would be useful to others, please don't hesitate to post!

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #307
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: jsummerour

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 10:41pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.187. 16 queries. Compression Disabled.