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
I would really appreciate some help to get the serial port working.
Thanks in advance.
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
'For all devices
objLicense.LicenseKey = "eNZd1eYLfPjTJ6P2aaeU1aZeu1iupvAPeRbd"
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
objPort.Enabled = False 'disable comm port
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
If IsNull(Str) Then Str="Device Timed out"
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