Hi Miklos,
A copy of my RadioConfig.h file is attached. I am not running the latest
SVN version, but I recently updated the files in both lib/rfxlink and in
tos/chips/rf2xx/rf230. I wonder whether the problem occurs if my
zigbits' clocks are uncalibrated.
Thanks for your help!
Sergio
On 02/02/2012 03:05 PM, Miklos Maroti wrote:
Hi Sergio,
Can you send us your RadioConfig.h file? Is it the same as that for
the IRIS? The two platforms should essentially be completely
compatible, so I would like to see what causes the problems. I assume
that you are running the latest SVN version.
Best,
Miklos
2012/2/2 András Bíró<[email protected]>:
Hi Sergio,
Sorry, I thought you're using the 868/900 MHz version. My changes are
only for the rf212 (or other slower than 250kbps radios). The rf230
should work, it's well tested on the iris motes.
Andris
2012/2/1 Sergio Gonzalez<[email protected]>:
Hi Andris,
Thanks for the prompt response. I am working with the 2.4 GHz version of the
Zigbit, so I updated my /tos/lib/rfxlink and /tos/chips/rf230 accordingly,
but things remain the same. I see that you made several changes to some
files in the RF212 directory. I'll see whether they are directly applicable
to the RF230.
I haven't checked to see whether all registers and operation procedures are
the same for both chips. However, your changes apply to the SW ACK option,
so my take is that even if I don't port the new RF212 changes into the RF230
branch, shouldn't I be able to at least get the HW ACKs working? I wonder
whether the problem arises due to (mis-)wiring in the corresponding
configuration files. I'll keep digging.
Thanks,
Sergio
On 02/01/2012 01:13 AM, András Bíró wrote:
Hi Eric,
It uses the svn version of rfxlink, but there wasn't any big change in
that recently, I think it should work with older versions too.
Anyway, if you wan't to be sure, update the /tos/lib/rfxlink and
/tos/chips/rf230 directories too.
Andris
2012/2/1 Eric Decker<[email protected]>:
2012/2/1 András Bíró<[email protected]>
Hi Sergio,
I corrected a bunch of timing error on the rf212 radio with the help
of Miklos, try updating the /tos/chips/rf212 directory from the main
svn (http://tinyos-main.googlecode.com/svn/trunk/).
How independent is the rf212 stack?
Is it reasonable to update just that part of the tree or are there
dependencies to the main SVN trunk?
Andris
On Wed, Feb 1, 2012 at 5:55 AM, Sergio Gonzalez<[email protected]>
wrote:
Hi Miklos,
I am using the files that you sent a few months back and they work
well,
except that the Zigbits do not issue neither software nor hardware ACKs
when prompted (just noticed today). I made sure to include the usual
Packet.clear(&msg) and PacketAcknowledgements.requestAck(&msg) before
sending packets, so I have no idea why this is. I have read and
followed
advice from older posts (e.g., increasing SOFTWAREACK_TIMEOUT to 1000
or
even 2000, defining PACKET_LINK, etc.) with no luck.
Any ideas?
Thanks!
Sergio
On 11/05/2011 11:39 PM, Miklos Maroti wrote:
Hi Sergio,
On Sun, Oct 30, 2011 at 9:51 PM, Sergio Gonzalez<[email protected]>
wrote:
Hi Miklos,
Thanks for your help! I was already employing the files available
from
the
tinyos-contrib link that you mention. However, the IO configuration
setup
defined in those files corresponds to the physical wirings in the
IRIS
mote,
I have attached the files from THAT repository, so you must not have
the latest version of tinyos-contrib, or using something different.
not Zigbit. So, I replaced those with the ones you forwarded and I've
got
the radio working now. Except for one line, the modifications I had
mentioned in my previous email were spot on though. So, just for the
record,
the correct ones are:
...
HplRF230P.PortIRQ -> IO.PortE5;
...
SLP_TR = IO.PortB4;
RSTN = IO.PortA7;
SELN = IO.PortB0;
...
The line "HplRF230P.PortCLKM -> IO.PortD6;" is not needed anymore
in
HplRF230C.nc
Glad that it worked out for you.
Best,
Miklos
Thanks again!
Sergio
Hi Sergio,
Look at the meshbean platform in
tinyos-2.x-contrib/ethz/meshbean900/tos/platforms/meshbean/chips/rf230
I have the attached files there, and I am sure these will be good
for
your platform as well.
Best,
Miklos
On Sat, Oct 29, 2011 at 4:27 AM, Sergio Gonzalez<[email protected]>
wrote:
Hi Miklos,
Thank you so much for your previous help. I ended up designing new
boards
for my custom zigbit implementation and finally got TinyOS running
on
them.
So far I've got LEDs blinking and serial comms (TestSerial&
Printf)
working. However, I have been unable to get the radio working.
The only thing I've noticed so far is what appears to be an
incorrect pin
configuration in /tos/platforms/zigbit/chips/rf320/HplRF230C.nc
that
does
not correspond to the presupposed internal pins connections in the
zigbit
module. The original file specifies the following configuration:
? ?...
? ?HplRF230P.PortCLKM -> IO.PortD6;
? ?HplRF230P.PortIRQ -> IO.PortD4;
? ?...
? ?SLP_TR = IO.PortB7;
? ?RSTN = IO.PortA6;
? ?SELN = IO.PortB0;
? ?...
Obviously, this configuration is intended for the IRIS mote, so I
changed
it
for zigbit as follows:
? ?...
? ?HplRF230P.PortCLKM -> IO.PortB0; ? ? // PortB5<- wrong as
per
P.
Sommer
(no?) // PortD6;
? ?HplRF230P.PortIRQ -> IO.PortE5; ? ? ? ?// PortD4;
? ?...
? ?SLP_TR = IO.PortB4; ? ? ? ? ? ? ? ? ? ? ? ? ? // PortB7;
? ?RSTN = IO.PortA7; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// PortA6;
? ?SELN = IO.PortB0; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// OK!
I don't know whether I am wrong here, and what else I am missing to
get
the
radio working accordingly. I would greatly appreciate your help on
this
matter!
Best regards,
Sergio
_______________________________________________
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
--
Eric B. Decker
Senior (over 50 :-) Researcher
/*
* Copyright (c) 2007, Vanderbilt University
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose, without fee, and without written agreement is
* hereby granted, provided that the above copyright notice, the following
* two paragraphs and the author appear in all copies of this software.
*
* IN NO EVENT SHALL THE VANDERBILT UNIVERSITY BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE VANDERBILT
* UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* THE VANDERBILT UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE VANDERBILT UNIVERSITY HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Author: Miklos Maroti
*/
#ifndef __RADIOCONFIG_H__
#define __RADIOCONFIG_H__
#include <MicaTimer.h>
#include <RF230DriverLayer.h>
#include <util/crc16.h>
enum
{
/**
* This is the value of the TRX_CTRL_0 register
* which configures the output pin currents and the CLKM clock
*/
RF230_TRX_CTRL_0_VALUE = 0,
/**
* This is the default value of the CCA_MODE field in the PHY_CC_CCA register
* which is used to configure the default mode of the clear channel assesment
*/
RF230_CCA_MODE_VALUE = RF230_CCA_MODE_3,
/**
* This is the value of the CCA_THRES register that controls the
* energy levels used for clear channel assesment
*/
RF230_CCA_THRES_VALUE = 0xC7,
};
/* This is the default value of the TX_PWR field of the PHY_TX_PWR register. */
#ifndef RF230_DEF_RFPOWER
#define RF230_DEF_RFPOWER 0
#endif
/* This is the default value of the CHANNEL field of the PHY_CC_CCA register. */
#ifndef RF230_DEF_CHANNEL
#define RF230_DEF_CHANNEL 11
#endif
/* The number of microseconds a sending Zigbit mote will wait for an acknowledgement */
#ifndef SOFTWAREACK_TIMEOUT
#define SOFTWAREACK_TIMEOUT 2000
#endif
/* Use hardware acknowledgements */
//#ifndef RF230_HARDWARE_ACK
//#define RF230_HARDWARE_ACK
//#endif
/*
* This is the command used to calculate the CRC for the RF230 chip.
* TODO: Check why the default crcByte implementation is in a different endianness
*/
inline uint16_t RF230_CRCBYTE_COMMAND(uint16_t crc, uint8_t data)
{
return _crc_ccitt_update(crc, data);
}
/**
* This is the timer type of the radio alarm interface
*/
//typedef TThree TRadio;
typedef TOne TRadio;
typedef uint16_t tradio_size;
/**
* The number of radio alarm ticks per one microsecond
*/
//#define RADIO_ALARM_MICROSEC 1L
#define RADIO_ALARM_MICROSEC (73728UL / MHZ / 32) * (1 << MICA_DIVIDE_ONE_FOR_32KHZ_LOG2) / 10000UL
/**
* The base two logarithm of the number of radio alarm ticks per one millisecond
*/
//#define RADIO_ALARM_MILLI_EXP 10
#define RADIO_ALARM_MILLI_EXP (5 + MICA_DIVIDE_ONE_FOR_32KHZ_LOG2)
/**
* Make PACKET_LINK automaticaly enabled for Ieee154MessageC
*/
#if !defined(TFRAMES_ENABLED) && !defined(PACKET_LINK)
#define PACKET_LINK
#endif
#endif//__RADIOCONFIG_H__
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help