Hi, Both application uses the same classes to decode the serial frame (removing framing, escaping, and checking crc), so they both needs the format generated by the Serial* modules. If you wan't use the serial port in the tinyos way, you should use those modules. If you want to do it in your own way, you'll probably need framing, escaping, and crc checking, and all three is ready in the Serial* modules, plus you can redirect the serial communication to radio and vice versa with just a few changes in the app's configuration file.
Andris 2012/2/12 <[email protected]>: > Thanks Adrás for your advice. > > Then "Listen" is used in combination with > SerailActveMessageC/SerialAMSenderC/SerialAMReceiverC to generate an > comprehensible format to "Listen". > > And I don't sure if I've understood you. SerialForwarder need also a > comprehensible format too? Because I typing this command: > > java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB1:115200 > > But don't show nothing. (Don't receive any packet) > > > Thanks in advance. > > Regards, > > Alejandro. > >> Hi, >> >> On Sun, Feb 12, 2012 at 12:17 PM, Sergio Valcarcel <[email protected]> >> wrote: >>> Hi, >>> >>> I have not used Tiny OS for many months now, but I do not quite remember >>> to >>> use the command directly. >>> I think that when using that class you are launching a thread for >>> listening. >>> But you also need another class to set what you want to do with the >>> incoming >>> packets. >> >> That's not true. You can bridge the serial communication to a TCP >> server with SerialForwarder, but Listen can also connect directly to >> the serial port. Connecting an app directly to a serial port has one >> problem: You can only use one program per serial, while you can use >> many clients with one TCP server. >> >> About the original problem: Listen waits for very specific message >> format (framed, escaped, checksumed, and it has a header). You should >> use SerailActveMessageC/SerialAMSenderC/SerialAMReceiverC, which >> generates this format. >> >> Andris >> >>> >>> But I insist that I am not quite sure now... >>> >>> Cheers! >>> Sergio >>> >>> >>> On Sat, Feb 11, 2012 at 10:06 PM, <[email protected]> wrote: >>>> >>>> Hello. >>>> >>>> I am reading from the terminal some values using UARTstream (with >>>> telosb) >>>> >>>> I can read ok using the cu program: >>>> >>>> >>>> cu -l /dev/ttyUSB0 -s 115200 >>>> >>>> Because uart is configured with 115200 baudrate >>>> >>>> But when I try to read using this command: >>>> >>>> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:115200 >>>> >>>> Don't appear nothing, only is in idle state. >>>> >>>> >>>> Please someone could give an advice about this issue? >>>> >>>> Thanks in advance. >>>> >>>> Alejandro. >>>> >>>> >>>> _______________________________________________ >>>> Tinyos-help mailing list >>>> [email protected] >>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >>> >>> >>> >>> _______________________________________________ >>> Tinyos-help mailing list >>> [email protected] >>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
