Accessing serial port on Arm platform

I need to read and write on the serial ports of an ARM platform with a Java application, running a cross-compiled JVM.
I considered both solutions java COMMAPI and JNI, but the problem is the same: I haven't library to support them: libLinuxSerialParallel.so, to support COMMAPI, or libnativelib.so, to implement native methods for JNI.
How can I have this library for my ARM architecture? Is it possible to cross-compile sources for it?
Thanks in advance.
regards.

Hello,
I have a igep boar with arm core.
I am trying to access to serial port through java.
I am using rxtx (gnu.io) http://rxtx.qbang.org.
I dowloaded the api for arm architecture (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/glibc-2.3.5/), but there is a problem with dependencies with glib.
This is the error when i try to call from java:
java.lang.UnsatisfiedLinkError: /home/jdoe/equinox-SDK-3.5.2/plugins/configuration/org.eclipse.osgi/bundles/2/1/.cp/librxtxSerial.so: /lib/vfp/libpthread.so.0: version `GLIBC_2.0' not found (required by /home/jdoe/equinox-SDK-3.5.2/plugins/configuration/org.eclipse.osgi/bundles/2/1/.cp/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver
I tested the librxtxSerial.so:
jdoe@ubuntu:~$ ldd librxtxSerial.so
./librxtxSerial.so: /lib/vfp/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so)
./librxtxSerial.so: /lib/vfp/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so)
./librxtxSerial.so: /lib/vfp/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so)
./librxtxSerial.so: /lib/vfp/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so)
libpthread.so.0 => /lib/vfp/libpthread.so.0 (0x40022000)
libc.so.6 => /lib/vfp/libc.so.6 (0x40041000)
/lib/ld-linux.so.3 (0x2a000000)
And this is my glic version:
jdoe@ubuntu:~$ ls -al /lib/libc*
-rwxr-xr-x 1 root root 1201672 2009-04-09 18:02 /lib/libc-2.9.so
lrwxrwxrwx 1 root root 14 2010-07-01 16:52 /lib/libcap.so.1 -> libcap.so.1.10
-rw-r--r-- 1 root root 13984 2008-11-14 02:47 /lib/libcap.so.1.10
lrwxrwxrwx 1 root root 14 2010-06-16 17:21 /lib/libcap.so.2 -> libcap.so.2.11
-rw-r--r-- 1 root root 13800 2008-11-17 06:14 /lib/libcap.so.2.11
-rw-r--r-- 1 root root 181816 2009-04-09 18:02 /lib/libcidn-2.9.so
lrwxrwxrwx 1 root root 14 2010-06-16 17:21 /lib/libcidn.so.1 -> libcidn-2.9.so
lrwxrwxrwx 1 root root 17 2010-06-16 17:21 /lib/libcom_err.so.2 -> libcom_err.so.2.1
-rw-r--r-- 1 root root 9648 2009-02-12 16:55 /lib/libcom_err.so.2.1
-rw-r--r-- 1 root root 38400 2009-04-09 18:02 /lib/libcrypt-2.9.so
-rw-r--r-- 1 root root 1210776 2009-04-04 03:06 /lib/libcrypto.so.0.9.8
lrwxrwxrwx 1 root root 15 2010-06-16 17:21 /lib/libcrypt.so.1 -> libcrypt-2.9.so
lrwxrwxrwx 1 root root 11 2010-06-16 17:21 /lib/libc.so.6 -> libc-2.9.so
What should I do?

Similar Messages

  • Can air for html/ajax accessing serial port or usb?

    I just have made use of Adobe AIR .I want to use printer with
    air . Do air have some poperties to accessing serial port or usb?
    I look up that on the Adobe AIR documents.I only found
    'Adobe® AIR™ provides the eans to check for changes to
    the network connectivity of the computer on which an AIR
    application is installed'.
    Do you have some demo with Adobe AIR accessing serial port or
    usb ?
    Or has another poperties to do that!
    thank you!!

    There is no API for accessing the serial port. USB devices
    can only be accessed through the file system (and only if they are
    storage devices).

  • Access Oracle database on ARM platform

    Hi
    I am trying to access Oracle database on ARM platform.
    Is anyone has experience about that?
    It seems that the instance client has no ARM version.
    Thanks for any suggestion.

    Pro*C and oci are cool but I recomend the Oracle Template Library.
    It is much simpler and easier to use.
    It is just one .h file which includes a set of classes which are a thin wraper over oci.
    Try it, you don't know what you are missing.
    (That goes for the oci and pro*c advocates too :)
    http://www.geocities.com/skuchin/otl/home.htm
    null

  • Pse help. K7T66Pro2 cannot access serial ports in DOS window

    My K7T266Pro2 won't access serial ports in a DOS window under Windows 98SE.
    Windows programs can access the ports but no DOS programs - including my modem program, banking program, Tapcis Compuserve program and MDMDR a serial port diagnostic program.
    I have tried both setting the ports in BIOS to AUTO
    and forcing the standard values for com1 and 2
    and I have verified that the serial ports are set for:
    com1 irq 4 i/o 3f8
    com2 irq 3 i/o 2f8
    I know my way around serial ports.
    Every other motherboard I have used under Windows 98SE has had no problems accessing the serial ports
    under DOS.
    I asked my dealer to try another K7T motherboard.  He loaded Windows 98SE and could not access the serial
    port in a DOS window either.
    Is this something funny about K7T boards?
    Do others have this problem?
    This is a quite urgent problem.  Please help.
    Larry Alkoff

    Larry,
    You posted in the nVidia/AMD/SiS Forum instead of the Via Forum. I have moved you to the correct forum.
    Good Luck,
    Richard

  • Help - K7T266Pro2 won't access serial ports in DOS window

    My K7T266Pro2 won't access serial ports in a DOS window under Windows 98SE.
    Windows programs can access the ports but no DOS programs - including my modem program, banking program, Tapcis Compuserve program and MDMDR a serial port diagnostic program.
    I have tried both setting the ports in BIOS to AUTO
    and forcing the standard values for com1 and 2
    and I have verified that the serial ports are set for:
    com1 irq 4 i/o 3f8
    com2 irq 3 i/o 2f8
    I know my way around serial ports.
    Every other motherboard I have used under Windows 98SE has had no problems accessing the serial ports
    under DOS.
    I asked my dealer to try another K7T motherboard.  He loaded Windows 98SE and could not access the serial
    port in a DOS window either.
    Is this something funny about K7T boards?
    Do others have this problem?
    This is a quite urgent problem.  Please help.
    Larry Alkoff

    Larry,
    You posted in the nVidia/AMD/SiS Forum instead of the Via Forum. I have moved you to the correct forum.
    Good Luck,
    Richard

  • Access serial port through AIR

    isnt there any extensions or API buit for accessing serial
    port from AIR.
    i am designing a vending machile applicaton in which a coin
    drop is detected and corresponding images or message is displayed.
    MDM Zinc 3.0 allows serial port access but worths more than
    what it deserves. does AIR has some similar functionality.
    Any help.

    I'm not too hot on this subject, but would it not be possible
    to use Binary Sockets to connect to another app on the machine that
    could connect to a serial port?

  • Can not access serial port while upgrading from LabVIEW 6.1 to 7.0

    Hi,
    I built an application under LabVIEW 6.0.2. few years ago. This application uses LabVIEW serial features. When I upgraded to LabVIEW 6.1, my application was still working correctly.
    Today, I upgraded to LabVIEW 7.0, mass compile all VIs and now my application can not communicate with my peripheral !!!
    The program is sending the command to the peripheral. The peripheral answers but LabVIEW serial driver does not see any datas on buffer even if datas are available ... "Bytes At serial port.vi" always returns 0. I am sure that datas are available, using a COM port psy.
    Does anyone has an idea?
    I saw a lot of solutions in the forum, but I would like to know the best solution with minimum work, te
    st, and so on ... on my program.
    Regards,
    Pascal.

    Hi Pascal,
    Which is your version of NI-VISA?
    Please see the link bellow :
    http://digital.ni.com/manuals.nsf/websearch/E8D86CD680B0753D86256D2C005D8EA0
    The first test to be made is to test the communication with your serial port using MAX (Measurement and Automation Explorer) :
    Open MAX, Go to "Devices and Interfaces", then "Ports", select COM1 (or ASRL1::INSTR). Right clic on it and select "Open VISA Session" the go the "Basic I/O" then Write data, execute, Read data, execute.
    Be sure that the communication is OK. Be sure that you use the same Alias existing in MAX in your LabVIEW program.
    Now, if all is OK, try to use Serial communication examples existing in LabVIEW Help>>Examples Finder. These examples use NI-VISA VIs.
    If all above is OK and you
    still have the same problem, try to follow these instructions :
    "In order to use the old Serial Compatibility VIs in LabVIEW 7.x, you must copy the following files from a previous version of LabVIEW to the LabVIEW 7.x directory:
    Replace the serial.llb in LabVIEW 7.x with the serial.llb from a previous version of LabVIEW. This file is found in C:\Program Files\National Instruments\LabVIEW\vi.lib\instr.
    Replace the _sersup.llb file in LabVIEW 7.x with the _sersup.llb from a previous version of LabVIEW. In LabVIEW 6i and 6.1 this file is located in C:\Program Files\National Instruments\LabVIEW\vi.lib\platform. In LabVIEW 7.x (and 5.x) this file is found in C:\Program Files\National Instruments\LabVIEW\vi.lib\instr.
    Copy the file serpdrv to the C:\Program Files\National Instruments\LabVIEW 7.x directory. This file is not installed with LabVIEW 7.x, so it only needs to be copied from a previous version of LabVIEW, not replaced."
    I hope that my answer will help you.
    Sa
    naa T
    National Instruments

  • How to access serial port using servlet

    I want to communicate with a microcontroller connected to the serial port of my computer.
    *I am using the following:
    Windows 98 operating system
    Tomcat web server 4.1
    *The directory structure is as given:
    Tomcat 4.1/webapps/myjsp/web-inf/classes/remoteservlets.
    I have placed my jsp files in my jsp folder and classfiles in remote servlets folder.
    **my java program has compiled correctly.**
    ** my simple java application which accesses the serial port works fine.***
    *when I start tomcat I am able to access the sevlet as the servlet responds with the button name i have pressed.
    **** I have also tried the following
    Copied file comm.jar in <JAVA_HOME>\jre\lib\ext
    Copied file javax.comm.properties in <JAVA_HOME>\jre\lib
    Copied file win32com.dll in <JAVA_HOME>\lib and also in c:\windows\system32 and c:\windows\system
    ***************which helped me do away with errors.
    still I don't get any output. I dont get any errors either.
    PLEASE HELP. URGENT. i am at my wits end.
    Thank you.

    Servlet is the one which runs in the server side...if u want to comunicate with the serial port of the server in which ur servlet is running can be done but making use of Communication api available....
    U can download the Api from http://java.sun.com/products/javacomm/index.jsp
    There are three levels of classes in the Java communications API:
    High-level classes like CommPortIdentifier and CommPort manage access and ownership of communication ports.
    Low-level classes like SerialPort and ParallelPort provide an interface to physical communications ports. The current release of the Java communications API enables access to serial (RS-232) and parallel (IEEE 1284) ports.
    Driver-level classes provide an interface between the low-level classes and the underlying operating system. Driver-level classes are part of the implementation but not the Java communications API. They should not be used by application programmers.
    regards
    shanu

  • I'm unable to access Serial Port

    I have written following code but I m getting NullPointerException on line 13 of this code, please solve my problem and identify error.
    In this code I have used chaeron api which is available at www.chaeron.com
    import com.chaeron.GPS.NMEA.*;
    import com.chaeron.GPS.*;
    import com.chaeron.platform.SerialPort;
    public class MyGPS1 //extends NMEAGPSImpl
         public static void main(String st[]) throws Exception
              SerialPort sp = null;
              NMEAGPSImpl gps = new NMEAGPSImpl();
              sp = gps.getSerialPort();//returning null
              if(sp.isOpen())
                   gps.setSerialPort(2);
                   gps.connect();
              System.out.println(sp.isOpen());//error on this line

    generally serial port problems stem from incorrect installation of the javax.comm package: does the serial demo work? It's hard to say what the problem is without knowing anything about the gps object.

  • Problem in Accessing serial port using java comm Api

    I have installed java comm Api in my pc.
    i have gone through the instalation instruction which comes on this package.
    I have done the instalation like this
    Copy win32com.dll to my <JDK>\bin directory.
    Copy comm.jar to my <JDK>\lib directory.
    Copy javax.comm.properties to my <JDK>\lib directory.
    and restart the system.
    But when i run the BlackBox , it is giving me message
    "serial port not found".
    Can any one tell me , what is the exact problem ?

    I'm not sure what you mean by BlackBox, but I have used the COMM api extensively.
    The majority of problems is that the api cannot see the serial port (which is what you are describing) and this is caused by incorrect placing of the javax.comm.properties file.
    As well as <JDK>\lib, try putting it into <JRE>\lib as well. That has often solved problems on my setup.

  • How to access the serial port on sdk 3.1.3 ?

    Hi all,
    I know that accessing serial port is not possible on firmware 2.x for non jailbroken iPhones.
    But what about firmware 3.0?
    Apple has focused firmware 3.0 on accessories, through bluetooth or through serial port. So, accessing serial port should be possible.
    But I can't find any documentation / sample code for that.
    Would you please help me?
    Regards,
    Alx
    PS: I tried to read the port /dev/cu.iap and get this message:
    Error opening serial port /dev/cu.iap - Permission denied(13).
    Looks bad.

    Yes I am enregistred in the Mad For iPod program?
    And I try to communique with my accessorie
    So the Code
    +*// SerialPortsModuleAppDelegate.m*+
    +*// SerialPortsModule*+
    +*// Created by BPO iMac on 08/02/10.*+
    +*// Copyright _MyCompanyName_ 2010. All rights reserved.*+
    +*#import "SerialPortsModuleAppDelegate.h"*+
    +*#import <fcntl.h>*+
    +*@implementation SerialPortsModuleAppDelegate*+
    +*@synthesize window;*+
    +*- (void)applicationDidFinishLaunching:(UIApplication *)application {*+
    +*// Override point for customization after application launch*+
    +*[window makeKeyAndVisible];*+
    +* portSerie = [SerialManager alloc];*+
    +* [portSerie init];*+
    +* int nb_port;*+
    +* nb_port = [portSerie findRS232Ports];*+
    +* NSString path_port;+
    +* path_port = [NSString alloc];*+
    +* int num_port;*+
    +* if(nb_port!=0)*+
    +* {*+
    +* num_port=0;*+
    +* path_port=[portSerie pathAtIndex:num_port];*+
    +* int resultat= [portSerie openInput:path_port baudrate:9600 bits:8 parity:0 stopbits:1 flags:O_RDONLY];*+
    +* if(resultat==-1)*+
    +* {*+
    +* NSLog(@"Communication Error");*+
    +* }*+
    +* resultat= [portSerie openOutput:path_port baudrate:9600 bits:8 parity:0 stopbits:1];*+
    +* if(resultat==-1)*+
    +* {*+
    +* NSLog(@"Communication Error");*+
    +* }*+
    +* }*+
    +* [path_port release];*+
    +* *+
    +*- (void)dealloc {*+
    +*[window release];*+
    +*[super dealloc];*+
    @end
    +*// SerialPortsModuleAppDelegate.h*+
    +*// SerialPortsModule*+
    +*// Created by BPO iMac on 08/02/10.*+
    +*// Copyright _MyCompanyName_ 2010. All rights reserved.*+
    +*#import <UIKit/UIKit.h>*+
    +*#import "SerialManager.h"*+
    +*@interface SerialPortsModuleAppDelegate : NSObject <UIApplicationDelegate> {*+
    +*UIWindow window;+
    +* SerialManager portSerie;+
    +*@property (nonatomic, retain) IBOutlet UIWindow window;+
    @end
    +*// SerialManager.m*+
    +*// K3 Tools*+
    +*// Created by Kok Chen on 4/28/09.*+
    +*// Copyright 2009 Kok Chen, W7AY. All rights reserved.*+
    +*#import "SerialManager.h"*+
    +*#include <unistd.h>*+
    +*#include <termios.h>*+
    +*#include <sys/ioctl.h>*+
    +*#include <IOKit/IOKitLib.h>*+
    +*#include <IOKit/serial/IOSerialKeys.h>*+
    +*#import <fcntl.h>*+
    +*#import <UIKit/UIKit.h>*+
    +*@implementation SerialManager*+
    +*- (id)init*+
    +* self = [ super init ] ;*+
    +* if ( self ) {*+
    +* termiosBits = -1 ;*+
    +* inputfd = outputfd = -1 ;*+
    +* useTermiosThread = NO ;*+
    +* needsNotification = NO ;*+
    +* termioLock = [ [ NSLock alloc ] init ] ;*+
    +* }*+
    +* return self ;*+
    +*static int findPorts( CFStringRef *stream, CFStringRef *path, int maxDevice, CFStringRef type )*+
    +*kernreturnt kernResult ;*+
    +*machportt masterPort ;*+
    +* ioiteratort serialPortIterator ;*+
    +* ioobjectt modemService ;*+
    +*CFMutableDictionaryRef classesToMatch ;*+
    +* CFStringRef cfString ;*+
    +* int count ;*+
    +*kernResult = IOMasterPort( MACHPORTNULL, &masterPort ) ;*+
    +*if ( kernResult != KERN_SUCCESS ) return 0 ;*+
    +* *+
    +*classesToMatch = IOServiceMatching( kIOSerialBSDServiceValue ) ;*+
    +*if ( classesToMatch == NULL ) return 0 ;*+
    +* *+
    +* // get iterator for serial ports (including modems)*+
    +* CFDictionarySetValue( classesToMatch, CFSTR(kIOSerialBSDTypeKey), type ) ;*+
    +*kernResult = IOServiceGetMatchingServices( masterPort, classesToMatch, &serialPortIterator ) ;*+
    +* // walk through the iterator*+
    +* count = 0 ;*+
    +* while ( ( modemService = IOIteratorNext( serialPortIterator ) ) ) {*+
    +* if ( count >= maxDevice ) break ;*+
    +*cfString = IORegistryEntryCreateCFProperty( modemService, CFSTR(kIOTTYDeviceKey), kCFAllocatorDefault, 0 ) ;*+
    +*if ( cfString ) {*+
    +* stream[count] = cfString ;*+
    +* cfString = IORegistryEntryCreateCFProperty( modemService, CFSTR(kIOCalloutDeviceKey), kCFAllocatorDefault, 0 ) ;*+
    +* if ( cfString ) {*+
    +* path[count] = cfString ;*+
    +* count++ ;*+
    +* }*+
    +* }*+
    +*IOObjectRelease( modemService ) ;*+
    +* IOObjectRelease( serialPortIterator ) ;*+
    +* return count ;*+
    +*// return number of ports*+
    +*- (int)findPorts:(CFStringRef)type*+
    +* CFStringRef cstream[64], cpath[64] ;*+
    +* int i ;*+
    +* *+
    +* numberOfPorts = findPorts( cstream, cpath, 64, type ) ;*+
    +* for ( i = 0; i < numberOfPorts; i++ ) {*+
    +* stream = [ [ NSString stringWithString:(NSString*)cstream ] retain ] ;*+
    +* CFRelease( cstream ) ;*+
    +* path = [ [ NSString stringWithString:(NSString*)cpath ] retain ] ;*+
    +* CFRelease( cpath ) ;*+
    +* }*+
    +* return numberOfPorts ;*+
    +*- (int)findPorts*+
    +* return [ self findPorts:CFSTR( kIOSerialBSDAllTypes ) ] ;*+
    +*- (int)findModems*+
    +* return [ self findPorts:CFSTR( kIOSerialBSDModemType ) ] ;*+
    +*- (int)findRS232Ports*+
    +* return [ self findPorts:CFSTR( kIOSerialBSDRS232Type ) ] ;*+
    +*- (NSString)streamAtIndex:(int)n+
    +* if ( n < 0 || n >= numberOfPorts ) return nil ;*+
    +* return stream[n] ;*+
    +*- (NSString)pathAtIndex:(int)n+
    +* if ( n < 0 || n >= numberOfPorts ) return nil ;*+
    +* return path[n] ;*+
    +*// common function to open port and set up serial port parameters*+
    +*static int openPort( NSString *path, int speed, int bits, int parity, int stops, int openFlags, Boolean input )*+
    +* int fd, cflag ;*+
    +* struct termios termattr ;*+
    +* *+
    +* fd = open( [ path cStringUsingEncoding:NSASCIIStringEncoding], openFlags ) ;*+
    +* if ( fd < 0 ) return -1 ;*+
    +* *+
    +* // build other flags*+
    +* cflag = 0 ;*+
    +* cflag |= ( bits == 7 ) ? CS7 : CS8 ; // bits*+
    +* if ( parity != 0 ) {*+
    +* cflag |= PARENB ; // parity*+
    +* if ( parity == 1 ) cflag |= PARODD ;*+
    +* }*+
    +* if ( stops > 1 ) cflag |= CSTOPB ;*+
    +* *+
    +* // merge flags into termios attributes*+
    +* tcgetattr( fd, &termattr ) ;*+
    +* termattr.c_cflag &= ~( CSIZE | PARENB | PARODD | CSTOPB ) ; // clear all bits and merge in our selection*+
    +* termattr.c_cflag |= cflag ;*+
    +* *+
    +* // set speed, split speed not support on Mac OS X?*+
    +* cfsetispeed( &termattr, speed ) ;*+
    +* cfsetospeed( &termattr, speed ) ;*+
    +* // set termios*+
    +* tcsetattr( fd, TCSANOW, &termattr ) ;*+
    +* return fd ;*+
    +*- (int)openInput:(NSString*)pathname baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops flags:(int)openFlags*+
    +* return ( inputfd = openPort( pathname, speed, bits, parity, stops, openFlags, YES ) ) ;*+
    +*- (int)openInput:(NSString*)pathname baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops*+
    +* return ( inputfd = openPort( pathname, speed, bits, parity, stops, ( O_RDONLY | O_NOCTTY | O_NDELAY ), YES ) ) ;*+
    +*- (int)openOutput:(NSString*)pathname baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops flags:(int)openFlags*+
    +* return ( outputfd = openPort( pathname, speed, bits, parity, stops, openFlags, NO ) ) ;*+
    +*- (int)openOutput:(NSString*)pathname baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops*+
    +* return ( outputfd = openPort( pathname, speed, bits, parity, stops, ( O_WRONLY | O_NOCTTY | O_NDELAY ), NO ) ) ;*+
    +*- (void)closeInput*+
    +* if ( inputfd > 0 ) close( inputfd ) ;*+
    +*- (void)closeOutput*+
    +* if ( outputfd > 0 ) close( outputfd ) ;*+
    +*- (int)inputFileDescriptor*+
    +* return inputfd ;*+
    +*- (int)outputFileDescriptor*+
    +* return outputfd ;*+
    +*- (int)getTermios*+
    +* int bits ;*+
    +* *+
    +* if ( inputfd > 0 ) {*+
    +* [ termioLock lock ] ;*+
    +* ioctl( inputfd, TIOCMGET, &bits ) ;*+
    +* [ termioLock unlock ] ;*+
    +* return bits ;*+
    +* }*+
    +* return 0 ;*+
    +*- (void)setRTS:(Boolean)state*+
    +* int bits ;*+
    +* if ( inputfd > 0 ) {*+
    +* [ termioLock lock ] ;*+
    +* ioctl( inputfd, TIOCMGET, &bits ) ;*+
    +* if ( state ) bits |= TIOCM_RTS ; else bits &= ~( TIOCM_RTS ) ;*+
    +* ioctl( inputfd, TIOCMSET, &bits ) ;*+
    +* [ termioLock unlock ] ;*+
    +* }*+
    +*- (void)setDTR:(Boolean)state*+
    +* int bits ;*+
    +* if ( inputfd > 0 ) {*+
    +* [ termioLock lock ] ;*+
    +* ioctl( inputfd, TIOCMGET, &bits ) ;*+
    +* if ( state ) bits |= TIOCM_DTR ; else bits &= ~( TIOCM_DTR ) ;*+
    +* ioctl( inputfd, TIOCMSET, &bits ) ;*+
    +* [ termioLock unlock ] ;*+
    +* }*+
    +*// IO Notifications*+
    +*// prototype for delegate*+
    +*- (void)port:(NSString*)name added:(Boolean)added*+
    +* if ( delegate && [ delegate respondsToSelector:@selector(port:added:) ] ) [ delegate port:name added:added ] ;*+
    +*// this is called from deviceAdded() and deviceRemoved() callbacks*+
    +*- (void)portsChanged:(Boolean)added iterator:(ioiteratort)iterator*+
    +* ioobjectt modemService ;*+
    +* CFStringRef cfString ;*+
    +* while ( ( modemService = IOIteratorNext( iterator ) ) > 0 ) {*+
    +* cfString = IORegistryEntryCreateCFProperty( modemService, CFSTR( kIOTTYDeviceKey ), kCFAllocatorDefault, 0 ) ;*+
    +* if ( cfString ) {*+
    +* [ self port:(NSString*)cfString added:added ] ;*+
    +* CFRelease( cfString ) ;*+
    +* }*+
    +* IOObjectRelease( modemService ) ;*+
    +* }*+
    +*// callback notification when device added*+
    +*static void deviceAdded(void *refcon, ioiteratort iterator )*+
    +* ioobjectt modemService ;*+
    +* *+
    +* if ( refcon ) [ (SerialManager*)refcon portsChanged:YES iterator:iterator ] ;*+
    +* else {*+
    +* while ( modemService = IOIteratorNext( iterator ) ) IOObjectRelease( modemService ) ;*+
    +* }*+
    +*static void deviceRemoved(void *refcon, ioiteratort iterator )*+
    +* ioobjectt modemService ;*+
    +* *+
    +* if ( refcon ) [ (SerialManager*)refcon portsChanged:NO iterator:iterator ] ;*+
    +* else {*+
    +* while ( modemService = IOIteratorNext( iterator ) ) IOObjectRelease( modemService ) ;*+
    +* }*+
    +*- (void)startNotification*+
    +* CFMutableDictionaryRef matchingDict ;*+
    +* *+
    +* notifyPort = IONotificationPortCreate( kIOMasterPortDefault ) ;*+
    +* CFRunLoopAddSource( CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource( notifyPort ), kCFRunLoopDefaultMode ) ;*+
    +* matchingDict = IOServiceMatching( kIOSerialBSDServiceValue ) ;*+
    +* CFRetain( matchingDict ) ;*+
    +* CFDictionarySetValue( matchingDict, CFSTR(kIOSerialBSDTypeKey), CFSTR( kIOSerialBSDAllTypes ) ) ;*+
    +* *+
    +* IOServiceAddMatchingNotification( notifyPort, kIOFirstMatchNotification, matchingDict, deviceAdded, self, &addIterator ) ;*+
    +* deviceAdded( nil, addIterator ) ; // set up addIterator*+
    +* IOServiceAddMatchingNotification( notifyPort, kIOTerminatedNotification, matchingDict, deviceRemoved, self, &removeIterator ) ;*+
    +* deviceRemoved( nil, removeIterator ) ; // set up removeIterator*+
    +*- (void)stopNotification*+
    +* if ( addIterator ) {*+
    +* IOObjectRelease( addIterator ) ;*+
    +* addIterator = 0 ;*+
    +* }*+
    +* if ( removeIterator ) {*+
    +* IOObjectRelease( removeIterator ) ;*+
    +* removeIterator = 0 ;*+
    +* }*+
    +* if ( notifyPort ) {*+
    +* CFRunLoopRemoveSource( CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource( notifyPort ), kCFRunLoopDefaultMode ) ;*+
    +* IONotificationPortDestroy( notifyPort ) ;*+
    +* notifyPort = nil ;*+
    +* }*+
    +*// prototype for delegate or subclass*+
    +*- (void)controlFlagsChanged:(int)termbits*+
    +* if ( delegate && [ delegate respondsToSelector:@selector(controlFlagsChanged:) ] ) [ delegate controlFlagsChanged:termbits ] ;*+
    +*- (void)termiosThread*+
    +* NSAutoreleasePool *pool = [ [ NSAutoreleasePool alloc ] init ] ;*+
    +* int termbits ;*+
    +* while ( 1 ) {*+
    +* if ( useTermiosThread == NO ) break ;*+
    +* if ( inputfd > 0 ) {*+
    +* if ( [ termioLock tryLock ] ) {*+
    +* ioctl( inputfd, TIOCMGET, &termbits ) ;*+
    +* if ( termiosBits != termbits ) [ self controlFlagsChanged:termbits ] ;*+
    +* termiosBits = termbits ;*+
    +* [ termioLock unlock ] ;*+
    +* }*+
    +* [ NSThread sleepUntilDate:[ NSDate dateWithTimeIntervalSinceNow:0.25 ] ] ;*+
    +* }*+
    +* else {*+
    +* [ NSThread sleepUntilDate:[ NSDate dateWithTimeIntervalSinceNow:1.0 ] ] ;*+
    +* }*+
    +* }*+
    +* [ pool release ] ;*+
    +*// If delegate is set, setDelegate also starts a termiosThread if delegate responds to -controlFlagsChanged:*+
    +*- (void)setDelegate:(id)object*+
    +* delegate = object ;*+
    +* if ( delegate == nil ) {*+
    +* useTermiosThread = NO ;*+
    +* if ( needsNotification ) {*+
    +* needsNotification = NO ;*+
    +* [ self stopNotification ] ;*+
    +* }*+
    +* }*+
    +* else {*+
    +* if ( [ delegate respondsToSelector:@selector(controlFlagsChanged:) ] ) {*+
    +* useTermiosThread = YES ;*+
    +* [ NSThread detachNewThreadSelector:@selector(termiosThread) toTarget:self withObject:nil ] ;*+
    +* } *+
    +* if ( [ delegate respondsToSelector:@selector(port:added:) ] ) {*+
    +* needsNotification = YES ;*+
    +* [ self startNotification ] ;*+
    +* }*+
    +* }*+
    +*- (id)delegate*+
    +* return delegate ;*+
    @end
    +*// SerialManager.h*+
    +*// K3 Tools*+
    +*// Created by Kok Chen on 4/28/09.*+
    +*// Copyright 2009 Kok Chen, W7AY. All rights reserved.*+
    +*//#import <Cocoa/Cocoa.h>*+
    +*#import <Foundation/Foundation.h>*+
    +*#import <UIKit/UIKit.h>*+
    +*#import <CoreData/CoreData.h>*+
    +*//#import <IOKit/IOKitLib.h>*+
    +*//#import <IOKitLib.h>*+
    +*#include <IOKit/IOKitLib.h>*+
    +*typedef int FileDescriptor ;*+
    +*@interface SerialManager : NSObject {*+
    +* NSLock *termioLock ;*+
    +* FileDescriptor outputfd ;*+
    +* FileDescriptor inputfd ;*+
    +* id delegate ;*+
    +* // serial ports in system*+
    +* NSString *stream[64] ;*+
    +* NSString *path[64] ;*+
    +* int numberOfPorts ;*+
    +* *+
    +* // termios*+
    +* int termiosBits ;*+
    +* Boolean useTermiosThread ;*+
    +* *+
    +* // IO notifications*+
    +* IONotificationPortRef notifyPort ;*+
    +* ioiteratort addIterator, removeIterator ;*+
    +* Boolean needsNotification ;*+
    +*- (void)setDelegate:(id)sender ;*+
    +*- (int)findPorts ;*+
    +*- (int)findModems ;*+
    +*- (int)findRS232Ports ;*+
    +*- (NSString*)streamAtIndex:(int)n ;*+
    +*- (NSString*)pathAtIndex:(int)n ;*+
    +*- (FileDescriptor)openInput:(NSString*)path baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops ;*+
    +*- (FileDescriptor)openInput:(NSString*)path baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops flags:(int)openFlags ;*+
    +*- (FileDescriptor)openOutput:(NSString*)path baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops ;*+
    +*- (FileDescriptor)openOutput:(NSString*)path baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops flags:(int)openFlags ;*+
    +*- (void)closeInput ;*+
    +*- (void)closeOutput ;*+
    +*- (FileDescriptor)inputFileDescriptor ;*+
    +*- (FileDescriptor)outputFileDescriptor ;*+
    +*- (int)getTermios ;*+
    +*- (void)setRTS:(Boolean)state ;*+
    +*- (void)setDTR:(Boolean)state ;*+
    +*- (void)setDelegate:(id)object ;*+
    +*- (id)delegate ;*+
    +*// delegates*+
    +*- (void)port:(NSString*)name added:(Boolean)added ;*+
    +*- (void)controlFlagsChanged:(int)termbits ;*+
    @end
    Could you help me ?

  • Connection to serial port for communication RFID

    HI,
    I have occurred problem in communication to serial port for accessing the RFID
    through Serial Port COM1 or COM2 . I got garbage values of Card .
    Please give me the code for accessing serial port and indicter the cadr is detected by RFID and read the data on card.

    EHAG microchip 13,56 MHz dual reader and Mifare 1KB contactless smartcard.
    I've succeed to retrieve the data from the transponder (card) but it just only once when i click the button from my application. My question is how do i retrieve the data continuously from the card for every few milliseconds?
    sorry for my language.

  • How to access parallel ports using LabVIEW?

    I want to send data to a device which is connected through LPT1.when Iam using serial port write.vi with port number 10(for LPT1) it is giving an error code 37 which means the device not found. whether those vis are only for accessing serial ports? Then how to access LPT1 using LabVIEW?

    Most likely you need to modify your labview ini file to let it know that LPT1 (or whichever) will be controled through the serial port control. See the following link for a knowledgebase answer to this question:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/a5abd9d76665217b86256333005ac9a5?OpenDocument
    Jared

  • During serial port acess panel ist locked!

    could someone tell my why and how to change that?

    LabVIEW doesn't lock the front panel while accessing serial ports, so we'll need a lot more information about your program to diagnose your problem. Describing what you're trying to do or posting a picture of your VI's diagram might help.

  • Crio serial port

    Hi
    Can anybody tell me how to access serial port of crio 9024. I have to transmit data on the serial port of the controller. This transmission must be through crio serial port and not through CSeries module.
    Thanks
    Solved!
    Go to Solution.

    Hello Rajeev,
    This is an old post, and I almost missed the reply, but I'll see if I can help.
    As you have experience with Hyperterminal, have you plugged the serial port of the cRIO into hyperterminal, and see if anything is actually be transmitted?
    Does the LCD have a microcontroller that interprets the serial commands?
    If so, do these commands have to have an explicity baud rate or termination character?
    Consider looking at this example as a guide for troubleshooting:
    Serial Data Transfer Between cRIO and Host
    In the future, consider making a new post, and just linking an old post.  Hopefully, someone can reply to you much sooner.
    Regards,
    George T.
    Applications Engineering Specialist
    National Instruments UK and Ireland

Maybe you are looking for