Author Archives: danieru

What is port 9100 & How to print to it

Of the many methods for printing the simplest and most genius is port 9100. At the very basic printing over port 9100 requires you to open a TCP connection to the printer’s port 9100, push some text, then close the connection.

For a presentation at Microsoft I wanted to end on a fun note and provide some printing trivia. My online searches for information related to port 9100 and printing through said port turned up sparse. The only reason I knew anything about port 9100 was from pouring over Foomatic’s driver metadata database two summers ago. I think this method might also be known as JetDirect or Direct Print. WIkipedia’s only obvious mention is the port’s official registration as “PDL Data Stream”.

As the official port registration implies that text I mentioned pushing to the printer can in fact have PDL instructions embed.

PDL stands for Page Description Language. This term is related to PCL which stands for Printer Command Language. PCL is not supposed to be a PDL since it allows for printer control. In theory this extra power should make PCL a member of the more general Printer Control Language group. Thus, in theory, when Wikipedia says “PDL Data Stream” the implication is that there is no control granted over the printer itself. In practice printers sometimes treat the PDL sent over port 9100 as commands. I think some HP printer firmware updates get sent this way. The net result has been various security bugs over the years.

The genius of port 9100 is in the pure reality that no other network printing protocol can be simpler. Even printing over UDP would complicate the process by requiring a END_OF_PRINT_JOB instruction. Instead port 9100 treats the TCP’s closure as the submit command.

You can try printing over port 9100 yourself by running from the command line:

$ netcat PRINTER_IP 9100
$ Hello World
$ <Ctrl+c>

Hope that helped. I also hope I did not write anything too inaccurate.

Microsoft Internship days 13 to 19

Three weeks down and one fourth of the internship is complete. This week was less production than I hoped, it feels like everyday I had something to distract me. Still coding wise the week ended on a high point.

Day 13

Church was nice and only a 15 minute walk. Later in the day I went shopping. So far it appears one trip a week can last a good week with some surplus.

Day 14

Monday morning I double checked my bag for my paper work and bussed over to the Social Security Office. At the Social Security Office you have to take a ticket and wait. The wait took less than an hour and I was back on Mirosoft campus in time for the weekly Devices and Networking Team(DNT) lunch. It was nice to get the last of my immigration paper work done.

Day 15

Tuesday the 21st was the new Xbox’s announcement. I can say the true surprise of the morning was the name. Of all the the name rumours none had come close “Xbox One”. My favourite of these rumours had been the “Xbox Infinity”. The abrupt flip from innumerable to 1 was the event’s only present twist. I never intended to buy an Xbox but I expected at least one feature to make me envious.  Instead the entire device looks like Microsoft leveraging a successful product to capture another market. It looks like the bluechip Microsoft is winning against the “cool” Microsoft by trading in Microsoft’s coolest product for a DVR.

In all the monring felt like a waste. Three months after Sony’s Playstation 4 reveal I expected to see much more infromation. Microsoft could have saved us all time and posted a simple press release.

Days 16 & 17

These two work days were consumed with a Windows bootcamp for Interns. Two days of lectures which I am not sure were worth the time. All of the talks were interesting in some respect. Most had no applicability to this summer’s work but I assume were intended to give everyone a taste for the Windows organization as a whole. On the plus side I won a copy of Windows Internals the sixth edition.  Between the two large tomes there are no sections on printing.

IMG_20130525_131408

I am not sure I wanted these but I cannot give up a chance to win things. I waited until it was clear no one else was going to answer the question.

Afterwards I read Anandatech’s articles on AMD’s new CPUs. Since I will be investing again in a new PC after the internship I need to update my parts knowledge. A lot has changed since I built my workstation in 2009.

Day 18

Beyond a personal project and this blog post today will consist of catching up on anime. Between some shows from last season and this season’s best shows I have plenty to keep me entertained.

Update 2013-10: If you are still interested please consider reading through the overview of my internship.

Microsoft Internship days 2 to 12

Days 2 to 5

More computer setup and meetings. At one point I overwrote my main worksttion’s operating system with Hyper-v Server by mistake. I thought “Hyper-v Server” meant a server daemon or, in windows terms, a service, terms for programs which run forever. Instead it was a complete stand-alone operating system. This mistake meant reinstalling Windows 8 and every dev tool.

My commute consist of a 30 minute walk from the north west tip of microsoft campus to the south east corner. My japanese study fits perfect into this timeslot. Last semester there was no appropriate timeslot and study often got pushed so late that it delayed bedtime. Next year my university commute will require a 40 minute bus & train ride which will see similar use. So while I was annoyed at the prospect of losing 1,5 hours of the day this time should go to good use.

West side of Bellvue Meadows looking towards the pond

Starting my commute twenty steps outside my door. Bellevue Meadows is about a block long but exits across the street from Microsoft campus.

Bridge within microsoft campoous next to honeywell offices

Mid way through the commute I cross the highway along a bridge that looks nothing like a bridge. The bridge looks like a simple continuation of the other tree lined roads which make up Microsoft campus.

IMG_20130507_091846

It is only when walking across the bridge that the highway flowing underneath becomes visible.

Microsoft building 27

I have to be thankful that Redmond is not always overcast or raining because when it is not the sun paints everything beautiful. These buildings also serve as the end of my morning commute.

 

Days 6 & 7: the first full weekend

I got almost nothing done on saturday beyond catching up on missed anime.

Sunday me and david took the B line bus to walmart. We stuffed both backpacks and two oversized grocery bags with household items and food. The MEC backpack my dad helped select saved my back for the second time. The first time I overloaded it being the first monday, also with groceries. This shopping trip the bag held every heavy item we bought and kept the weight off my shoulders.

Days 7 to 12

At some point this week it rained in Seattl. I do not remember which day but the rain was light. Compared to Calgary rain which either does not exist or comes as a downpour this week’s rain was a drizzle. A few days were overcast but nothing worth wearing my coat for.

Overcast view from my office

Overcast view from my office

On the 21st, the 15th day on my internship, Microsoft will announce the new Xbox. Even within Microsoft all developers who might know anything have been sealed off into special buildings. In preparation for the event Microsoft has built a tent over the main soccer field. The soccer field itself is in the middle of Microsoft’s new Studio buildings. It is within these buildings that Microsoft is developing the Xbox. While I do not plan to purchase an xbox I am exited at the prospect of a new hardware generation. Rumors also purport that my favorite game maker will announce the next version of my favorite game, Fallout 4. As time ticks down I am hoping Microsoft will provide an internal video stream or maybe even an employee event.

Microsoft xbox announcement tent

Future site of the xbox announcement. Photo taken 8 days before the announcement.

So far I am making an effort to attend every possible meeting but this does mean little besides meetings occurs on fridays. The meetings tend to end on time and stay on topic so they are at the least predictable. In every meeting there was a well defined goal and the meeting organizer always kept  discussion on topic. If you must have meetings then this is the way to do so.

The big event this summer is a contest sponsored by Microsoft’s Phone division  This contest, Apphack 2013, is about developing “innovative” applications for windows phone 8. Before the judging rules were post David and I were going to create a html5 platformed  We recruited another intern David met, Jay. The three of us were pretty excited until the judging rules got posted. While the rules do not forbid using html5 which was one of my worries, they do specify a scoring criteria which leaves our platformer no room for victory, Today, the 11th day, we are meeting to discuss our options  Either developing our platformer, switching to a more “innovative” idea, or working together on an unrelated idea.

This second week occured fast. I feel more comfortable with the software and my summer project has been decided on. On Friday, day 11, I borrowed a printer and started writing a simple stress testing program. All small steps towards my projects but it feels nice to be making measurable progress.

Microsoft intern 2013 office

My office as of Friday of second week.

Update 2013-10: If you are still interested please consider reading through the overview of my internship.

Intern at Microsoft day #1

New Employee Orientation day! Me and David woke up early at 7:00 and finished Sunday’s supply of instant ramen. We left the house at 8:40 after I convinced him that would be plenty of time to make it to the Microsoft Visitors Center by 9:30.

Since neither of us checked the building’s location before leaving I was very wrong. We went two blocks too far south. We asked the desk at one of the buildings, south of the Microsoft studios, for directions and they gave us an updated map. Every other map I had seen prior was missing the new Microsoft game studios and the Commons Cafeteria. I have since lost this awesome map otherwise I would post it.

The orientation itself assisted us through about 3 sheets of dense legal forms. I messed up and wrote my birthday under this current year (2013) and a Microsoft lawyer even caught the mistake then and there.

After orientation, or NEO in microsoft speak, we headed off to our team’s office’s,  but not before we all got free launch and a t-shirt.

IMG_20130514_233018

This makes three Microsoft t-shirts!

Upon arrival my team was in a bi-weekly trio meeting. A trio meeting is when test, dev, and project management gets together and checks on progress. Since I am in Sustained Engineering progress means bugs. Of course we are now getting into NDA territory. All I can say is that there were indeed bugs, and that progress was being made on fixing unsaid bugs.

I spent the next day or two, or three, configuring my workstation and reading. A major portion of this amounted to acquiring source files and building. On one hand I miss Linux’s tradition of everything using make files. On the other hand building Windows means building what would amount to a full distro in the linux world. Compared to the distros’ build farms Microsoft has developed a convenient build process.

The view from my temporary office. A recent re-organization left open an office right between my mentor and our boss.

The view from my temporary office. A recent re-organization left open an office right between my mentor and our boss. I may move before the summer is over.

microsoft_internet_speedtest

My roommate, David, ran the same test so I know I cannot be alone in this curiosity.

IMG_20130506_183506

Microsoft’s free pop will either cure my suger habit or cure my healthy BMI. This first day I went overboard but I have since been drinking more tea. I am not alone with the tea; this floor of the building alone is consuming about half a box of green tea bags per week.

Update 2013-10: If you are still interested please consider reading through the overview of my internship.

Invasion of Nintendo America’s campus

On the Sunday of arrival I and my roommate David went to 7-eleven for essential food supplies. We took a detour on the way and invaded the Nintendo of America campus. Visits into the buildings are only possible with an employee guide so this is the closest we will be getting this summer.

We did not find much. Beyond various signs the campus bore no markings of Nintendo. I was hoping for maybe a Mario statue but there was not even an occasional plushie on a window sill.

The lone Wii. No Wii Fitness boards were seen.

Look! We found a nintendo sign! Or atleast maybe, the sign lacked the critical border around the logotype. We can only assume this was not a Genuine Seal Nintendo sign.

Update 2013-10: If you are still interested please consider reading through the overview of my internship.