Low Level Serial Port Access
This question has gone unanswered several times on this forum in the past but I thought I would try it once more.
Is there any Java API that is in, or will work with J2ME to allow direct read and write to the serial port similar to the functionality that javax.comm provides for j2se.
This would be useful for a project where a palmos device is used to communicate with equipment used to monitor industrial processes.
Some MIDP 1.0 devices support access to the Serial
Port.
I have done it with Motorola i85, i50 (iDen) and
Motorola T720i.
I think 95cl also supports it. I'm ALSO having problems with serial port access on
my T-Mobile Moto T720i phone. I've had MUCH success
with the Nextel i85, i50, i95cl, etc phones, but the
same code isn't running on the T720i.
What do I need to do differently???
Thanks,
-Tim
Similar Messages
-
"Low-level" authorizations for accessing BW reports - add users to role
Using the advice in Topic "Low-level" authorizations for accessing BW reports, I have been able to publish a query to a role that has 3 test users and each user gets the same query but with different data, as determined in the tables.
Is there a way to look up the users and e-mail addresses from a table and associate them to the role? We have several hundred e-mail recipients that will not need BW access, but only need an e-mail with a static report that contains data on their own territories.Hi!
i think programatically it might be complex. You got to maintain a seperate variant of report per user and use this variant to send mail. that means you need to maintain a variant and a Broadcast setting per user. once maintained you can use it any number of times the values will be recalculated everytime.
with regards
ashwin
<i>PS n: Assigning point to the helpful answers is the way of saying thanks in SDN. you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.</i> -
Serial port access time slows in version 6 to 7 upgrade
Hi - I am in the process of upgrading an project from LV 6 to LV
7, the serial port access works well in LV6 but after the
upgrade, the serial port access is slow in LV if the application is
compiled into an exe. We are running Windows 2K on all machines
and have installed the LV7.0 runtime engine on the PC that is running
the executable. If I run the application on a machine that has
the full LV7.0 development software on it, the executable runs
just like it used to under LV6.0
What am I forgetting?? The application is built into one exe that
has all of the sub vi's included. I have checked the box on the
application builder that says included serial port support.
Help! - We have 3000 PCBs sitting in manufacturing waiting to go to test until I solve this problem
Thank youHi
I just recently finished a project in which I had to upgrade code from LV 6 to LV 7.1. After I did that the serial port actually worked but all the Fieldpoint devices that were connected to the system didn't work. The problem ultimately was the NI Fieldpoint Drivers. After I installed the newest drivers from NI everything worked perfectly. I don't know why your problem is occurring, but I wanted to reasure you that there isn't a problem with the serial ports when upgrading to LV7.1 (I don't know about LV7).BTW, I had LV6.1 development system installed on the computer, but didn't have the LV7.1 (All I had was an EXE file).
So, try installing the newest drivers. Maybe that can help.
Ami -
Need faster serial port access
I am using javacomm for serial port communication and the performance is too
slow for my needs. I am comming with an embedded app from an NT machine
with my java app. For benchmark purposes I hava VB app that can also talk
to this embedded app. The round trip communication time for the VB app is
20-30 milliseconds but the java app takes ~200 milliseconds. I think I could
improve performance by writing to the serial port directly instead of going
through the javacomm api which I think is slowing me down. Is it possible to
to a low-level file open and write directly to the serial port? And if so, how?
Thanks,
MichaelI am using javacomm for serial port communication and
the performance is too
slow for my needs. I am comming with an embedded app
from an NT machine
with my java app. For benchmark purposes I hava VB app
that can also talk
to this embedded app. The round trip communication
time for the VB app is
20-30 milliseconds but the java app takes ~200
milliseconds. I think I could
improve performance by writing to the serial port
directly instead of going
through the javacomm api which I think is slowing me
down. Is it possible to
to a low-level file open and write directly to the
serial port? And if so, how?
Thanks,
MichaelSlowing down of communication process depends upon code content as well. if u can put ur code here, may be u can get some feedback concerned with speed.
you can not directly talk at a serial level but make a component in say C n can use native methods to access that component. But that component would be very much comparable to Win32com.dll.There would be speed difference but that difference would not be enough to warrant 'too much'
Jatin -
Java enabled phones supporting serial port access
Does anybody know a Java enabled mobile phone beside the Motorola iden family that supports access to the serial port ? As far as I can see there are no such phones on the market.
simens sl45 and m50
-
Infrared / Serial ports access in MIDP for Palm
Hello,
Do you guys know if MIDP for Palm allows to connect to the IR / Serial ports ? If yes, any examples ?
Thanks,
Vadim.I'm very interested by your discussion, i have searched a lot of information about midp and the access to the serial port.
The specifications of midp says that the comm protocol is not available in midp.
The IBM J9 Java VM is supposed to be full midp implementation but only only for x86 processors. The lcdui package is not available with the J9 VM for palm. The lasts contact i have with ibm about this subject, they said that they will implement lcdui but they can't say when .... perhaps in 2002.
I don't know any other Java VM witch have a full midp implementation ... Kada VM will be but i don't know when ...
If you have any other information, i'm very interested
Thanks by advance -
After Effects scripting: Serial port access?
Hi,
Does any one know if it's possible to access the computer's serial port using an After Effectsc script?
I'm building a motion control script and I'm wondering if I can use a script to read the values of a keyframed parameter(e.g. a slider effect on a solid layer) to send serial port commands to move my rig.
Regards,
Ihab AliI don't think that ExtendScript for AE ships with a way to do that out of the box, but in the Javascript Tools Guide for CS5, there is a section titled "Integrated External Libraries" which reads:
You can extend the JavaScript DOM for an application by writing a C or C++ shared library, compiling it for the platform you are using, and loading it into JavaScript as an ExternalObject object. A shared library is implemented by a DLL in Windows, a bundle or framework in Mac OS, or a SharedObject in UNIX.
You can access the library functions directly through the ExternalObject instance, or you can define an interface that allows your C/C++ code to create and access JavaScript classes and objects.
All Adobe Creative Suite 4 applications support this feature.
So you can probably write an app in C or C++ which communicates directly to the machine's port, and then call functions you declare in that code via ExtendScript. Sorry I couldn't be of much help here, but that's where I would start.
--Arie -
Low Level Programming: Register Access
Hello all,
I am currently on a project in which I am developing an instrument to run on a Windows XP system and utilizing a PC/104 stack for data acquisition. Most of the access to the cards on the stack is performed through drivers provided by the manufacturers of the cards. However, some functionality appears to be missing from one of the drivers and I am now having to manipulate registers to configure things correctly. To do this, I link to a dll that I have written and compiled in Microsoft Visual C++ 2010 Express in which I request access to that segment of memory. Right now, all I am trying to do is read that segment, but currently Labview is throwing the error 1097. The code in the dll is:
BYTE getCtrCfg(WORD address){
BYTE *cfg_Out = (BYTE *)(address + 10);
return *cfg_Out;
(BYTE is an unsigned char and WORD is an unsigned integer). To me, this seems fairly straight forward - all I want is the contents of the 8-bits associated with the base address + 10 specified by the user - I am currently not trying to manipulate the data there. This function compiles and executes with no errors in the console environments so it appears that there is some sort of clash between LV and the dll. Does anybody have any suggestions?
Thanks, Matt
Matt Richardson
Certified LabVIEW Developer
MSR Consulting, LLC
Solved!
Go to Solution.VISA would be a good idea, but if your vendor driver needs to access that device too, you are in a bit of a catch 22 situation, since Windows does not allow different kernel device drivers to claim the same device.
But one possibility might be a generic IO space kernel driver. The OpenG Port IO driver does provide a kernel driver for 32 bit Windows versions, that can access both IO ports as well as physical memory addresses. The actual LabVIEW interface library supports both IO port and physical memory access but the memory access is not really tested, but it is at least a start.
Modifications to the kernel driver would require installation of a Windows development toolchain including Windows SDK and DDK.
However this uses Windows kernel functionality that has been depreciated since at least Windows 2000, and therfore is most likely not available in 64 Bit Windows at all. So if porting to 64 bit is even a remotely possible requirement, then don't go that route. You would paint yourself into the corner in that way.
To download OpenG libraries including the OpenG Port IO driver you should install VIPM.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Low level USB port power control
This may be a software question, but is there a way to keep the USB ports from powering down on a MacBook? The power-saving feature is causing some trouble for some older USB equipment we have (like things aren't waking back up ). You can do this in Windows through the device manager, but if there is a way in OSX I would guess it's a plist modification of some kind. Thanks!
Hi Bob,
The article below should povie helpful information about power usage and connection of high-powered devices. It also shows how to verify the amount of power being provided.
Apple Computers and Displays: Powering peripherals through USB
http://support.apple.com/kb/HT4049
-Jason -
"Low-level" authorizations for accessing BW reports
May I please have your attention for the following:
Each employee is represented by a costcenter in our R/3, and thus, BW-system.
Plan is as follows: by filling in the costcenter on the selection-screen of a BW-webreport on can see his/her own financial data for a certain (posting)period.
Is there a way to restrict access without creating separate users/roles/profiles for each costcenter??(we have a lot of potential users who only need to see the report but do not need access to BW itself (RSA1 etc)).
I'm thinking about some sort of mapping:
e.g. user SANTA logs on -> ABAP-program/function maps it to correct costcenter e.g. 1234 -> user is only authorized for this costcenter...
But is this possible and where to implement it??
Thanx a lot in advance for your hints!!!
Best regards,
MarcoThanks al lot for your replies.
Corwin, I tried your solution and I've almost got it working....
1. made a table in DDIC to link username to costcenter
2. set up a reporting auth. via RSSM
3. created a variable (ZCOSTC) type 'Authorization' in the query designer
4. wrote some code in the user-exit (via SMOD) to fill this variable (translate username to costcenter via mentioned table)
5. created a role incl. authorization with reference to variable: value '$ZCOSTC'
This reference is not working unfortunately enough.
Everything works fine when I replace $ZCOSTC by an existing costcenter.
Am I forgetting something??
Thanx again!
Best regards,
Marco -
USB and serial port access in java
Hi
I have a magstripe card reader connected to my computer with a USB interface (port).
I am using javax.comm API to get the card swipe data but could not succeeded.
Can i do that or have to do something else ???ok. Below is my code:
this is a sample code come with the API.
package msr;
* @author Dell
import java.io.*;
import java.util.*;
import javax.comm.*;
* Class declaration
* @author
* @version 1.8, 08/03/00
public class SimpleRead implements Runnable, SerialPortEventListener {
static CommPortIdentifier portId;
static Enumeration portList;
InputStream inputStream;
SerialPort serialPort;
Thread readThread;
* Method declaration
* @param args
* @see
public static void main(String[] args) {
boolean portFound = false;
String defaultPort = "COM3";
if (args.length > 0) {
defaultPort = args[0];
portList = CommPortIdentifier.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (portId.getName().equals(defaultPort)) {
System.out.println("Found port: "+defaultPort);
portFound = true;
SimpleRead reader = new SimpleRead();
if (!portFound) {
System.out.println("port " + defaultPort + " not found.");
* Constructor declaration
* @see
public SimpleRead() {
try {
serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
} catch (PortInUseException e) {}
try {
inputStream = serialPort.getInputStream();
} catch (IOException e) {}
try {
serialPort.addEventListener(this);
} catch (TooManyListenersException e) {}
serialPort.notifyOnDataAvailable(true);
try {
serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
} catch (UnsupportedCommOperationException e) {}
readThread = new Thread(this);
readThread.start();
* Method declaration
* @see
public void run() {
try {
Thread.sleep(20000);
} catch (InterruptedException e) {}
* Method declaration
* @param event
* @see
public void serialEvent(SerialPortEvent event) {
switch (event.getEventType()) {
case SerialPortEvent.BI:
case SerialPortEvent.OE:
case SerialPortEvent.FE:
case SerialPortEvent.PE:
case SerialPortEvent.CD:
case SerialPortEvent.CTS:
case SerialPortEvent.DSR:
case SerialPortEvent.RI:
case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
break;
case SerialPortEvent.DATA_AVAILABLE:
byte[] readBuffer = new byte[20];
try {
while (inputStream.available() > 0) {
int numBytes = inputStream.read(readBuffer);
System.out.print(new String(readBuffer));
} catch (IOException e) {}
break;
} -
Hey,
How do I read data from the COM3 port on my computer. I have the javax.comm thing all setup but need to figure out how the data comes in from a device plugged into that port. Having the data display on the fly as they are being read should be explained please. Thanks a lot.Hey,
Have a look at this example:
http://java.sun.com/products/javacomm/javadocs/SimpleRead.java
You need to adjust some things though.
Hope this helps. -
Raw access to serial port /dev/ttya
I need to control the characteristics of the serial port /dev/ttya on a Sun-Blade-100 running SOLARIS 8 from Java (JRE 6).
The purpose is to set the baud rate, parity bits, etc.
On my PC (development infrastructure, WinXP) I am using the javax.comm libraries and everything is fine. However, when copying the application to the SUN, no available ports are shown and the app terminates.
I suspect that I am missing some low-level stuff that accesses the devices ?!
Any ideas would be welcome!
Udo(b) sounds like the best solution to me.
Google search result that seems reasonably close to what you need.
http://www.linuxquestions.org/questions … ce-644237/ -
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? -
Motion Control via Serial Port
I have previously developed an automated video microscope application in Labview. It worked great. My setup was: NI PXI system with 1409 image board, 7344 motion controller, 7764 breakout box, stepper motors, motor drivers, and tables. Now, a customer is requiring that we use a specific brand of drivers that encompass a motion controller and are daisy-chained together. Communication will take place from a serial port, thereby bypassing the 7344. My question is: will I have to can my entire previous Labview motion/data acquisition program b/c I won't be using the 7344 controller? Or, will it be easy to specify in the program to commmunicate via the serial port rather than the card? Would this setup take place in MAX, or in the LabView applicatio
n itself? Any nuances that I should know about? Any info would be appreciated. THANX-ROBRob,
in this case you won't be able to use any of your motion related code. The motion VIs in LabVIEW call the NI-Motion driver dll and thus they are not hardware independant. By the way, this is not a specific disadvantage of the NI-Motion driver. In fact there is not such a thing available like a standardized interface and hardware independant motion control language.
In general you will have to use low level serial communication (VISA). That means you have to read the drive/controller manual, identify the serial command strings you need and send them to the device.
For configuration the drive vendor should provide a utility to set the necessary parameters.
On the other hand you could be lucky in the case that the vendor of the drive/controller provides h
igh level LabVIEW vis. You should check with this vendor if a LabVIEW driver is available. Still you will have to rewrite your motion related part of the code.
I'm sorry that there are no better news.
Best regards,
Jochen
NI-Germany
Maybe you are looking for
-
EUL5_qpp_stats is not registering in Discoverer 11G
We followed all the steps to change the pref.txt file to set QPPEnable = 1 and QPPCreateNewStats = 1, the public user has access to sys.v_$session, sys.v_$sesstat,sys.v_$parameter ,sys.v_$sql ,sys.v_$open_cursor views (assigned also at user level). W
-
SCEP Definition update from Microsoft Malware Protection Center vs WindowsUpdate?
Hi, SCEP Definition update from Microsoft Malware Protection Center vs WindowsUpdate? What is the different? /SaiTech
-
How to upload BP Mobile number ?
Hello We have a requirement to upload BP Mobile and Telephone number while BP creation. Neither of following has 'Mobile Number' in its structure. Can anyone suggest a different BAPI/ IDOC for the same? BAPI_BUPA_CREATE_FROM_DATA BUPAFS_FS_CREATE_FRM
-
Will there be a new ipod classic released soon?
Am thinking of buying a new classic but have seen that the nano, shuffle etc have just been upgraded. Are there any plans or expectation that the classic will be refreshed soon too? Thanks.
-
How can we execute the session in error mode through SE38 program
Dear Experts, How can we execute the BDC session in error mode through se38 programme.... we can execute the session in the below 2 ways 1) Through SM35 we can process the session manually in foreground/Error mode or Background also. 2) through