bluetooth print follow

bluetooth print follow

Postby Richard Chidiak » Sat Feb 24, 2007 1:37 pm

Antonio

Is there any reasonable chance i can get a fix on the above problem ?

I have to deliver the printer and the app next tuesday.

Thanks for reply

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Sat Feb 24, 2007 1:51 pm

Richard,

Could you check if this function returns .T. ?
Code: Select all  Expand view  RUN
HB_FUNC( WRITE233 ) // hComm --> lOk
{
   DWORD cBytes;
   unsigned char ch = 233;
   
   hb_retl( ( BOOL ) WriteFile( ( void * ) hb_parnl( 1 ), &ch, 1, &cBytes, NULL ) );
}

You already tested it but we did not check the returned value. Thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Richard Chidiak » Sat Feb 24, 2007 2:01 pm

It returns .t.

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Sat Feb 24, 2007 8:12 pm

Richard,

Then it means that WriteFile() is working ok :-(

Are you able to print those characters from Pocket Word ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Richard Chidiak » Sat Feb 24, 2007 9:28 pm

Yes no problem

Even the txt file created from fwppc can be printed OK when selected and sent via bluetooth to the printer.

To make it clear, my app first generates a txt file then sends it to the printer.

This is why i asked for a workaround if we can simulate the "send via bluetooth" from fwppc, the problem is fixed as the printout is perfect

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Maybe a sloution ? Font problem ?

Postby Richard Chidiak » Sun Feb 25, 2007 4:32 pm

Anonio

This is the last test i did, here is the code

#include "C:\FWPPC\INCLUDE\FWCE.ch"

#define GENERIC_READ 0x80000000
#define GENERIC_WRITE 0x40000000
#define GENERIC_REWRITE 0xC0000000
#define OPEN_EXISTING 3
#define FILE_ATTRIBUTE_NORMAL 0x00000080
#define FILE_FLAG_OVERLAPPED 0x40000000

function Main()
LOCAL HOUT1,CFILE

cfile := CurDir() + "TEST.txt"
IF FILE(CFILE)
ferase(cfile)
ENDIF

HOUT1 := fCreate( cFile )
FWRITE( HOUT1, "THIS IS A NON ACCENTED LINE" + CRLF )
FWRITE( HOUT1, "àéè€ù° Accented LINE" + CRLF )
fClose( hOut1 )

Sendblue( MemoRead(cfile))

// SENDBLUE("àéè€ù° Accented LINE") THIS DOES NOT WORK ACCENTED CHARS DO NOT SHOW

RETURN Nil


STATIC FUNCTION SENDBLUE(ctext)
LOCAL i, hOut

hOut := CreateFile( "COM5:",GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL )
IF hOut==-1
MsgStop("Port Not Found")
ELSE
FOR i = 1 TO Len( cText )
WriteByte( hOut, Asc(SubStr( cText, i, 1 ) ) )
NEXT
CloseHandle( hOut )
ENDIF
return nil



The printout direct from fwppc is bad , i have scanned it , you can see it at

www.cbati.com/fwppc.jpg


The printout that comes out of the txt file is OK you can see it at

www.cbati.com/txt.jpg


Now just a confirmation, as far as i know, Ascii codes are related to fonts, Isn't it so ? What is the default font set by the pocket and how to change it to "courrier new" for instance before transmitting ?

Can this be the problem ?

Thanks for the reply

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Sun Feb 25, 2007 8:35 pm

Richard,

> Ascii codes are related to fonts, Isn't it so ?

Ascii codes are numbers from 0 to 255, to select a char from the used chars table (of a font).

The used font must be selected from the bluetooth printer. I guess we can not select it from the Pocket PC as we are just sending bytes to a "file", unless some combination of them may specify to use a special font for the bluetooth printer. I may be wrong
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Richard Chidiak » Sun Feb 25, 2007 9:35 pm

Antonio

Open UESTUDIO, VIEW, ASCII TABLE

Code 233 is OK in major fonts and it displays é correct

Select "Terminal" as font and you will see that the retreived codes look a lot like what is being printed... This is what makes me think of a font problem.

The txt file you see the image in my previous post has been printed from the pocket pc through file explorer, send via bluetooth. So the printer can print the codes when coming from an ascii txt file.... If i could send automatically the txt file to the printer (like file explorer does), that would be great, but i have not found how. Any idea ? :?
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Sun Feb 25, 2007 11:44 pm

Richard,

>
Select "Terminal" as font and you will see that the retreived codes look a lot like what is being printed... This is what makes me think of a font problem.
>

Ok, now I see what you mean. Have you checked if there is a way to set a default printer font from the printer side ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Mon Feb 26, 2007 8:04 am

Richard Chidiak wrote:Code 233 is OK in major fonts and it displays é correct


If you are absolutely sure (how?) that the printer receives the correct code from the palmtop then it could mean that the printer itself expects a different code (ie. you have to make a conversion before sending the characters to it).

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Richard Chidiak » Mon Feb 26, 2007 9:00 am

Enrico

My fwppc app creates on the pocket pc a txt file containing accented chars like 223.
Printing on the pocket pc (not from fwppc) but from file explorer to the printer prints all the chars perfect !
The chars can not be printed from fwppc and i suspect a font problem not from the printer ! There are no settings on the printer. I tested through 2 different printers and 4 different pocket pcs. i think the problem is in fwppc. I hope someone else can test accented chars on Bluetooth printing and confirm the problem. Anyone ?

EMG :> you have to make a conversion before sending the characters to it

This is what i wanted to avoid . Very risky.

I will abandon printing from fwppc till we find a correct solution and ask the users to select the txt file and print it via file explorer. I will search also if i can find a program that can send files to BT printer and see if it can be called from a fwppc app.

I am not happy with this, it is the first time we deliver a problematic app ! And we have to deliver tomorrow !

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Enrico Maria Giordano » Mon Feb 26, 2007 9:21 am

Richard Chidiak wrote:Enrico

My fwppc app creates on the pocket pc a txt file containing accented chars like 223.


It's not the same as sending characters through bluetooth. You are still not sure what the printer really receives.

Richard Chidiak wrote:Printing on the pocket pc (not from fwppc) but from file explorer to the printer prints all the chars perfect !
The chars can not be printed from fwppc and i suspect a font problem not from the printer !


If the printer only receives ASCII characters then I can't see how font concept fits this scenario. We have to investigate, I repeat, on what exactly comes out from the bluetooth and I don't know of any other way than connecting the bluetooth cable to a PC and directly read and show each single character that is received.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Richard Chidiak » Mon Feb 26, 2007 9:47 am

Emg>It's not the same as sending characters through bluetooth. You are still not sure what the printer really receives.

This has been tested also with the same result

As per Ascii chars, they are different with fonts !!!!

Look at 223 ascii char forr example in Courrier new or Terminal font or system font, you will see it is displayed quite differently.

EMG>I repeat, on what exactly comes out from the bluetooth and I don't know of any other way than connecting the bluetooth cable to a PC and directly read and show each single character that is received.

How ? i have tried without success, any sample ?

Thanks for your help,

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Enrico Maria Giordano » Mon Feb 26, 2007 10:01 am

Richard Chidiak wrote:As per Ascii chars, they are different with fonts !!!!


Font is not something related in any way to Ascii format. Ascii format is not something similar to RTF, PDF, DOC, etc. It is far simpler and not able to represent fonts.

Richard Chidiak wrote:Look at 223 ascii char forr example in Courrier new or Terminal font or system font, you will see it is displayed quite differently.


But the printer still receives code 223 and there is nothing that the sender can do. If the printer really receives 223 from both bluetooth (via FWPPC) and text file (via Explorer) then it has to print the same char. As long as the printed chars are different then the printer is clearly receiving different codes.

Richard Chidiak wrote:How ? i have tried without success, any sample ?


No, sorry.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Mon Feb 26, 2007 12:31 pm

Richard,

Is there an online docs for your bluetooth printer ?

There has to be a way to change the used font on the printer
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 3 guests