weber
Posts: 13
Joined: Wed Aug 03, 2005 8:11 pm
Location: Spain

comport buffersize larger than 1024

Wed Aug 27, 2008 1:56 pm

Dear forum

The standard serial tools I have bought allows only a maximum buffersize of 1024, as shown below.


objPort1 = New SerialNET.Port
objPort1.ComPort = select_com
objPort1.BaudRate = 115200
objPort1.Timeout = 250 '
objPort1.BufferSize = 1024 '


How can I increase the buffersize

Best regards

Erik Weber

User avatar
johan
GpsGate
Posts: 14919
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: comport buffersize larger than 1024

Wed Aug 27, 2008 2:13 pm

Yes, there is an upper limit of 1024.

Source code is available here
http://franson.com/serialtools/purchase.asp?license=source&platform=net

Regards,
Johan

Franson Support

weber
Posts: 13
Joined: Wed Aug 03, 2005 8:11 pm
Location: Spain

RE: comport buffersize larger than 1024

Wed Aug 27, 2008 4:43 pm

Dear Johan

I have now bought and downloaded the C # code and compiled a new serialnet.dll

My application is in VB. When I reference to the new serialnet.dll I get a number of new errors all linked to drawing as shown below. Is it because the dll is compiled with C and my code is VB ?

D:\IoC-View ICU - v1\Form1.vb(408): 'Point' is not a member of 'System.Drawing.GraphicsUnit'.

D:\IoC-View ICU - v1\Form1.vb(427): 'MiddleCenter' is not a member of 'System.Drawing.ContentAlignment'.

User avatar
johan
GpsGate
Posts: 14919
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: comport buffersize larger than 1024

Wed Aug 27, 2008 4:45 pm

Most likely those errors does not relate to SerialTools, but to some other part of your project. SerialTools does not use the name spaces you list above (it is after all not a graphic library...)

Regards,
Johan

Franson Support

weber
Posts: 13
Joined: Wed Aug 03, 2005 8:11 pm
Location: Spain

RE: comport buffersize larger than 1024

Wed Aug 27, 2008 5:10 pm

I understand it is not a graphics library. But the project compiled perfectly before I exchanged the original dll with the new dll, compiled with the code I bought.


It does not matter that the dll is compiled with C # and my project is in VB ?

Erik

User avatar
johan
GpsGate
Posts: 14919
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: comport buffersize larger than 1024

Wed Aug 27, 2008 5:12 pm

An assembly compiled from C# works fine in a VB.NET project. That is one of the core features in .NET

You have probably confused .NET with .NET Compact Framework. Make sure you compile the project and SerialTools for the right framework.

Regards,
Johan

Franson Support

weber
Posts: 13
Joined: Wed Aug 03, 2005 8:11 pm
Location: Spain

RE: comport buffersize larger than 1024

Wed Aug 27, 2008 5:54 pm

Yes, now it compiles ! I had used the .NET CF dll instead of the .NET dll.

I appreciate your fast reply !

One final doubt. I gone through the c-code and the only lines I have changed in order to get a larger buffersize are the if sentences to the message boxes. Are further changes needed ?

D:\franson\SerialTools\Port.cs(815):
if(BufferSize < 0 || BufferSize > 20000)
D:\franson\SerialTools\Port.cs(817): m_throw("BufferSize must be a value between 0 and 20000");
D:\franson\SerialTools\SerialParser.cs(110): if(value < 0 || value > 20000)
D:\franson\SerialTools\SerialParser.cs(112): m_throw("BufferSize must be between 0 and 20000");

Return to “SerialTools”