Author Topic: Pi/Base Moteino problem  (Read 4886 times)

griiker

  • NewMember
  • *
  • Posts: 15
Re: Pi/Base Moteino problem
« Reply #15 on: December 11, 2018, 11:19:11 PM »
Also: How is the moteino connected to the raspberry pi? What pins?

I'm using a USB.  I went into the settings file and changed the serial value setting from "/dev/ttyAMA0" to "/dev/ttyUSB0"

.  I also enabled SSH.

I checked the settings for Node ID, encryption Key, etc and they match where they need to and not where they should not.


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Pi/Base Moteino problem
« Reply #16 on: December 12, 2018, 09:02:23 AM »
"Waiting for socket" means there's another problem.
Check the gateway/logs/gateway.sys.log for errors.

griiker

  • NewMember
  • *
  • Posts: 15
Re: Pi/Base Moteino problem
« Reply #17 on: December 12, 2018, 10:14:13 PM »
Okay:

The waiting for socket problem has been corrected. 

I have reinstalled the Raspberry Pi gateway,  enabled SSH, set the serial to ttyUSB.  and I continue to have the same problem,
 my networking settings are below, so what can I fix?:

For the Moteino connected to the garagemote:


 //**** IMPORTANT RADIO SETTINGS - YOU MUST CHANGE/CONFIGURE TO MATCH YOUR HARDWARE TRANSCEIVER CONFIGURATION! ****
//****************************************************************************************************************
#define GATEWAYID   1
#define NODEID      11
#define NETWORKID   100
//#define FREQUENCY     RF69_433MHZ
//#define FREQUENCY     RF69_868MHZ
#define FREQUENCY       RF69_915MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
#define ENCRYPTKEY      "sampleEncryptKey" //has to be same 16 characters/bytes on all nodes, not more not less!
#define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!


Here are the settings for the moteino connected to the Raspberry Pi:


//****************************************************************************************************************
//**** IMPORTANT RADIO SETTINGS - YOU MUST CHANGE/CONFIGURE TO MATCH YOUR HARDWARE TRANSCEIVER CONFIGURATION! ****
//****************************************************************************************************************
#define NODEID          1 //the ID of this node
#define NETWORKID     100 //the network ID of all nodes this node listens/talks to
#define FREQUENCY     RF69_915MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
#define ENCRYPTKEY    "sampleEncryptKey" //identical 16 characters/bytes on all nodes, not more not less!
#define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
#define ACK_TIME       30  // # of ms to wait for an ack packet


Jason

  • Jr. Member
  • **
  • Posts: 57
Re: Pi/Base Moteino problem
« Reply #18 on: December 13, 2018, 01:21:08 AM »
So you are now past the waiting for socket connection. And now your problem is that the garage moteino isn’t showing up in the gateway app.

Is this correct?

Jason

  • Jr. Member
  • **
  • Posts: 57
Re: Pi/Base Moteino problem
« Reply #19 on: December 13, 2018, 01:26:35 AM »
I was unable to see any problems with your code. It looks properly set up.  Do have the PiGateway code running on your moteino connected to your pi or the Gateway app code?  The correct one is the PiGateway code.

I just checked and the default network ID for the Gateway app is 100 whereas the PiGateway app is 200.  So am am guessing you have the wrong program installed on the moteino connected to the pi.  Note: you can change the network ID to 100 for the PiGateway code.
« Last Edit: December 13, 2018, 01:31:24 AM by Jason »

HeneryH

  • Full Member
  • ***
  • Posts: 229
Re: Pi/Base Moteino problem
« Reply #20 on: December 13, 2018, 07:54:50 AM »
Disconnect the Gateway Mote from the Pi and use the serial port monitor in the Arduino Programmer to check the debug statements coming from the Gateway Mote when you interact with the magnets.  Make sure the two Motes are talking together properly first then move on to the Pi.

griiker

  • NewMember
  • *
  • Posts: 15
Re: Pi/Base Moteino problem
« Reply #21 on: December 13, 2018, 08:24:51 PM »
Thanks for the help thus far.

I've got the PiGateway code loaded onto the moteino connected to the raspberry Pi, and the Gateway app loaded onto the raspberry Pi.I've noticed that when I plug the Pi Moteino into the a power sources, the red LED will blink for approx. 3-5 seconds, then reamian stead for a few seconds and then go out entirely.  isn't it suposed to remain lit?

I'm starting to think this may be a hardware issue, ie. faulty moteino.

Here is what I have set in the PiGateway code:

#define NODEID          1 //the ID of this node
#define NETWORKID     100 //the network ID of all nodes this node listens/talks to
#define FREQUENCY     RF69_915MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
#define ENCRYPTKEY    "sampleEncryptKey" //identical 16 characters/bytes on all nodes, not more not less!
#define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
#define ACK_TIME       30  // # of ms to wait for an ack packet


and here is what I have loaded onto the Garage Mote Moteino:

#define GATEWAYID   1
#define NODEID      2
#define NETWORKID   100
//#define FREQUENCY     RF69_433MHZ
//#define FREQUENCY     RF69_868MHZ
#define FREQUENCY       RF69_915MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
#define ENCRYPTKEY      "sampleEncryptKey" //has to be same 16 characters/bytes on all nodes, not more not less!
#define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!

/

HeneryH

  • Full Member
  • ***
  • Posts: 229
Re: Pi/Base Moteino problem
« Reply #22 on: December 13, 2018, 08:55:17 PM »
Did you try the serial port monitor like I suggested to see the debug statements?

griiker

  • NewMember
  • *
  • Posts: 15
Re: Pi/Base Moteino problem
« Reply #23 on: December 13, 2018, 10:20:47 PM »
yes i've been trying it.

This is what I have been getting when I start the monitor:


Transmitting at 915 Mhz...
SPI Flash Init OK!


and I get nothing when I position the magnets in front of the HED's.  so somehow there is no communication between them.

HeneryH

  • Full Member
  • ***
  • Posts: 229
Re: Pi/Base Moteino problem
« Reply #24 on: December 13, 2018, 11:22:04 PM »
I'll ask only because I made this mistake recently...  are the transceivers the same on the boards?  Look at them and make sure they look the same.  I had one HCW and another CW and didn't realize.


griiker

  • NewMember
  • *
  • Posts: 15
Re: Pi/Base Moteino problem
« Reply #25 on: December 16, 2018, 06:52:20 PM »
They are the same boards, i checked.  The LED on the board connecting to the raspbery pi does not remain lit when plugged into the raspberry Pi,  it comes on flickers a bit then goes out after a few seconds, is this normal?  it leads me to believe that the board itself has a problem.

HeneryH

  • Full Member
  • ***
  • Posts: 229
Re: Pi/Base Moteino problem
« Reply #26 on: December 16, 2018, 07:04:59 PM »
They are the same boards, i checked.  The LED on the board connecting to the raspbery pi does not remain lit when plugged into the raspberry Pi,  it comes on flickers a bit then goes out after a few seconds, is this normal?  it leads me to believe that the board itself has a problem.
You have to read the sketch code, particularly the setup() and loop() function to see what is expected. 

Often at the bottom of the setup() function there are calls to blink() a few times to flash the LED.

There is a #define for enabling the serial debug output.  Make sure debug output is enabled to get enhanced debug info out the serial port.

Report back here with what you get from the serial monitor.
« Last Edit: December 16, 2018, 07:07:00 PM by HeneryH »