After few hours of happy hacking i successfully compiled libMonoPosixHelper using ndk on windows and it works like a charm with mono System.IO.Ports (i dropped some code) and NModbus (that uses log4net and in which i removed a lot of unuseful and unsupported code).
Just one thing: i discovered that android doesn't load native libraries dependencies so i make a BIG library containing: - libeglib, from mono-master - libz, from mono-master (i just added stuff in support folder) - some functions from libm (sqrt and all the necessary stuff) because libeglib uses them for hashtables Now it working fine and it's very very very nice, my basilar weather station (just pressure and temperature) is happily attached to my chinese android tablet with android 4.0.3 and seems to works fine (twenty minutes without crash :)) Big question: i've seen that libz and libeglib uses mit/bsd style license, what license is in use for libMonoPosixHelper? Thank you! 2012/11/6 Jonathan Pryor <[email protected]>: > On Nov 5, 2012, at 8:06 PM, Daniele Salvatore Albano <[email protected]> > wrote: >> While i understand that some (many) custom kernels doesn't support serial >> ports (internal and usb ones), i really need it :) > >> Can i do something to obtain support for Serial Ports on mono for android? >> Can i grab System.IO.Ports from mono project (i think not, i've seen that a >> native helper called MonoPosixHelper is used). > > You'd need to grab both: use the Android NDK to compile mono/support into > MonoPosixHelper, and compile mcs/class/System/Sytem.IO.Ports into your > application. In theory both should be do-able, but I haven't tried (and thus > don't know what complications you may run into). > >> I imagine that i need to write a simple native library to handle this >> situation, > > That would be the NDK-built libMonoPosixHelper.so. > >> or i can write a native android library and use it with pinvokes on mono for >> android? > > P/Invoke is fully supported. You can certainly DllImport into an app-bundled > MonoPosixHelper. > >> I've wrote some stuff, some time ago, to handle serial ports and it works >> fine so if i can use it without interfacing with JNI would be great! > > That works too. > > - Jon > > _______________________________________________ > Monodroid mailing list > [email protected] > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid -- Daniele Salvatore Albano --- IT Consultant Website Design and Development Software Engineer and Developer Linux Servers SetUp And Administration Embedded Network Solutions http://www.daccii.it http://www.itechcon.it _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
