LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-12-2010, 10:14 PM   #16
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546

Hey Green Zebra!

Thanks for trying! I compiled your code and ran the program as you instructed. No luck. Running xev showed the top row of function keys had not been modified.

The 14 byte data file is nothing more than ASCII characters:

QNNNNSYNNNNACF

I have the old Northgate configuration utility in a virtual machine. I grabbed a screen shot. You can see the utility screen here. The 14 byte character string matches the utility options.

The one configuration I am interested is located in the first column, bottom: Set Special Functions Keys S, which configures the top row of function keys as Shift-Fn keys. Sixth character in the 14-byte data file.

On a whim I reversed the order of the characters but that did not help either.

I also checked the data file on an older computer and the data file uses Unix line feeds and not DOS.

Based upon your usage of using /dev/port, I started reading the IO-Port-Programming FAQ. I think I follow the basics of your little program, but am unable to troubleshoot further.

I ran strace and as far as I can tell, the program is reading the data file and writing to /dev/port.

If you're still around to see this response, please let me know whether there is anything that can be done to improve the situation.

So close!

Last edited by Woodsman; 08-12-2010 at 11:52 PM.
 
Old 08-24-2010, 07:25 PM   #17
Hidden Windshield
Member
 
Registered: Jul 2010
Distribution: Fedora
Posts: 68

Rep: Reputation: 27
Sorry it took so long to reply, been busy.

Based on what you've said, it looks like the "data file" is in fact just a configuration for the program itself, and doesn't have anything to do with the actual data sent to the keyboard. In other words, the first "Q" in the data file causes the "SET Keyboard Layout" option in the program to be "Q - Qwerty" and nothing else. When you hit "F1", the program itself generates whatever commands are needed to actually change the layout to Qwerty, and sends them to the keyboard.

This means that the problem is not with the code, but in actually figuring out the correct sequence of bytes to send. There are only three ways that I know of to do that:
  1. Capture the output of the utility. This seems to be the best bet, if you can find a way to do it (maybe with a virtual machine).
  2. Disassemble the utility. I've tried several different debuggers/disassemblers just for kicks, and it seems that the 16-bit MS-DOS format is just too old for modern tools to recognize, but if you can find one that works, go for it.
  3. Try every possible sequence of bytes until you find something that works. Guaranteed to work eventually, but may take longer than your lifespan. (And, no, that's not an exaggeration.)

Wish I could be of more help.
 
Old 08-29-2010, 04:03 PM   #18
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
This means that the problem is not with the code, but in actually figuring out the correct sequence of bytes to send.
Now that you provided that simple insight, sure makes sense!

Quote:
Capture the output of the utility. This seems to be the best bet, if you can find a way to do it (maybe with a virtual machine).
A couple of my old machines still have DOS/WFWG installed with the original Northgate utility. I can run the utility, but I need to know a way to capture the stream. A virtual machine might help (I use VirtualBox), but again I need to know where to monitor.

If I could capture the stream, I really don't care about the utility itself or even imitating the utility. I could just send the actual captured data stream, if I knew where to send the packet.

I have several copies of the original user manual, which contains a barely readable schematic of the keyboard.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Major problems with the keyboard! Microsoft keyboard is not compatable?. aweir14150 Mandriva 2 05-26-2006 06:57 AM
usb keyboard and soundcard conflict (sound set to keyboard?) netsurf Linux - Hardware 2 04-09-2005 07:08 AM
Need help ACPI "sonypi" module Programmable Interrupt Controller Soobwrex Linux - Newbie 1 02-18-2005 02:59 PM
keyboard problems with xfce4 - general keyboard question Villain Linux - General 2 06-20-2004 04:35 PM
Programmable Interval Timers saintt Linux - General 0 10-19-2001 08:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration