Java Question library epson

timwil

Active Member
Licensed User
Longtime User
the printer is currently connected to the PC via USB therefore only the PC has direct access to the printer.

If you were to place the printer directly on the network you would also assign a static ip address. I am not aware (today) of how you would access the printer directly but I know that it is possible. You would have to send all the control codes to do all the formatting (I am assuming ESC/POS). I think (not totally sure) you might also have to get into SMB to communicate directly with the network connected printer. I am currently looking into this as one possibility but have not arrived at that place quite yet
 

timwil

Active Member
Licensed User
Longtime User
OK here is what you would have to do (I think :) )

Connect the printer directly to the network.

Assign it a static IP address (for the sake of this illustration we will use 10.20.30.40)

on your Android device open a TCP socket to 10.20.30.40 on port 9100

send the RAW data to the printer - You have to send all the control codes for the proper formatting.

Let me know how if it works as I do not have access to one of these printers at this time
 
Last edited:

pobss

Member
Licensed User
Longtime User
timwil thanks, now I'm still working but as soon as I finish some testing. see you soon.
also because I have to help, i am not a programmer I make pizza
 

pobss

Member
Licensed User
Longtime User
I can not connect the printer to the network and then assign an IP.
maybe need a print server.
there are other ways?
 

timwil

Active Member
Licensed User
Longtime User
what ports are on the printer - you said it has usb does it have any others?
 

boastrike

Member
Licensed User
Longtime User
Another approach is one that Erel gave an example of awhile back is to just write the receipt to a file, pdf or however you choose and ftp it to a directory on some pc or server. On the server you can write a small service that scans that directory every couple seconds and sends it to the printer that is on the network. Sounds like in your case it would be a good option.
 

hdtvirl

Active Member
Licensed User
Longtime User
I have just compiled the Java example from Epson and downloaded it to my phone, it is attempting to connect over TCP-IP to a printer which I won't have until Monday.

The example which boastrike suggested can use an event in dotnet (folderevent I think) which monitors a particular folder you can then read in the file format it and then you can print directly to your Receipt Printer on your network also. You also have a backup copy of the orders. Does your App connect already to a server to upload the orders ? I prefer this way of doing things rather than have the tablet talk directly to the printer. There are something to need to watch out for with this approach mainly files being received while it is currently processing a receipt file.

This is probably a better way of doing it as you will need to get the info across to your server in order to populate your order table on the server. You can 'Kill two Birds with the one stone' so to say !!.

If you want a copy of the Epson App let me know and I can get a copy across to you to test it.

Regards

BOB
 

pobss

Member
Licensed User
Longtime User
Another approach is one that Erel gave an example of awhile back is to just write the receipt to a file, pdf or however you choose and ftp it to a directory on some pc or server. On the server you can write a small service that scans that directory every couple seconds and sends it to the printer that is on the network. Sounds like in your case it would be a good option.

thank boastrike, you the link example?
 

pobss

Member
Licensed User
Longtime User
I have just compiled the Java example from Epson and downloaded it to my phone, it is attempting to connect over TCP-IP to a printer which I won't have until Monday.

The example which boastrike suggested can use an event in dotnet (folderevent I think) which monitors a particular folder you can then read in the file format it and then you can print directly to your Receipt Printer on your network also. You also have a backup copy of the orders. Does your App connect already to a server to upload the orders ? I prefer this way of doing things rather than have the tablet talk directly to the printer. There are something to need to watch out for with this approach mainly files being received while it is currently processing a receipt file.

This is probably a better way of doing it as you will need to get the info across to your server in order to populate your order table on the server. You can 'Kill two Birds with the one stone' so to say !!.

If you want a copy of the Epson App let me know and I can get a copy across to you to test it.

Regards

BOB

no my app is not connected to a server.
for now orders are made ​​directly from the PC that is at the checkout.
I'd try the app send it pobss tiscali it
tanks
 

pobss

Member
Licensed User
Longtime User
Since the printer only has a usb port the only way to connect it is thru that port. This means either you have to have the pc do some of the work or you can get a print server that serves a usb printer. This way you could put the printer directly on the network

Amazon.com: IOGEAR USB 2.0 Print Server, 1-Port GPSU21 (Silver): Electronics

I use the printer with the PC, so you can not share it with Android without a print server?
perhaps the only way is to send a file from android and use the desktop software to print.
these days I used google cloud print and I have to say that it works really well.
printing on all printers shared by tm-t70 pc included.
 

pobss

Member
Licensed User
Longtime User
tanks boastrike,
now use samba to send the file to print to the PC.
then when I get a print server that will do more experiments.
thanks to all
 
Top