So, what I did now is that I downloaded a 32-bit SUN JDK, and compiled
the shared objects for 32bit with -m32, and installed them. I also
uncommented the printf() lines in the read() and write() functions in
the shared object - so that displays what's being written and read.
here I don't get a segfault anymore, but the communication still breaks.
that is, after downloadting the TestSerial app to the mote, its TX
light starts to blink (it seems it's sending data regulary). As soon as
I start the Java-bases TestSerial app on the laptop, the TX light stops
blinking. Moreover, the mote should display the number received on the
serial interface - and it does not.
Let me note that if I do the very same, but connect to the mote via the
serial forwarder written in C, all works fine...
Here's the output I get on the console when using the java-based setup:
$ make telos install.0 bsl,/dev/ttyUSB0
mkdir -p build/telosa
compiling TestSerialAppC to a telosa binary
ncc -o build/telosa/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow
-DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=telosa
-fnesc-cfile=build/telosa/app.c -board= TestSerialAppC.nc -lm
compiled TestSerialAppC to build/telosa/main.exe
6040 bytes in ROM
291 bytes in RAM
msp430-objcopy --output-target=ihex build/telosa/main.exe
build/telosa/main.ihex
writing TOS image
tos-set-symbols --objcopy msp430-objcopy --objdump msp430-objdump
--target ihex build/telosa/main.ihex build/telosa/main.ihex.out-0
TOS_NODE_ID=0 ActiveMessageAddressC$addr=0
Could not find symbol ActiveMessageAddressC$addr in
build/telosa/main.exe, ignoring symbol.
Could not find symbol TOS_NODE_ID in build/telosa/main.exe, ignoring symbol.
installing telosa binary using bsl
tos-bsl --telos -c /dev/ttyUSB0 -r -e -I -p build/telosa/main.ihex.out-0
MSP430 Bootstrap Loader Version: 1.39-telos-8
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.10 (Device ID: f149)
Adjust SP. Load PC with 0x0C22 ...
Transmit default password ...
Patch for flash programming required!
Load and verify patch ...
Program ...
6266 bytes programmed.
Reset device ...
rm -f build/telosa/main.exe.out-0 build/telosa/main.ihex.out-0
[EMAIL PROTECTED] $ java TestSerial
serial@/dev/ttyUSB0:115200: resynchronising
... read: 03 03 03
Sending packet 0
... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
... read: 00
Sending packet 1
... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e
Sending packet 2
... wrote: 7e 44 10 00 00 00 00 00 02 00 09 00 02 f9 7f 7e
the output itself differs, here are other stuff I get:
$ java TestSerial
Sending packet 0
... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
serial@/dev/ttyUSB0:115200: resynchronising
... read: 0b 0b
... read: 00
Sending packet 1
... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e
Sending packet 2
... wrote: 7e 44 10 00 00 00 00 00 02 00 09 00 02 f9 7f 7e
$ java TestSerial
serial@/dev/ttyUSB0:115200: resynchronising
... read: 0b
Sending packet 0
... wrote: 7e 44 0e 00 00 00 00 00 02 00 09 00 00 fc 59 7e
... read: 00
Sending packet 1
... wrote: 7e 44 0f 00 00 00 00 00 02 00 09 00 01 94 91 7e
maybe the serial port is not reset properly, and some trash remains
there from previous rounds?
anyway, the above bytes read - are they valid TinyOS serial protocol bytes?
Akos
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help