Posts: 1
Joined: Sat May 17, 2008 8:18 pm
Location: Canada
Contact: Website

serial tools / NSbasic / CUwin3500

Sat May 17, 2008 8:21 pm

I see Deano has had this problem before, I wonder if you have solved it ?

I have tried to use the example below to use the serial port on my CUWIN3500
windows CE device.
I have looked through all the help files from the various parties involved-
nothing. Particulary annoying since i cut and pasted the code from the
NSbasic help file and it doesn't work. It makes me think maybe there is
some set-up detail with the Franson serial code or the CUwin3500 or the NSBasic that is not obvious to newbies (like me).

I get this error:

NSBasic line 9 char 0
Unable to reolve Class ID for 'serialce.port.1' when instantiating
'serialce.port.1' object.

I would really appreciate some help to get the serial port working.

Thanks in advance.

Bill Chernoff
in Canada

code from NSbasic help file :

'Contributed by Michael Newett

'This example works for Pocket PC or Desktop devices, with any length
'of file, any baudrate, serial or bluetooth.

'Note** The devices (PDA or desktop) Bluetooth must be turned ON
'before running the code.

'For CE Device use the following
AddObject "serialce.port.1","objPort" 'For CE Device
AddObject "serialce.license","objlicense" 'For CE Device

'For WindowsXP Device use the following
'AddObject "serialxp.port.1","objPort"
'AddObject "serialxp.license","objlicense"

'For all devices
objLicense.LicenseKey = "eNZd1eYLfPjTJ6P2aaeU1aZeu1iupvAPeRbd"


Sub StartCommandButton_Click
objPort.BaudRate = 9600
objPort.ComPort = 8 'enter bluetooth outbound COM port number here
objPort.ByteSize = 8
objPort.Parity = 0
objPort.StopBits = 0 '0 means 1 stop bit
objPort.Enabled = True 'enable comm. port
objPort.NoEvents = True
objPort.DTR = True
objPort.RTS = True
Sleep 100 'delay to enable comm port to initialise
End Sub

Sub StopCommandButton_Click
objPort.Enabled = False 'disable comm port
End Sub

Sub WriteCommandButton_Click
objPort.Write "Enter String to Write here"+vbCR 'Send command to device.
Add vbCr or vbLf as applicable
Do Until Finished=True
Size=objPort.Buffersize 'get number of bytes received from device
Newstr=objPort.Read(Size,1000) 'read response from device. Timeout if
nothing received after 1000ms
If IsNull(Newstr) Then
End If
If IsNull(Str) Then Str="Device Timed out"
MsgBox Str
End Sub

Sub Form1_load
AddObject "CommandButton", "StartCommandButton", 75, 125, 100, 25
bStart.Caption = "Start Comms"
bStart.FontSize = 8.25

AddObject "CommandButton", "StopCommandButton", 75, 225, 100, 25
bStop.Caption = "Stop Comms"
bStop.FontSize = 8.25

AddObject "CommandButton", "WriteCommandButton", 75, 175, 100, 25
Write.Caption = "Write"
Write.FontSize = 8.25
End Sub

Posts: 2
Joined: Thu Sep 25, 2008 7:35 pm

RE: serial tools / NSbasic / CUwin3500

Thu Sep 25, 2008 8:00 pm

I'm doing what I think you are; I'm using NSBasic, SerialTools and the CUWIN 3200. After a lot of trial and error I solved this error you are receiving (at least it worked for me).

I have my desktop computer that I program with connected to my CUWIN 3200 using ActiveSync. I develop my NSBasic code and then click the "start" button and it transfers my code to the CUWIN.

But the first time I did this I received the same error you did: "Unable to resolve Class ID for 'serialce.port.1' when instantiating'serialce.port.1' object."

Under the NSBasic menu select "Run" and then "Installers". Select "Basic.WinCE.exe" and open it. It will ask you where you want to install it, etc. I also installed "Runtime.WinCE.exe". (NOTE: I searched the 'Net for a long time and somewhere I found a post that said you need to do this; I'm not sure why (or if) you need to install both, the post said to and it works for me. I wish I could remember where I found that post but I can't.)

When I ran my code again, I did not get the error and everything worked as far as the serial port was concerned. There is a downfall to this; if you reboot the CUWIN you will have to run the setup for these installers again. I'm pretty sure it has to do with where I installed the software on the CUWIN. I installed both to the flash disk. I've run the save registry utility but it does not seem to make a difference; I have to reinstall on a CUWIN reboot. For now it works, but I'll have to slay this dragon before I'm finished. If you can help me on this please let me know.

Hope this works for you,


Posts: 1
Joined: Sun Nov 01, 2009 11:04 am
Contact: Website

RE: serial tools / NSbasic / CUwin3500

Sun Nov 01, 2009 11:06 am

I think you just configured the CUWIN3500 incorrectly.


Return to “SerialTools”