Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

1 ethernet port but 2 hardware

Status
Not open for further replies.

mdpai

Junior Member level 2
Junior Member level 2
Joined
Jan 7, 2010
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
france
Activity points
1,459
Hi,
I have some lack of knowledge in what i'm trying to achieve. I'm planning to do a simple project with my two identical microcontrollers board.

I have a micro-controller that i want it to act like a gate between my network (the server) and my printer. I want to do something like pushing a button than the server is authorized to send the file to the printer. But the problem is I have access to only a single ethernet port. So I'm thinking to buy 2 port ethernet and put them to my microcontroller board, then connect the microcontroller to the network (the server) and connect the printer to the microcontroller. Is this possible? What I should do with the ethernet ports. Do I need to buy something else or I just need to program my microcontroller with a some code.

P/S : my microcontroller has linux embedded in it. I attached a possible schema that I think I want to achieve.

I'll explain here what exactly I want to achieve:

The situation:
printer A attached to my board A in room A.
printer B attached to my board B in room B.
Both of my board connected to the network.
A person in room C want to print a file. He sends the print jobs to a server.

So what i'm planning is; that person can go to any printer he wants (in room A or B), than he put some passwords (let say my board have keyboard and lcd screen too), than the microcontroller checks with the server if that person have print jobs and send the print jobs to the specific printer.

I'm still searching for the correct microcontroller because actually I'm confused, if the server sends a file to print to the printer, it has to go through my microcontroller (I think so). So, do I need a big memory for the microcontroller?
 

It's mainly a question of the involved printer protocols, but the gateway must not necessarily buffer larger amounts of data.
It can signal busy and only accept new data if the previous could be delivered to the printer. So a usual TCP buffer size
of a few 10K should be sufficient.
 

FvM said:
It's mainly a question of the involved printer protocols, but the gateway must not necessarily buffer larger amounts of data.
It can signal busy and only accept new data if the previous could be delivered to the printer. So a usual TCP buffer size
of a few 10K should be sufficient.

Thanks for the answer.
As for my primary question, do you have suggestion for it? Some people tell me that it's hard t odo the routing part from scratch. Is there any "already existed" component that I can buy to achieve the same thing?

Thanks for all the answers
 

I don't know any. Generally, I think, a good understanding of TCP/IP networking and printer protocols in particular is
required for the project. Also modifications of the printer server operation may be required, too. Normally, a print job
would be send to a specific printer or possibly a printer pool. It's unusual to select the destination after the job has been started.
 

You can avoid using two ethernet ports if your printer support USB connection. But I think the problem is more complex than a simple routing problem. It can head into three distinct ways depending upon whether you want to use the existing printing infrastructure.

Given that you don't want the user to tie to a specific printer, I think the best solution would be to build a virtual printer on the server.
All users will print to this printer but this will just store the print jobs against user info (may be a key generated at the time printing) instead of actually printing.

Since you want to have multiple printers so using ethernet is the best choice to connect your boards with the print servers.

You are having one baord/printer so on the other side of the board, it could be USB. If it is USB then your embedded application would first authenticate the user then start requesting data for printing from server and sending to the printer. Using USB will give you more choice for your printer.

If the other side is also another ethernet base subnet then you can configure Linux as per microKernel's suggestion. This method would give you the choice to use any of the printers if there are multiple printers in a room and the are on the same subnet.
 

the page to be printed is converted in to data streem specific to the printer selected. if printer A AND B are different the file can not be printed even if you spool it to the other printer.

how will you solve this issue?

hock
 

hock said:
the page to be printed is converted in to data streem specific to the printer selected. if printer A AND B are different the file can not be printed even if you spool it to the other printer.

how will you solve this issue?

hock

I think the best way is to create a virtual printer on the server. So when we want to print something, the file will be sent to the server instead. Then when the actual printing take place, it's like the server is sending the print job to the printer. So I imagine that if I take this solution, I don't to worry about the brand or type of the printer.
Correct me if i'm wrong.
 

So I imagine that if I take this solution, I don't to worry about the brand or type of the printer.
You won't need to worry about that at the user level. But when you are sending the actual print from server to a real printer, you'll have to have the driver for the real printer installed on your board. You'll also need to take care of converting the user options (duplex printing, page setup etc.) from virtual printer to the real printer.

You may want to ignore that initially.
 

I think, hock is right. The driver is working on the PC generating the data stream. If you have compatible printers on all
ports, e.g. Postscript or PCL, it's no problem of course.

I don't completely understand the intended operation, but one option is to select a specific printer port already
when creating the print job. You can only call it from the previously selected port in this case.
 

Thanks for the answers.

VirtualThread said:
So I imagine that if I take this solution, I don't to worry about the brand or type of the printer.
You won't need to worry about that at the user level. But when you are sending the actual print from server to a real printer, you'll have to have the driver for the real printer installed on your board. You'll also need to take care of converting the user options (duplex printing, page setup etc.) from virtual printer to the real printer.

You may want to ignore that initially.

Do I really need driver for the real printer on my board? because what I'm thinking is, the server will have the drivers for all the printers. So, it's the server job to convert all the files to specific data stream for a specific printer. Then the board just have to redirect all the data stream coming from to the printer (if the boad is authorized to do so of course).




I think, hock is right. The driver is working on the PC generating the data stream. If you have compatible printers on all
ports, e.g. Postscript or PCL, it's no problem of course.

I don't completely understand the intended operation, but one option is to select a specific printer port already
when creating the print job. You can only call it from the previously selected port in this case.

My idea is a user can print the files he created at any printer he choose at any time he wants. Let say he created a file called myfile.doc and he wants to print it at different room, let say the conference room. So he "print" the file (send the file to the server) first. When he's at the conference room, he realized that the printer is out of service. No worries, he just need to go to nearest printer with my board installed, fill in his password, and voila print out the file. So there's a need to not choose a specific printer when we do the initial print.
 

who will write the printer specific code for your server?

the easy way is to map both the printers on your guest PC.

you can do that job in 10min or buy a network enabled printer.


hock
 

hock said:
who will write the printer specific code for your server?

the easy way is to map both the printers on your guest PC.

you can do that job in 10min or buy a network enabled printer.


hock

thats is not my job, let say the server has a specific software
to do that..

Yeah I agree that the easy way you mention is indeed easy but one of the interest and advantages that I want is when the user prints, the server will hold the print jobs until the user go to the specific printer (let say the printer is in another building), and authorize the printer to prints.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top