Hello Chris, thank you very much to answer!

2011/8/8 Chris Stratton <cs07...@gmail.com>

> On Monday, August 8, 2011 7:13:25 PM UTC-4, T0N1 wrote:
>>
>>     1. tried to compile with CodeSourcery and
>
> Don't do that. It's rarely the right answer.
>

OK. I saw that is very difficult to figure out the right toolchain for my
tablet. Even to create it.


>     2. tried to compile with NDK and it resulted a executable file!!!
>> It ran ok and has a EABI version 4. But when I try to connect with
>> telnet on it, it didn't work, and close the process. :S
>
> Now that you have code that executes, you need to figure out why it fails.
> Some choices:
>

The compiled code is avaiable here (
http://www.antonio.spadim.com.br/arm/android/ser2net/build.20110809-01/)
with the source and .mk that I used.

I saw that when I use telnet protocol to watch simple device like barcode
serial and RfID card readers (this is what I have here) it works fine. But
when I try to use a USB/1-wire (Dallas converter, to read temperature - see
more on www.owfs.org) it work for a little and stop ( =cancel the execution
process, and close. I saw this with *ps.* The process disappears.). The same
USB/1-wire adapter + ser2net running in my test x86 pc works great, with no
faults or errors, and indefinitely (>4days). I compiled this program to a
mini2440  (http://www.friendlyarm.net/products/mini2440?lang=en) with the
manufacturer toolchain and worked too, same way as x86 pc.

So, I presume that the problem is not the code, because it's robust and I'd
already tested it in many different archs and devices. It looks like the
compiler didn't link something or miss some lib.


> 1) load up with debug printf's to see what it is trying to do
>

OK


> 2) strace it
>

I never used this, but I'll try.


> 3) learn to use gdbserver and gdb
>

OK too.


> I assume you are running this code from the adb command line.  If not, you
> will need to be launching anything that wants to use network sockets out of
> an apk that has Internet permission.  And unless you get the program
> launched as root, you won't be able to bind to privileged ports.
>

To deploy the binary to my tablet as I told before I'm using:
   $scp ser2net root@MYTABLETIP:/etc/ser2net

After that I connect to my tablet as root, normally, ssh root@MYTABLETIP and
type:
   #cd /etc  [Go to right directory]
   #chmod 777 ser2net  [Give some grant access]
   #chmod 777 ser2net.conf
   #ser2net  [run the app]

I'm not using any adb command or trick, and as you can see, my tablet is
rooted too. I just use ssh and scp. Any tip?

Do you have some stepping rocks or guide to compile it right way?

Thanks again!
Toni

 --

unsubscribe: android-porting+unsubscr...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to