Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sketch stuck in panstamp.radio.setCCregs(); in basicradio sketch
03-18-2017, 02:48 PM
Post: #1
Sketch stuck in panstamp.radio.setCCregs(); in basicradio sketch
I have an AVR 1 panstamp set and panstick. I attempted to setup the basic radio sketch using it as it is. Selected the correct board. I noticed it was never getting to the transmit phase so I added serial print statements per below. It outputs:

0��
Basic Radio
Basic Radio 2
Basic Radio 3
Basic Radio 4
Basic Radio 5
Basic Radio 6

so it's clearly getting stuck at setCCregs. Any thoughts?

void setup()
{
// Setup LED output pin
Serial.begin(38400);
Serial.flush();
Serial.println("");
Serial.println("Basic Radio");
pinMode(LED, OUTPUT);
Serial.println("Basic Radio 2");
digitalWrite(LED, LOW);
Serial.println("Basic Radio 3");


panstamp.radio.setChannel(RFCHANNEL);
Serial.println("Basic Radio 4");

panstamp.radio.setSyncWord(SYNCWORD1, SYNCWORD0);
Serial.println("Basic Radio 5");

panstamp.radio.setDevAddress(SOURCE_ADDR);
Serial.println("Basic Radio 6");

panstamp.radio.setCCregs();
Serial.println("Basic Radio 7");


// Let's disable address check for the current project so that our device
// will receive packets even not addressed to it.
panstamp.radio.disableAddressCheck();
Serial.println("Basic Radio 8");

// Declare RF callback function
panstamp.setPacketRxCallback(rfPacketReceived);
Serial.println("Basic Radio 9");
}
Find all posts by this user
Quote this message in a reply
03-20-2017, 06:39 AM
Post: #2
RE: Sketch stuck in panstamp.radio.setCCregs(); in basicradio sketch
This is weird.

Can you please try with basicbeacon instead of basicradio? Let us know if your modem is able to receive packets from the beacon periodically.

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
03-21-2017, 12:51 PM
Post: #3
RE: Sketch stuck in panstamp.radio.setCCregs(); in basicradio sketch
(03-20-2017 06:39 AM)dberenguer Wrote:  This is weird.

Can you please try with basicbeacon instead of basicradio? Let us know if your modem is able to receive packets from the beacon periodically.

I am not getting packets using basicbeacon and the modem sketch. I followed up and modified it a bit to ensure I'm progressing through the sketch and I noticed that Serial.available is always true in the beginning of the sketch which is odd. I am receiving no packets though but I did throw in a Serial.println("In Loop"); which is repeated in the serial output so it continues.

On the beacon side for debugging I did hook up a relay so I could confirm that it was working without the serial output.
Find all posts by this user
Quote this message in a reply
03-21-2017, 06:31 PM
Post: #4
RE: Sketch stuck in panstamp.radio.setCCregs(); in basicradio sketch
Are you using "basicbeacon" and "modem" unmodified?

Have you a third module to try with?

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
03-22-2017, 05:12 AM
Post: #5
RE: Sketch stuck in panstamp.radio.setCCregs(); in basicradio sketch
(03-21-2017 06:31 PM)dberenguer Wrote:  Are you using "basicbeacon" and "modem" unmodified?

Have you a third module to try with?
Originally tried them unmodified then added Serial.println statements for debugging. I do have other modules I can try but will need to solder the pins on. Just to double check, they should still receive packets without an external antenna attached correct?
Find all posts by this user
Quote this message in a reply
03-22-2017, 06:41 PM
Post: #6
RE: Sketch stuck in panstamp.radio.setCCregs(); in basicradio sketch
(03-22-2017 05:12 AM)mstang1988 Wrote:  Just to double check, they should still receive packets without an external antenna attached correct?

Nope. Please add the antenna!

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)