Hi, I may not quite understand, but there should be quite transparent.
The address should not make any difference when sending to the serial port. I assume that you have created the corresponding components SerialActiveMessageC and components new SerialAMSenderC(AM_TEST_SERIAL_MSG) don't you? How do you know that it is not sending anything to the serial port? Which program are you using to read it? Once you know that obvious things work the problem may be related to how you update the buffers or how call the task. The way I have worked is using different variables for serial and radio interfaces. Note that the pointer to message_t points different depending on the packet comes from radio or serial. I hope that helps! Sergio On Mon, Jan 16, 2012 at 3:50 PM, Marcelo Coelho < [email protected]> wrote: > Hi! > > > > Had the same issue a few months back. The only solution I found was to > disable the radio whenever I’d get/send data from serial port. I guess that > TinyOS should deal with the concurrency issue between radio and UART > sharing the same SPI bus, but, that isn’t the case here. > > > > There is code to disable the radio on this list… somewhere… > > > > Cheers! > > > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Geo Gkolfin > *Sent:* segunda-feira, 16 de Janeiro de 2012 14:08 > *To:* [email protected] > *Subject:* [Tinyos-help] Problem Sending data to the serial port > > > > Hello! > > Sorry for insisting but I am stuck! I am using tinyos-2.1.0. I have some > telosb motes sending messages to a basestation mote. At first I simply > needed my basestation mote to create messages-replies, which should be sent > broadcast to the network. I had written an application which was working > fine. > > But now I also need my basestation application to forward all the received > messages to the serial port. Then a java application will store the data > included in the messages in a database. My java application works fine, > since if I install the existing BaseStation application to my basestation > mote the database is completed correctly. But the existing BaseStation > (tinyos-2.1.0/apps/BaseStation) is too complicated in order to edit it and > add the functionality for sending messages-answers to the motes. I tried > that, but I had no luck! > > On the other hand, I also tried to edit the basestation application of > mine, in order to send the received messages to the serial port. I took a > look at TestSerial application, that sends the messages to the serial port > using the line: > > //from TestSerialC.nc > if (*call AMSend.send(AM_BROADCAST_ADDR, &packet, > sizeof(test_serial_msg_t)*) == SUCCESS) { > > > I tried that but it didn't work. I also tried using TOS_UART_ADDR (defined > as 0x007E), without success. > Can anyone please tell me if my approach is correct? Any help will be > appreciated! > Thanks in advance, > Georgia > ------------------------------ > DISCLAIMER: This message is confidential and may contain privileged > information. It is for use only by the people or entities to whom it is > addressed. If you are not an intended recipient, you should not disclose, > distribute, copy, print, rely on or otherwise make use of this message. If > an addressing or transmission error has misdirected it to you we would be > grateful if you would please notify the sender by return, before deleting > it from your system. > ------------------------------ > Are you controlling information disclosure? Decide what you need to keep > secret and enforce it with csSECURE. See how at www.csSECURE.net. > > _______________________________________________ > 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
