More Sample Apps For MC9090, MC70, MC3000, etc

Documentation is included in the zip files. 

Please note that "PrintingStackDifferences1" was written to demonstrate how to use the same application to print on both the Stonestreet stack (MC70, etc) and the Microsoft stack (MC9060, PPT8866).  The differences are minor.

Jim Fuccello
Please feel free to

Please feel free to distribute the source code as needed.
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Michael Porter
Jim, It looks like your

Jim,

It looks like your Bluepair file is examples of how to pair a device.

I have a customer that would like to pair a Zebra printer by scanning a barcode on the printer. Maybe a serial number or a Mac address.

Can you please confirm that is what Bluepair is examples for?

 

Thanks,

Michael Porter

Texas

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kultida Chataru...
The sample is really helpful.

The sample is really helpful. I want to try to compile the code here. I'm using Microsoft Visual C++ 8.0 (2005).

 

Do I need to create new project or anything needed to be modified?

 

Thank you.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jim Fuccello
Yes you should create a new

Yes you should create a new project for the new VC.
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Richard Linsley-Hood
If you are using the code in

If you are using the code in the BluePrint sample as the basis for your test then the behaviour you are seeing (at least as regards to speed) is expected behaviour.

BOOL CBTPrint:penPrinterPort(TCHAR *pPort)
{
...

 //Wait for sometime. If we sent data immediately, it doesn't seem to
 // print
 Sleep(3000);
...

}

BOOL CBTPrint:rintText(TCHAR *pText)
{
...

 if(pText)
 {
...

...

   // Work around for problems with printers timing out.
   // BT stack is not able to report this faster using DCD/DSR
   // Remove following two lines when the fix is done.
   CloseHandle(hPort);
   m_favorites.sFavoriteEntry[nIndex].bPortOpened = FALSE;
  }
}

This means that each line or set of text sent to the printer will take at least the 3 seconds + the time it takes to close/open the port as well as the write to the printer. 1 minute per group of text overall would not be unexpected.

As you suggest writing the whole text in one go is the best solution but, without seeing the whole code - not just a sample - it is difficult to see where your problem lies. It sounds like you have an exception of some form. Stepping the code through in a debugger will give you more details as to how it is failing.

Richard LH

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kultida Chataru...
Hi Jim, The code I sent is

Hi Jim,

The code I sent is the whole code already. We just created a short code to test the printing API first.

Is there any return value to check the printing result? I will be able to step through the debugger tomorrow.

Maybe you can advice or give us just a short simple code to show what really need to just print the whole text once + the exception we need to concern after the print complete.

 

Thank you

Kultida

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kultida Chataru...
Hi Jim, We fixed something in

Hi Jim,

We fixed something in the code just to see when the error happen.

please advice.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kultida Chataru...
Hi Jim,Sorry for disturbing

Hi Jim,

Sorry for disturbing you again. Today I tried the code as attached in my previous message and debug step by step. And it seems that the error occured after the printing process completed succesfully. I still can see the message "Print Succesfully" and then it terminated the running program.

Actually I just want to print the message "Bluetooth printing" by sending the CPCl language to printer as below. Besides the terminating at the end, other performace is good and acceptable.

Maybe if you can give me the simple code of how to send below data to printer without program termination at the end, that would be very helpful.

I'm using Zebra Cameo 3 with MC70. Is there any known issue with them?

Thank you,

! 0 150 150 240 1

LABEL

T 00000009.cpf 0 40 50

Bluetooth printing

             PRINT

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Richard Linsley-Hood
Have you tired the BluePrint

Have you tired the BluePrint example which is at the top of this thread. It performs exactly the requirements you have (in the snese that it prints a test string to a printer over Bluetooth)?

Richard LH

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
May the source code in these

May the source code in these samples be sent to customers or potential customers?  Are there any specific restrictions on who we may ssend the source code to?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kultida Chataru...
Hi Jim, Now we can compiled

Hi Jim,

Now we can compiled the code and trying to apply it to our application.

We're facing two issue now:

(See attached code)

-If we send text to printer line by line, it will print very slowly. About 1 minute per line.

-If we send the whole text at the same time, it print faster& acceptable speed, but the program will close itself after printing complete. It seems like there is an error on using this API.

We want to go with the second way. Please advice is there is anything we should be aware in using this API.

 

Thank you,

Kultida

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments