Thanks guys for the inputs.
I remember that I was playing with the AT commands and seems I set the baud rate to 38400 !! - I went through the process of changing baud rates in the windows driver and the software until it responded to the AT prompts with an OK. I then re-compiled the test code with the hardware settings for 38400 and once loaded connected via the terminal program --- bingo, or should that be "hello"
I then changed the serial defines in my main code and have the PIC responding over BT when using the terminal program, IR send Q for queries and all the date for the current prob readings and setting are streamed to the PC. Only problem is that the PC app crashes and screws up the sub system so I need to restart the PC .
The error message is stated above, and there are references to 115200 baud, but I've tried running the application from within the KDE and it still errors. My guessing is that it's something to do with the port handling in Liberty Basic as it works fine with real RS232 connection and when I use a couple of FTDI USB to serial boards, being direct connections. Although the BT dongle produces a virtual com port and this is detected by the initial windows that scans for open ports, it fails to detect the controller (sends out "C" and expects "R" in return) and then crashes and has to be end tasked. At this point the BT pairing drops and wont re-connect and the PC has to be re-booted with both dongles powered down at the time.Code:Error log timestamp Monday 29/06/15 19:03:38 Runtime error: Element not found. Error(Exception)>>defaultAction Error(Exception)>>activateHandler: <anUndefinedObject> Error(Exception)>>handle Error(Exception)>>signal Error class(Exception class)>>signal: <'Element not found.'> BasicRunProgram(Object)>>error: <'Element not found.'> BasicRunProgram(BasicProgram)>>terminateRun: <anError> [] in BasicProgram>>errorHandlerBlock ExceptionHandler>>evaluateResponseBlock: <aBlockClosure> for: <anError> [] in ExceptionHandler>>handle: ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure> BlockClosure>>invisibleEnsure: <aBlockClosure> ExceptionHandler>>handle: <anError> ExceptionHandler>>findHandler: <anError> Error(Exception)>>activateHandler: <anExceptionHandler> Error(Exception)>>handle Error(Exception)>>signal Error class(Exception class)>>signal: <'Element not found.'> BasicRunProgram(Object)>>error: <'Element not found.'> BasicRunProgram(BasicProgram)>>runError: <'Element not found.'> BasicRunProgram(BasicProgram)>>handleComError: <'Element not found.'> SerialDevice32(SerialDevice)>>error: <'Element not found.'> SerialDevice32>>openError: <1168> SerialDevice32>>openError SerialDevice32>>open SerialDevice32(SerialDevice)>>open: <'COM4'> BasicCommStream>>from: <'COM4:115200,n,8,1,ds...'> mode: <'RANDOM'> handle: <'#1'> BasicRandomFile class(BasicFile class)>>from: <'COM4:115200,n,8,1,ds...'> mode: <'RANDOM'> handle: <'#1'> owner: <aBasicRunProgram> length: <128> [] in OpenCommand>>using: [] in BasicRunProgram>>begin ExceptionHandler>>evaluateProtectedBlock: <aBlockClosure> [] in ExceptionHandler>>activateDuring: ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure> BlockClosure>>invisibleEnsure: <aBlockClosure> ExceptionHandler>>activateDuring: <aBlockClosure> ExceptionHandler class>>handle: <anError class> with: <aBlockClosure> during: <aBlockClosure> BlockClosure>>on: <anError class> do: <aBlockClosure> BasicRunProgram>>begin BasicRunProgram(BasicProgram)>>gotoAndIfStoppedBegin: <'[IoWait]'> BasicRunProgram(BasicProgram)>>handlerName: <'[IoWait]'> evaluate: <aBlockClosure> callParameters: <anOrderedCollection> BasicRunProgram>>handlerName: <'[IoWait]'> evaluate: <aBlockClosure> callParameters: <anOrderedCollection> BasicRunProgram(BasicProgram)>>submitHandlerName: <'[IoWait]'> evaluate: <aBlockClosure> callParameters: <anOrderedCollection> BasicRunProgram(BasicProgram)>>submitHandlerName: <'[IoWait]'> callParameters: <anOrderedCollection> TimerTopPane>>wmTimer: <333598> with: <0> TimerTopPane(Object)>>perform: <#wmTimer:with:> with: <333598> with: <0> NotificationManager>>notify: <aWinMessage> NotificationManager>>notifyRecursive NotificationManager>>recursiveMessage SystemDictionary>>recursiveMessage SystemDictionary>>launch
This section above checks the buffer to see if something is deposited into it (so I was told)Code:FOR TempWD = 0 TO 1000 IF RCIF=1 THEN GOSUB coms ; Check to see id PC application connected PAUSE 1 NEXT TempWD
then the coms section responds, and initially sends data to the PC and then waits for the next "Q"ueriy or receipt of updated data "S"ent from the PC application.Code:coms: HSERIN [nTest] SELECT CASE nTest CASE "C" ; if C then application checking for controller goto respond CASE "Q" ; if Q then send data to PC Goto Term_TX CASE "S" ; if S then receive data from PC goto Term_RX return respond: Hserout ["R"] goto main
![]()





Bookmarks