I've written some code to send a simple string to a bluetooth printer.
I've removed the error checking for ease of reading but i do not get any
errors at any point. I do not however get anything to print on the
printer. The bluetooth printer adapter led does blink indicating it is
receiving bytes. Is there something I need to send the printer to tell
it im done transmitting or something? Also, i have no idea what to set
the baud rate at. BTW printboy worked fine wit the adapter so i do
belive the setup is functional.
Thx a lot for the help.
Err err;
SrmOpenConfigType config;
BtVdOpenParams btParams;
UInt32 baudRate=115000;
UInt16 portId;
UInt32 count;
config.function = serFncUndefined;
config.drvrDataP = (MemPtr)&btParams;
config.drvrDataSize = sizeof(BtVdOpenParams);
config.baud = baudRate;
btParams.role = btVdClient;
//removed code where i 0'd out address
btParams.u.client.method = btVdUseUuidList;
btParams.u.client.u.uuidList.len=0;
btParams.authenticate=false;
btParams.encrypt=false;
err = SrmExtOpen(sysFileCVirtRfComm, &config, sizeof(config), &portId);
SrmClose(portId);
count = SrmSend(portId,"Its ALIVE!",10,&err);
err = SrmSendWait (portId);
err = SrmSendCheck (portId, &count);
err = SrmSendFlush(portId);
SrmClose(portId);
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
opensubscriber is not affiliated with the authors of this message nor responsible for its content.