Parallel port programming for a Sun Ultra 5 running Solaris 8

Hi I'm trying to look for information about reading/writing to the parallel port of a Sun Ultra 5 running Solaris 8. I'd just like to see some basic programs written in C, nothing fancy, just reading and wrting to the port, getting the port address etc. toggling the lines.
I've tried searching for this information and there is plenty of information about PC parallel port programming with windows or Linux. But there seems to be little for Sun's
I've tried doing 'man ecpp' but that doesn't really give any clear example. What I need is an idiots guide.
I've tried searching this Forum and I see that other people have asked the same question before but no one has replied to them. Why is this?
Thanks if you can help.
fishman.

The key is gettting the port into diag mode. Here's a quickly little example that turns all the data pins on and then turns them off:
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stropts.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/ecppio.h>
int fd = 0;
// ecpp structures
ecpp_transfer_parms etp;
ecpp_regs eregs;
// returns -1 if error otherwise returns fd
int openoutput()
fd = open("/dev/ecpp0",O_RDWR);
if (fd==-1) { return -1; }
// default is 90
etp.write_timeout = 10;
// the big secret
etp.mode = ECPP_DIAG_MODE;
ioctl(fd,ECPPIOC_SETPARMS,&etp);
return fd;
unsigned char in()
unsigned char data;
// from the man pages
ioctl(fd,ECPPIOC_GETREGS,&eregs);
data = eregs.dsr;
return data;
void out( unsigned char data )
write(fd,&data,1);
int main( void )
int dummy;
openoutput();
//all data pins on
out( 255 );
scanf("%d", &dummy);
//all data pins off
out( 0 );
scanf("%d", &dummy);
close( fd );
return 0;
}

Similar Messages

  • Parallel Port Programming - Pls Help

    Sir / Madam,
    Greetings.
    We are new to writing parallel port programming. We have tried to execute a sample code.
      import parport.ParallelPort;
      class SimpleIO {
        public static void main ( String []args )
          ParallelPort lpt1 = new ParallelPort(0x378); // 0x378 is normally the base address for the LPT1 port
          int aByte;
          aByte = lpt1.read(); // read a byte from the port's STATUS pins
          System.out.println("Input from parallel port: " + aByte);
          aByte = aByte >> 2; // a simple and irrelevant operation
          lpt1.write(aByte); // write a byte to the port's DATA pins
          System.out.println("Output to port: " + aByte);
      }We get the following error:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x10001057, pid=2224, tid=2916
    # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing)
    # Problematic frame:
    # C [parport.dll+0x1057]
    We are new to this..
    Pls help us. We have connected a parallel port device already.
    Regards
    Rampalli

    This means there is a bug in the driver you are using.
    I would check you have the latest version of Java 5 or 6 and the latest version of the driver you are using.

  • Parallel Port Programming

    After series of trials and searching the forum i was able to get the commapi and install it. i want to design a simple program that can control circuits (i.e to on leds) . the problem is how to write a 1 or 0 bit to a particular pin. i saw different posts on this issue but still haven't got the real solution.
    i also got to know about parport api and have downloaded and istalled it. but when i run the SimpleIO.java that comes with the package i get this error:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_PRIV_INSTRUCTION occurred at PC=0x10001057
    Function=[Unknown.]
    Library=C:\Program Files\Java\j2re1.4.1_02\bin\parport.dll
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
    at parport.ParallelPort.readOneByte(Native Method)
    at parport.ParallelPort.read(ParallelPort.java:37)
    at SimpleIO.main(SimpleIO.java:8)
    plz i want to know what's the cause of this problem, really can't go further on my own and i know nothing on native interface.
    I would be grateful if i can achieve my objective without the parport also.
    How can i write bits to the parallel port plz???????????????
    Thanx in advance

    Why not communicate with the parallel port using the COMM API 2.0?

  • PICO DrDAQ USB Parallel Port setting for labview 8.2

    Hi,
    I have a PICO DrDAQ card (parallel port) and by using USB Parallel Port  (USB)connect to the laptop, and i already install this software. I can run DrDAQ with PicoScope(DrDAQ software) and can produce a result, but when i try to run it in LabVIEW 8.2 there's no result generated from it. Furthermore, i had check through the device manager (in My Computer=>System Properties) and prompt to see the Pico parallel port within the USB controllers. Therefore, i would like to know is there any setting i need to perform so that the problem can be solve.
    Thanks.

    Hi,
    Thanks for your reply. Ya before the driver installed, i specify the USB port for this device to used on and after that i set it to port 101 (for USB) in the LabVIEW.
    and the programming is on the attach file.
    thanks.
    Attachments:
    DrDAQ.vi ‏32 KB

  • Parallel port programming in java

    anyone please help me!!
    I have to send binary data(of numbers 1-255) to parallel port in 8 bit format.
    If you have code please send me or help me how to do so...

    One post is sufficient.
    Next time try "New to Java".
    Google ( [url http://www.google.com/search?q=java+rxtx+parallel+port]java rxtx parallel port )

  • What's a good file recovery program for a MacBook Pro running IS 10.7.5?

    Hey gang - I ordered a miniStack 4TB external hard drive from OWC a few months ago during a long overseas trip. I finally unwrapped it and started dumping data to the drive from the 1TB drives (also from OWC) I used via my MacBook Pro. I connected the 4TB to the laptop with FW800.
    I came back from the gym (gone about two hours) and saw a "the drive wasn't disconnected properly..." window. There was a clicking noise coming from the drive, which means mechanical failure.
    I went into Disk Utility and the drive is there but it's grayed out. I changed cables to USB 3.0. Unplugged the drive. Shut down the laptop. Then went through the start up and nadda.
    So before I run off a disk repair place in town and spend $1000, what's a good hard drive recovery program to use to pull the data? I only dumped 1.5TBs until the 4TB and have other drives to dump that data too if I need to.
    Thanks.
    Cheers,
    Bill.

    General File Recovery
    If you stop using the drive it's possible to recover deleted files that have not been overwritten by using recovery software such as Data Rescue II, File Salvage or TechTool Pro.  Each of the preceding come on bootable CDs to enable usage without risk of writing more data to the hard drive.  Two free alternatives are Disk Drill and TestDisk.  Look for them and demos at MacUpdate or CNET Downloads. Recovery software usually provide trial versions that enable you to determine if the software would help before actually paying for it. Beyond this or if the drive has completely failed, then you would need to send the drive to a recovery service, such as Data Recovery by DriveSavers, which is very expensive.
    The longer the hard drive remains in use and data are written to it, the greater the risk your deleted files will be overwritten.
    Also visit The XLab FAQs and read the FAQ on Data Recovery.

  • Programming for the Sun/Solaris env.

    I have been a VC++ developer for sometime now.
    I am investigating the viability of developing s/w for Solaris.
    Java seems a reasonable attempt at a development language , however I would like to know what is happening in the development world with C++/Solaris?
    Can any one tell me what c++ dev api's exist for Solaris?
    Any feedback would be appreciated.
    Thanks
    Andrew

    Having looked at your website I would value your
    opinion on the following matter regarding software
    development.
    In previous years Java has been critised on the basis
    of performance and I am concerned about this issue.Except for a few problem domains performance of any language is always superceded by the requirements and design of the system. In other words it does not matter what language you use. (Unfortunately there are still people who think that is not true.)
    >
    I have a couple of years experience as a contract c++
    developer on Microsoft and am considering moving my
    skill set to Solaris.
    Java seems a easy language to learn,has a thorough
    class library and seems to cater very well for
    internet development.
    Q1. Should one abandon c++ and use java for internet
    apps. No idea. It depends on what you want to do. If you like gui then java is probably a good bet. If you like device drivers then it is useless. If you like databases then forget both and start learning SQL.
    Keep in mind that small businesses employe most people. And small businesses are more likely to use windows. So if you like small shops then stick with windows. OS choice and language choice are two different things though.
    >
    Q2. What type of development do you think still
    warrants coding in c++?
    Many types. Device drivers. All embedded work (tvs, refrigerators, cars, etc.) OS kernels. Intensive number crunching. Encryption - any small problem domain were performance of the language can make a difference.
    There are still many shops that still only use C++. And they will continue to do so for new products. There is a vast amount of legacy code that must be maintained and added to. None of that is going to go away.

  • Comparable program for Adobe that will run on IPad?

    Is there an IPad app that takes the place of Adobe?

    There are many apps that are available that you can watch videos with on the iPad. Many of the major news networks and entertainment channels in the U.S. have their own iPad apps and they have lots and lots of content available with these apps.
    CNN, FOX News, CBS News, USA Today, PBS, Discovery, ABC, NBC, TNT, TBS, HBO Go all have apps that allow you to watch news videos, weekly TV shows and other video content. All of the nfl.com content can be viewed on the iPad. ESPN has a couple of apps that show virtually of their videos as well. CBS Pro Football, ESPN Score Center XL.
    There are many ways to watch lots of video content on the iPad and the iPad also has the built in YouTube app.

  • How to install iPlanet Administrative Server while installing iPlanet Web Server Ver 6.0 Service Pack 3 in SUN Ultra 10,Solaris 5.8

    We are the partner of Sun Developer Connection Program.
    Company: ITI Ltd.
    Member no: 1024878
    We tried to install iPlanet Web Server ver 6.0
    Service Pack 3, in Sun Ultra10 Solaris 5.8 machine.
    During the time of installation it is giving Error:
    Failure installing iPlanet Administration Server
    Do you want to continue? if Yes
    it starts poceeding with the installation and again gives an Error:
    Failure installing Core Java Classes.
    Do you want to continue? if Yes
    It completes the installation.
    But startconsole cannot be executed.
    Please send the solution.

    May I ask where did you get the bits for iWS 6.0 SP3? The latest version currently available for download is iWS 6.0 SP2.
    http://wwws.sun.com/software/download/download/
    Thanks

  • Is it OK for hobbyist users to run Solaris 10 w/o a support contract?

    There's been a lot of talk recently about changes to licensing polices regarding Solaris 10 and I just had a quick question: what does this mean for those of us who are primarily hobbyists and not using the system in a commercial context. I know that hobbyist users are "supposed" to use OpenSolaris, but Solaris 10 has some cool legacy stuff like XSun (AFAIK the only X server around that still has Display PostScript, which I need to display some antique apps and games that I've got running on my SIMH VAX system) and CDE (outdated, but still somehow cool) in it that I just can't get in OSOL. Does anybody know if the new licensing restrictions are only for commercial users or if they mean that folks like my have to scrounge for new solutions for our nerdy hobbies?

    There's been a lot of talk recently about changes to licensing polices regarding Solaris 10 and I just had a quick question: what does this mean for those of us who are primarily hobbyists and not using the system in a commercial context. I know that hobbyist users are "supposed" to use OpenSolaris, but Solaris 10 has some cool legacy stuff like XSun (AFAIK the only X server around that still has Display PostScript, which I need to display some antique apps and games that I've got running on my SIMH VAX system) and CDE (outdated, but still somehow cool) in it that I just can't get in OSOL. Does anybody know if the new licensing restrictions are only for commercial users or if they mean that folks like my have to scrounge for new solutions for our nerdy hobbies?

  • I cann't telnet to Sun v100 running Solaris 8

    Hello,
    I tried login to WebServer (Sun v100, Solaris 8). I could not telnet to it. I don't know what cause the problem. I installed the WebServer6.1 into it (sun v100 Box). However, I need to access to the Box in order to turn the WebServer 6.1 on or off. Do you know where should I look for it? I cannot ping it on the dos command because it is not response. Any thought would be greatly appreciated.
    Madison Le

    It may work out the box - however, do you really want to be in the position where if it stops working you have no-one to call?
    Don't underestimate the "this isn't supported" statement.

  • Donwloading right OS for Sun Ultra 40 M2

    Please help I will appreciate your help, I am trying to download the OS Solaris on the web for a Sun Ultra 40 M2 workstation machine. Please some one guide me the steps by step or path to download it. My problem I don't understand what to select the Sparks or 64/32. On the manual it says it is a x64 but when I type the uname -X command I get Machine = i86pc, Release =5.10, Generic_118855-33. I am wondering if this machine was installed right way.

    x64:
    x = x86-based processor which = i86pc Machine
    64=64-bit OS
    http://sunsolve.sun.com/handbook_pub/validateUser.do?target=Systems/Ultra40_M2/Ultra40_M2
    http://www.sun.com/software/solaris/get.jsp
    http://www.sun.com/software/solaris/self_help.jsp
    http://www.sun.com/software/solaris/download_instruction.xml

  • RXTX Parallel port communication with Pin Printer

    I have successfully installed and configured RXTX-2.0-7pre1 on Linux platform.
    2 printers, one Laser jet printer connected to the Serial port and the other Pin Printer connected to the Parallel port.
    I can print my files out successfully with RXTX on both my 2 printers. But, there is some problem with my Pin Printer performance. The print job is a little slow and the printing is word by word output.
    While the Laser printer received the whole string of my RXTX output and printed them out asap.
    RXTX read my data and write them to the Parallel/Serial port directly, so, for my laser jet printer, it buffered the RXTX output data and processed them all in one. No problem, laser printer works well. But to the Pin Printer, it got the RXTX output and printed them out with no buffer. I am not authorized to deal with the Pin Printer device driver.
    So, my question is that, is there someone knows how to resolve this problem on RXTX side? That is to say, how to modify the source code of RXTX and customize it?
    I wanna know how to create buffer in RXTX, for example, buffering a whole string line and then sending them to the Parallel port. Then, It supposed to be that the Pin Printer will receive once a whole line output and printing line by line in the paper! Not the problemly slowly word by word output!
    Thanks a lot!

    Simple metrics from google should suffice the SUN team from understand the need/huge requirement for supporting Serial and parallel port programming in windows. Platforms would always change and the team at SUN should remain commited in supporting new platforms.

  • K9N2G Neo (MS-7511) Parallel port interrupt

    Hi All,
    I'd like to use the onboard parallel port of the K9N2G Neo (MS-7511) for a custom designed instrument. This equipment generates parallel port interrupts thus I need to run this port in IRQ driven mode. On older mobo-s BIOS usually have an IO address + IRQ setting for onboard parport, now I can only find an IO address. Any idea?
    Thanks
    Gabor

    We don't know, you have to ask MSI ->>>How to contact MSI.<<

  • Can I buy a usb dongle to replace my parallel port dongal

    Can I buy a usb dongle to replace my parallel port dongal for my Multisim 2001 product?

    Hello,
    Unfortunately those dongles are not available anymore.
    Regards,
    Fernando D.
    National Instruments

Maybe you are looking for

  • Diagnostic doesn't work properly

    Hi all, we have a problem with the diagnostic. Both locally and remotely the diagnostic tool seems to write the diagnostic information only when "it wants" (sometime it does it, sometimes doesn't). Here our configuration file: ServiceDefinition.csdef

  • OS X Mavericks Server.app doesn't show site, but default Welcome to OS X Server page

    I am completely new to Mac OS X Server.app, so sorry if I sound dumb . 1. I installed Server.app to Mavericks. 2. Enabled Websites service in it. 3. Installed MySql. 4. Installed Wordpress using this script: https://github.com/MacMiniVault/Mac-Script

  • Can anyone help me cut a word into an image?

    I believe it is called merge?? I am new to illustrator and am working on learning new tricks,  I have come to a road block here.   Here is a set up: I have font image with a tail connected to the font,  Inside the tail i have another font that i want

  • I am unable to connect to the Adobe Servers? All info is current and I have internet connection

    I keep receive this error message when I try to open any InDesign files: "We're sorry, but we're not able to connect to the Adobe Server right now. Please click here to troubleshoot any connectivity problems. If this problem persists please contact C

  • CRASH-report : I cant Save my Site on my PC

    Dear support! i created a site - but i cant save it on my PC - EVERY time ( not sometimes , it happens EVERY time) when i try to save site , Muse shows me this error and closes. When Muse is opened next time it reopened this site from the place when