<first mail was temporarily blocked. 'message too big' error.> hello mario
everything works for me now (on Meshbean platform using Zigbit Amp). attached: 1. pls see the attached ps file which records all conversations between me, janos, and miklos. if there's anything unclear, pls ask. 2. HplRF230P.nc that works for me. i actually had it updated through CVS from here: http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/ethz/meshbean900/tos/platforms/meshbean/chips/rf230/ 3. simple radio stop/start app (starts radio -> sends a packet (read it separately using java serial listener) -> stops radio -> waits -> srepeat the process). rgds CL On Thu, Dec 9, 2010 at 10:26 AM, Mario Riesner <[email protected]> wrote: > Hi, > > > > did someone solve the problem? > > I’m also trying to stop the radio on my Meshbean platform with “call > AMControl.stop()” but the return value is always EBUSY. (SplitControl as > AMControl ) > > > > In the HplRF230P.nc file (2007) I think the lowestState() function is > already suitable? > > > > async command mcu_power_t McuPowerOverride.lowestState() > > { > > return radioOn ? ATM128_POWER_IDLE : ATM128_POWER_DOWN; > > } > > > > My module runs with the internal rc oscillator. > > I’ m a bit confused with the sleep mode, is the sleep mode in general > activated for the meshbean modules? > > Do I need to stop the radio to set the module in sleep mode? > > How can I test if my module/code uses the sleep mode if there is nothing to > do (no tasks pending, no events)? > > What’s the advantage if I stop the radio? > > Thanks in advance > > > > Cheers, > > Mario > > > > > -- Rgds CL -- Rgds CL
Can't stop Radio on Meshbean (MeshNetics Zigbit) 15 messages C L <[email protected]> Tue, May 18, 2010 at 12:50 PM To: tinyos <[email protected]> Hello I'm testing some of my TOS applications (which works on TelosB successfully) on the Meshbean platform. I access my radio through SplitControl and I get success for RadioControl.start() the first time. However, I can't stop: RadioControl.stop() returns an error. So, I have to keep my radio constantly on to get anything done! No, power optimization possible! Any ideas why? CL C L <[email protected]> Sat, May 22, 2010 at 6:40 PM To: tinyos <[email protected]> Hello guys I'm testing some of my TOS applications (which work on TelosB) on the Meshbean platform. I access my radio through SplitControl, and I get success for RadioControl.start() the first time. However, I can't stop the radio: RadioControl.stop() returns an error. Have you come across similar issues? Any ideas to solve this? No idea is a bad idea! CL Janos Sallai <[email protected]> Sun, May 23, 2010 at 1:35 AM To: C L <[email protected]> Cc: tinyos <[email protected]> Based on my experiences with the ZigBit OEM module (I used the one with the power amp and the rf230 transceiver), I can say that it's not a particularly great hardware for TinyOS. You must not allow the MCU to sleep while the radio is on, because the IRQ pin of the rf230 is connected to a pin of the MCU that can't wake up the MCU in edge triggered interrupt mode. The best workaround is to change tos/platforms/zigbit/chips/rf2xx/HplRf230P such that it provides McuPowerOverride, and McuPowerOverride.lowestState() returns ATM128_POWER_IDLE if the interrupt is enabled, or ATM128_POWER_DOWN if the interrupt is disabled. You know that the interrupt is enabled after IRQ.captureRisingEdge() called, and it is disabled after IRQ.disable(). You'll need to maintain this state in the module. Janos [Quoted text hidden] > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > C L <[email protected]> Fri, Sep 10, 2010 at 4:41 PM To: Janos Sallai <[email protected]> Cc: tinyos <[email protected]> hello janos hope u remember this thread from a long time ago. starting work on it again. is this correct (with reference to ur last email)? is it what u meant? pls see the commented areas. ------------------------------------------------- module HplRF230P { provides { interface GpioCapture as IRQ; interface Init as PlatformInit; //interface McuPowerOverride; } uses { interface HplAtm128Interrupt as Interrupt; interface GeneralIO as PortIRQ; interface HplAtm128Timer<uint16_t> as Timer; } } implementation { command error_t PlatformInit.init() { call PortIRQ.makeInput(); call PortIRQ.clr(); return SUCCESS; } async event void Interrupt.fired() { uint16_t time = call Timer.get(); signal IRQ.captured(time); } async command error_t IRQ.captureRisingEdge() { call Interrupt.edge(TRUE); call Interrupt.enable(); return SUCCESS; } async command error_t IRQ.captureFallingEdge() { // falling edge comes when the IRQ_STATUS register of the RF230 is read return FAIL; } async command void IRQ.disable() { call Interrupt.disable(); } async event void Timer.overflow() {} /*async command mcu_power_t lowestState() { if enabled // how to do this? return ATM128_POWER_IDLE else // how to do this? return ATM128_POWER_DOWN }*/ } ------------------------------------------------- thanks CL [Quoted text hidden] -- Rgds CL Janos Sallai <[email protected]> Fri, Sep 10, 2010 at 5:30 PM To: C L <[email protected]> Cc: tinyos <[email protected]> Yes. You need a boolean variable "enabled" that gets set in IRQ.captureRisingEdge() and cleared in IRQ.disable(). Janos [Quoted text hidden] C L <[email protected]> Tue, Sep 21, 2010 at 9:55 AM To: Janos Sallai <[email protected]> that was silly of me not to see that! i changed it accordingly. could u pls help me to how/what to wire McuPowerOverride.nc interface in HplRF230C.nc? i don't knwo what component to wire it to. [Quoted text hidden] -- Rgds CL Janos Sallai <[email protected]> Tue, Sep 21, 2010 at 4:24 PM To: C L <[email protected]>, tinyos forum <[email protected]> Please read tep 112 (it's in the doc directory of your TinyOS installation). That should explain everything on MCU power management, including that it is the McuSleepC component that uses the McuPowerOverride interface. Janos [Quoted text hidden] C L <[email protected]> Tue, Sep 21, 2010 at 4:32 PM To: Janos Sallai <[email protected]> Cc: tinyos <[email protected]> i figured it out later and wired it. it's still not possible to switch the radio on and off repetitively. do u know of any updated Meshbean platform code? i'm using an old one from ETZ (http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/ethz/meshbean900/). [Quoted text hidden] -- Rgds CL Miklos Maroti <[email protected]> Tue, Sep 21, 2010 at 9:03 PM To: C L <[email protected]> Cc: Janos Sallai <[email protected]>, tinyos <[email protected]> Hi! If I know correctly, then the MCU can run from the 4MHz clock provided by the RF230. Make sure that your MCU is running on its internal RC oscillator. Also you can add a dummy task that repeatively posts itself to make sure that the MCU never goes to sleep. Please try with this hack to see if it fixes your problem. Also, can you give a description of what do you observe? Best, Miklos [Quoted text hidden] C L <[email protected]> Mon, Nov 8, 2010 at 3:26 PM To: Miklos Maroti <[email protected]> Cc: Janos Sallai <[email protected]> hello guys i'm back at working on meshnectics radio issue. my app: Oscilloscope app in TOS/apps runs without stopping the radio. i changed it a little to check if the radio (rf230) can be switched on and off repetetively. the file OscilloscopeC.nc is attached. sample time is set at 500 ms, so the Oscilloscope.h is also attached. i sample an externally attached sensirion temperature sensor (sht75). my observation: 1. led2 ON (radio started - OK) 2. led0 blinks 5 times (10 temp measurements taken - OK) 3. led1 ON (data sent - OK) 4. led2 OFF (radio power down - OK) 5. ...delay to see on off nature of radio... 6. led2 ON (radio powered up again - OK) 7. led0 blinks ONE more time 8. system halts! after the radio is powered on -> off -> on, system hangs. actually, the it should keep taking temp measurements. but, it takes only two more measurements! any help would be great. thanks! CL [Quoted text hidden] -- Rgds CL 2 attachments Oscilloscope.h 1K OscilloscopeC.nc 4K Janos Sallai <[email protected]> Mon, Nov 8, 2010 at 8:33 PM To: C L <[email protected]> Cc: Miklos Maroti <[email protected]> Base on the code you sent it's hard to tell what the problem is, since this is just the application level code. Have you checked if radio sleep/resume works if you keep the MCU continuously awake (e.g. by continuously reposting a task, or by using McuPowerOverride)? Janos [Quoted text hidden] C L <[email protected]> Wed, Nov 10, 2010 at 2:36 PM To: Janos Sallai <[email protected]> Cc: Miklos Maroti <[email protected]> i tried reposting a dummy task with the previous app i used. the results were similar. then, to make is simpler i wrote a simple app which switched on the radio for two seconds, transmit a message, and stops the radio for two seconds. this repeats. this app has no reposting tasks, nor has it McuPowerOverride. FUNNY thing is it works! i don't know how! if u see a reason for this, pls let me know. thanks! PS. i implemented McuPowerOverride according to an earlier post by u: ---------- The best workaround is to change tos/platforms/zigbit/chips/ rf2xx/HplRf230P such that it provides McuPowerOverride, and McuPowerOverride.lowestState() returns ATM128_POWER_IDLE if the interrupt is enabled, or ATM128_POWER_DOWN if the interrupt is disabled. You know that the interrupt is enabled after IRQ.captureRisingEdge() called, and it is disabled after IRQ.disable(). You'll need to maintain this state in the module. ---------- u also told me that IRQ pin of the rf230 radio is not useful as it is connected to a pin on the MCU that doesn't respond. i that case, can u tell me how the above is useful? thanks. [Quoted text hidden] -- Rgds CL C L <[email protected]> Wed, Nov 10, 2010 at 2:50 PM To: Janos Sallai <[email protected]> Cc: Miklos Maroti <[email protected]> simple app is attached this time! [Quoted text hidden] -- Rgds CL RadioOnOffC.nc 2K C L <[email protected]> Thu, Nov 11, 2010 at 11:52 AM To: Janos Sallai <[email protected]> Cc: Miklos Maroti <[email protected]> guys, everything works fine now, and the issue was that i made a mistake changing the HplRF230P.nc (which i did long time ago according to ur advice). AND, somehow after a CVS update, my file had funny characters which had rendered it useless! don't know how that happened. thanks a lot for ur patience. adios. [Quoted text hidden] -- Rgds CL Miklos Maroti <[email protected]> Thu, Nov 11, 2010 at 1:16 PM To: C L <[email protected]> Cc: Janos Sallai <[email protected]> I am happy that you could resole this issue. Best, Miklos
HplRF230P.nc
Description: Cdf file
RadioApp.tar
Description: Unix tar archive
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
