Hello,

Has anybody used the Serial Manager API for printing
using a USB cable from an Alphasmart Dana?
We need to use the New Serial Manager API version 2
for USB communication.
My Dana does not have the Serial Manager Version 2
installed, but it has version 1 installed. Does anyone
know how to install it?
If anybody has any clue, pls reply.

--- Ritu Chawla <[EMAIL PROTECTED]> wrote:
> Sorry i mised out....
> Here is the problem .....
> 
> I am able to recieve data first time.
> Next time when this handler function is invoked it
> hangs at
> SrmReceiveWindowOpen(openPort, &bufP, &count); call
> and after some
> time palm device resets.
> 
> Can some body tell me what is the problem with this
> code.
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
>
[mailto:[EMAIL PROTECTED]
> Behalf Of Nathan Black
> Sent: Tuesday, June 29, 2004 10:38 AM
> To: Palm Developer Forum
> Subject: RE: Usb...Urgent Please
> 
> 
> it helps if you actually ask a question
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:bounce-palm-
> [EMAIL PROTECTED] Behalf Of Ritu
> Chawla
> Sent: Monday, June 28, 2004 11:13 PM
> To: Palm Developer Forum
> Subject: Usb...Urgent Please
> 
> 
> We are using wakeup handler function for recieving
> data from USB port.
> 
> Sample code is as follows
> 
> error = SrmExtOpen(serPortCradleUSBPort, &config,
> sizeof(config),&openPort);
> 
> if (!error)
> 
> {
> 
> error =
> 
>
SrmSetWakeupHandler(openPort,(WakeupHandlerProcPtr)RecvEventHandler,
> 
> (UInt32)openPort);
> 
> error = SrmPrimeWakeupHandler (openPort, 1);
> 
> }
> 
> 
> 
> In handler function we have written following code
> 
> static void RecvEventHandler(UInt32 refCon)
> 
> {
> 
> Err error = 0;
> 
> char buf[4];
> 
> UInt32 count = 0;
> 
> Err err = 0;
> 
> UInt8* bufP;
> 
> while (true) {
> 
> //read the data
> 
> err = SrmReceiveWindowOpen(openPort, &bufP, &count);
> 
> if (err)
> 
> SrmClearErr(openPort);
> 
> if (!count)
> 
> {
> 
> break;
> 
> }
> 
> if (bufP)
> 
> {
> 
> //Process the data here.
> 
> }
> 
> //Let the New Serial Manager know that we're done
> with the data.
> 
> SrmReceiveWindowClose(openPort, count);
> 
> }
> 
> 
> 
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> 
> 
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> 
> 
> -- 
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
> http://www.palmos.com/dev/support/forums/
> 



                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to