chzhong / serial-android Goto Github PK
View Code? Open in Web Editor NEWserial port communication library for Android
License: MIT License
serial port communication library for Android
License: MIT License
i lookn for a way to compile libs for 64bit in my environeement adobe Air;
is ther a solution ! is ther an other ANE (native code ) or just a text .
for ADOBE AIR !
thanks
I tried to compile LibSerial library for arm 64 bit (APP_ABI := armeabi-v7a arm64-v8a), but got the following error below using ndk-build. Wondering if you guys know what is needed to support arm 64 bit ?
Error:
[arm64-v8a] Compile++ : serial <= serial_jni.cc
[arm64-v8a] Compile++ : serial <= jni_utility.cc
[arm64-v8a] Compile++ : serial <= jni_main.cc
[arm64-v8a] Compile++ : nativehelper <= JNIHelp.cpp
[arm64-v8a] Compile++ : nativehelper <= JniConstants.cpp
[arm64-v8a] Compile++ : nativehelper <= toStringArray.cpp
[arm64-v8a] StaticLibrary : libnativehelper.a
[arm64-v8a] Compile : serialport <= glob.c
In file included from /serial-android/serial-android/libserial/src/main/jni/libs/serialport/glob.c:83:
In file included from /serial-android/serial-android/libserial/src/main/jni/libs/serialport/include/glob.h:40:
In file included from /usr/include/sys/_types.h:33:
/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from /serial-android/serial-android/libserial/src/main/jni/libs/serialport/glob.c:83:
In file included from /serial-android/serial-android/libserial/src/main/jni/libs/serialport/include/glob.h:40:
/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
^
2 errors generated.
I tried building the libs using the script 'build-libs.sh' and using ndk-build as well.
I get the following error :
abishek@abishek-ubuntu:~/Downloads/serial-android$ ./build-libs.sh
[armeabi-v7a] SharedLibrary : libserial.so
/home/abishek/Downloads/serial-android/libserial/src/main/jni/libs/serialport/glob.c:394: error: undefined reference to 'issetugid'
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libserial.so] Error 1
I want to use libserial.so in xamarin android project to deploy on 64-bit cpu .
Has anyone generated libserial.so file for 64 bit CPU?
Im using your library serial communication using R232,
I would like to know when i write the port, its success and trigger to my terminal device, however when i try to read the return, the error gives me
Native port is not open?
may i know how comes? because when i write my code i try to put handler, or countdown too,
what will be possible can fix this?
Hope you help me this.
Thank you
public void sendCommandData(final String id, final Serial port, byte[] data) {
this.id = id;
try {
port.write(data, data.length);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
try {
Toast.makeText(activity,""+port.read(),Toast.LENGTH_SHORT).show();
} catch (SerialIOException e) {
Toast.makeText(activity,""+e.getMessage(),Toast.LENGTH_SHORT).show();
}catch (Exception e)
{
messageBox(activity,"Error",e.getMessage());
}
}
}, 10000);
} catch (SerialIOException e) {
e.printStackTrace();
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.