You mentioned the version number. I have somehow managed to get a very old IDE. Can't remember where I installed it from, but that seems to be the source of evil.
Thank you all again!
You mentioned the version number. I have somehow managed to get a very old IDE. Can't remember where I installed it from, but that seems to be the source of evil.
Thank you all again!
Thank you for the answers! I switched to platformIO and it works like a charm with VS Code on both Linux and Windows.
I was running root only to test if that could fix the problem. I copied the sketches to root home folder. Got the same error while not root. Also, other libraries work as intended. And there isn't a library manager in Linux.
Thank you @mfalkvidd!
I have been busy and had many issues to figure out for myself, but I still can't understand how binding with openHAB works.
How does the information from nRF24 get to openHAB? I have MySensors Binding add-on installed in openHAB.
I would be very grateful if someone could help with this last step. After this my first little sensor will be ready to go live.
An update:
Compilation is successful when using Windows Arduino IDE or VS Code + PlatfromIO on Linux. But as soon as I include <MySensors.h>, the serial monitor output is gibberish (in Windows as well as Linux).
--- Miniterm on /dev/ttyUSB0 9600,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
$␎�d�%��8p��␞( �␙%�
{$�4
Any thoughts?
Another Update:
Changing the baud rate in MyConfig.h to 9600 fixed the gibbersh problem. I have Serial.begin(9600); in my sketch setup.
Hi everyone!
I'm having trouble installing the MySensors library on Linux Mint 18.3 Cinnamon. Tried it dozens of times. Changing names and while root as well. Here's the printout:
In file included from pir_led_v9.ino:8:0:
/root/sketchbook/libraries/MySensors/MySensors.h:83:2: error: #error Hardware abstraction not defined (unsupported platform)
#error Hardware abstraction not defined (unsupported platform)
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:364:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp: In function ‘void RF24_csn(bool)’:
/root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp:50:38: error: ‘hwDigitalWrite’ was not declared in this scope
hwDigitalWrite(MY_RF24_CS_PIN, level);
^
/root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp: In function ‘void RF24_ce(bool)’:
/root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp:56:38: error: ‘hwDigitalWrite’ was not declared in this scope
hwDigitalWrite(MY_RF24_CE_PIN, level);
^
/root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp: In function ‘bool RF24_initialize()’:
/root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp:515:34: error: ‘hwPinMode’ was not declared in this scope
hwPinMode(MY_RF24_CE_PIN, OUTPUT);
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stInitTransition()’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:94:45: error: ‘hwReadConfigBlock’ was not declared in this scope
sizeof(transportConfig_t));
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stInitUpdate()’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:124:45: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSM:INIT:STATID=%" PRIu8 "\n"),(uint8_t)MY_NODE_ID);
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:124:4: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSM:INIT:STATID=%" PRIu8 "\n"),(uint8_t)MY_NODE_ID);
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:128:61: error: ‘hwWriteConfig’ was not declared in this scope
hwWriteConfig(EEPROM_NODE_ID_ADDRESS, (uint8_t)MY_NODE_ID);
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stIDTransition()’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:209:40: error: ‘hwMillis’ was not declared in this scope
_transportToken = (uint8_t)(hwMillis() & 0xFF);
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stUplinkUpdate()’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:261:43: error: ‘hwMillis’ was not declared in this scope
_transportSM.lastUplinkCheck = hwMillis();
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:265:44: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSM:UPL:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:265:4: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSM:UPL:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stReadyTransition()’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:292:40: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSM:READY:ID=%" PRIu8 ",PAR=%" PRIu8 ",DIS=%" PRIu8 "\n"),
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:292:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSM:READY:ID=%" PRIu8 ",PAR=%" PRIu8 ",DIS=%" PRIu8 "\n"),
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stFailureTransition()’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:343:40: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSM:FAIL:CNT=%" PRIu8 "\n"),_transportSM.failureCounter);
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:343:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSM:FAIL:CNT=%" PRIu8 "\n"),_transportSM.failureCounter);
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void transportSwitchSM(transportState_t&)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:374:37: error: ‘hwMillis’ was not declared in this scope
_transportSM.stateEnter = hwMillis(); // save time
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘uint32_t transportTimeInState()’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:379:18: error: ‘hwMillis’ was not declared in this scope
return hwMillis() - _transportSM.stateEnter;
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportWaitUntilReady(uint32_t)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:449:38: error: expected ‘)’ before ‘PRIu32’
TRANSPORT_DEBUG(PSTR("TSF:WUR:MS=%" PRIu32 "\n"), waitingMS); // timeout
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:449:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:WUR:MS=%" PRIu32 "\n"), waitingMS); // timeout
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:450:30: error: ‘hwMillis’ was not declared in this scope
uint32_t enterMS = hwMillis();
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportCheckUplink(bool)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:471:26: error: ‘hwMillis’ was not declared in this scope
if (!force && (hwMillis() - _transportSM.lastUplinkCheck) < MY_TRANSPORT_CHKUPL_INTERVAL_MS) {
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:480:43: error: ‘hwMillis’ was not declared in this scope
_transportSM.lastUplinkCheck = hwMillis();
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:484:44: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSF:CKU:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:484:4: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:CKU:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportAssignNodeID(uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:502:50: error: ‘hwWriteConfig’ was not declared in this scope
hwWriteConfig(EEPROM_NODE_ID_ADDRESS, newNodeId);
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:503:42: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSF:SID:OK,ID=%" PRIu8 "\n"),newNodeId); // Node ID assigned
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:503:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:SID:OK,ID=%" PRIu8 "\n"),newNodeId); // Node ID assigned
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:506:45: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("!TSF:SID:FAIL,ID=%" PRIu8 "\n"),newNodeId); // ID is invalid, cannot assign ID
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:506:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("!TSF:SID:FAIL,ID=%" PRIu8 "\n"),newNodeId); // ID is invalid, cannot assign ID
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportWait(uint32_t, uint8_t, uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:603:36: error: ‘hwMillis’ was not declared in this scope
const uint32_t enterMS = hwMillis();
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘uint8_t transportPingNode(uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:619:44: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSF:PNG:SEND,TO=%" PRIu8 "\n"), targetId);
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:619:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:PNG:SEND,TO=%" PRIu8 "\n"), targetId);
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void transportProcessMessage()’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:667:40: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSF:MSG:READ,%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%" PRIu8 ",t=%"
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:667:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:MSG:READ,%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%" PRIu8 ",t=%"
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:676:41: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("!TSF:MSG:LEN=%" PRIu8 ",EXP=%" PRIu8 "\n"), payloadLength,
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:676:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("!TSF:MSG:LEN=%" PRIu8 ",EXP=%" PRIu8 "\n"), payloadLength,
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:684:42: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("!TSF:MSG:PVER,%" PRIu8 "!=%" PRIu8 "\n"), mGetVersion(_msg),
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:684:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("!TSF:MSG:PVER,%" PRIu8 "!=%" PRIu8 "\n"), mGetVersion(_msg),
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:769:53: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSF:MSG:FPAR OK,ID=%" PRIu8 ",D=%" PRIu8 "\n"), _transportConfig.parentNodeId,
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:769:9: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:MSG:FPAR OK,ID=%" PRIu8 ",D=%" PRIu8 "\n"), _transportConfig.parentNodeId,
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:782:49: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSF:MSG:PINGED,ID=%" PRIu8 ",HP=%" PRIu8 "\n"), sender,
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:782:6: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:MSG:PINGED,ID=%" PRIu8 ",HP=%" PRIu8 "\n"), sender,
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:796:53: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSF:MSG:PONG RECV,HP=%" PRIu8 "\n"),
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:796:7: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:MSG:PONG RECV,HP=%" PRIu8 "\n"),
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:886:21: error: ‘hwMillis’ was not declared in this scope
delay(hwMillis() & 0x3ff);
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportSendWrite(uint8_t, MyMessage&)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1007:42: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("%sTSF:MSG:SEND,%" PRIu8 "-%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%"
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1007:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("%sTSF:MSG:SEND,%" PRIu8 "-%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%"
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void transportSetRoute(uint8_t, uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1071:51: error: ‘hwWriteConfig’ was not declared in this scope
hwWriteConfig(EEPROM_ROUTES_ADDRESS + node, route);
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘uint8_t transportGetRoute(uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1081:52: error: ‘hwReadConfig’ was not declared in this scope
result = hwReadConfig(EEPROM_ROUTES_ADDRESS + node);
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘int16_t transportSignalReport(char)’:
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1180:39: error: expected ‘)’ before ‘PRIu8’
TRANSPORT_DEBUG(PSTR("TSF:SIR:CMD=%" PRIu8 ",VAL=%" PRIu16 "\n"), reportCommand, result);
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1180:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
TRANSPORT_DEBUG(PSTR("TSF:SIR:CMD=%" PRIu8 ",VAL=%" PRIu16 "\n"), reportCommand, result);
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘void _begin()’:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:101:18: error: ‘hwWatchdogReset’ was not declared in this scope
hwWatchdogReset();
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:107:35: error: ‘hwInit’ was not declared in this scope
const bool hwInitResult = hwInit();
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:113:79: error: expected ‘)’ before ‘PRIu8’
CORE_DEBUG(PSTR("MCO:BGN:INIT " MY_NODE_TYPE ",CP=" MY_CAPABILITIES ",REL=%" PRIu8 ",VER="
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:113:2: note: in expansion of macro ‘CORE_DEBUG’
CORE_DEBUG(PSTR("MCO:BGN:INIT " MY_NODE_TYPE ",CP=" MY_CAPABILITIES ",REL=%" PRIu8 ",VER="
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:115:7: error: in argument to unary !
if (!hwInitResult) {
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:139:46: error: ‘hwReadConfigBlock’ was not declared in this scope
sizeof(controllerConfig_t));
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:148:64: error: ‘hwWriteConfig’ was not declared in this scope
hwWriteConfig(EEPROM_PARENT_NODE_ID_ADDRESS, MY_PARENT_NODE_ID);
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:179:42: error: expected ‘)’ before ‘PRIu8’
CORE_DEBUG(PSTR("MCO:BGN:INIT OK,TSP=%" PRIu8 "\n"), isTransportReady() && transportSanityCheck());
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:179:2: note: in expansion of macro ‘CORE_DEBUG’
CORE_DEBUG(PSTR("MCO:BGN:INIT OK,TSP=%" PRIu8 "\n"), isTransportReady() && transportSanityCheck());
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘bool _processInternalCoreMessage()’:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:421:13: error: ‘hwReboot’ was not declared in this scope
hwReboot();
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:427:41: error: expected ‘)’ before ‘PRIu8’
CORE_DEBUG(PSTR("MCO:PIM:NODE REG=%" PRIu8 "\n"), _coreConfig.nodeRegistered); // node registration
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:427:4: note: in expansion of macro ‘CORE_DEBUG’
CORE_DEBUG(PSTR("MCO:PIM:NODE REG=%" PRIu8 "\n"), _coreConfig.nodeRegistered); // node registration
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:434:49: error: ‘hwWriteConfigBlock’ was not declared in this scope
sizeof(controllerConfig_t));
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘void saveState(uint8_t, uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:522:54: error: ‘hwWriteConfig’ was not declared in this scope
hwWriteConfig(EEPROM_LOCAL_CONFIG_ADDRESS+pos, value);
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘uint8_t loadState(uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:526:53: error: ‘hwReadConfig’ was not declared in this scope
return hwReadConfig(EEPROM_LOCAL_CONFIG_ADDRESS+pos);
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘void wait(uint32_t)’:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:532:39: error: ‘hwMillis’ was not declared in this scope
const uint32_t enteringMS = hwMillis();
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘bool wait(uint32_t, uint8_t, uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:540:39: error: ‘hwMillis’ was not declared in this scope
const uint32_t enteringMS = hwMillis();
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘void doYield()’:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:553:18: error: ‘hwWatchdogReset’ was not declared in this scope
hwWatchdogReset();
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:555:8: error: ‘yield’ was not declared in this scope
yield();
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘int8_t _sleep(uint32_t, bool, uint8_t, uint8_t, uint8_t, uint8_t)’:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:565:33: error: expected ‘)’ before ‘PRIu32’
CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 ",SMS=%" PRIu8 ",I1=%" PRIu8 ",M1=%" PRIu8 ",I2=%" PRIu8
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:565:2: note: in expansion of macro ‘CORE_DEBUG’
CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 ",SMS=%" PRIu8 ",I1=%" PRIu8 ",M1=%" PRIu8 ",I2=%" PRIu8
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:585:42: error: ‘hwMillis’ was not declared in this scope
const uint32_t sleepEnterMS = hwMillis();
^
In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
from pir_led_v9.ino:8:
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:595:35: error: expected ‘)’ before ‘PRIu32’
CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 "\n"), sleepingTimeMS);
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:595:4: note: in expansion of macro ‘CORE_DEBUG’
CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 "\n"), sleepingTimeMS);
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:656:34: error: expected ‘)’ before ‘PRIi8’
CORE_DEBUG(PSTR("MCO:SLP:WUP=%" PRIi8 "\n"), result); // sleep wake-up
^
/root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
^
/root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:656:2: note: in expansion of macro ‘CORE_DEBUG’
CORE_DEBUG(PSTR("MCO:SLP:WUP=%" PRIi8 "\n"), result); // sleep wake-up
Thank you in advance!
Hi everyone,
I can't seem to find a straightforward tutorial or just lack some general knowledge on how to set up a network. There are many topics started and so much information that I'm overwhelmed.
I would like to use my Rasberry Pi 2 as a gateway and a controller with nrf24l01 radio connected on the GPIO. I followed the tutorial (https://www.mysensors.org/build/raspberry) and got no errors during the installation, but I can't seem to figure out how to test if the radio is listening for messages. Also, I'm not sure which gateway type should I choose (i guess serial or virtual serial)? I tested some sensors earlier and they communicated with each other successfully (pro minis with nrf24).
Config at the moment:
sudo ./configure --my-gateway=serial --my-rf24-irq-pin=15 --my-rf24-channel=111 --my-transport=rf24
No errors when starting mysgw:
pi@gw:~/MySensors $ sudo ./bin/mysgw
Mar 20 02:30:52 INFO Starting gateway...
Mar 20 02:30:52 INFO Protocol version - 2.3.1
Mar 20 02:30:52 DEBUG MCO:BGN:INIT GW,CP=RNNGL-Q-,REL=255,VER=2.3.1
Mar 20 02:30:52 DEBUG TSF:LRT:OK
Mar 20 02:30:52 DEBUG TSM:INIT
Mar 20 02:30:52 DEBUG TSF:WUR:MS=0
Mar 20 02:30:52 DEBUG TSM:INIT:TSP OK
Mar 20 02:30:52 DEBUG TSM:INIT:GW MODE
Mar 20 02:30:52 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
Mar 20 02:30:52 DEBUG MCO:REG:NOT NEEDED
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.3.1
Mar 20 02:30:52 DEBUG MCO:BGN:STP
Mar 20 02:30:52 DEBUG MCO:BGN:INIT OK,TSP=1
Is this the correct setup the system I'm trying to create? How can I test if the nrf24 is actually working? Probably going to use OpenHAB if that's relevant.
Cheers!
Thank you for quick response!
There are the running processes:
PID TTY STAT TIME COMMAND
1 ? Ss 0:03 /sbin/init splash
2 ? S 0:00 [kthreadd]
3 ? S 0:01 [ksoftirqd/0]
5 ? S< 0:00 [kworker/0:0H]
7 ? S 0:15 [rcu_sched]
8 ? S 0:00 [rcu_bh]
9 ? S 0:00 [migration/0]
10 ? S 0:00 [migration/1]
11 ? S 0:01 [ksoftirqd/1]
13 ? S< 0:00 [kworker/1:0H]
14 ? S 0:00 [migration/2]
15 ? S 0:01 [ksoftirqd/2]
17 ? S< 0:00 [kworker/2:0H]
18 ? S 0:00 [migration/3]
19 ? S 0:02 [ksoftirqd/3]
21 ? S< 0:00 [kworker/3:0H]
22 ? S 0:00 [kdevtmpfs]
23 ? S< 0:00 [netns]
24 ? S< 0:00 [perf]
25 ? S 0:00 [khungtaskd]
26 ? S< 0:00 [writeback]
27 ? S< 0:00 [crypto]
28 ? S< 0:00 [bioset]
29 ? S< 0:00 [kblockd]
30 ? S 0:00 [kworker/0:1]
31 ? S< 0:00 [rpciod]
32 ? S 0:00 [kswapd0]
33 ? S< 0:00 [vmstat]
34 ? S 0:00 [fsnotify_mark]
35 ? S< 0:00 [nfsiod]
44 ? S< 0:00 [kthrotld]
45 ? S< 0:00 [bioset]
46 ? S< 0:00 [bioset]
47 ? S< 0:00 [bioset]
48 ? S< 0:00 [bioset]
49 ? S< 0:00 [bioset]
50 ? S< 0:00 [bioset]
51 ? S< 0:00 [bioset]
52 ? S< 0:00 [bioset]
53 ? S< 0:00 [bioset]
54 ? S< 0:00 [bioset]
55 ? S< 0:00 [bioset]
56 ? S< 0:00 [bioset]
57 ? S< 0:00 [bioset]
58 ? S< 0:00 [bioset]
59 ? S< 0:00 [bioset]
60 ? S< 0:00 [bioset]
61 ? S< 0:00 [bioset]
62 ? S< 0:00 [bioset]
63 ? S< 0:00 [bioset]
64 ? S< 0:00 [bioset]
65 ? S< 0:00 [bioset]
66 ? S< 0:00 [bioset]
67 ? S< 0:00 [bioset]
68 ? S< 0:00 [bioset]
69 ? S< 0:00 [VCHIQ-0]
70 ? S< 0:00 [VCHIQr-0]
71 ? S< 0:00 [VCHIQs-0]
72 ? S< 0:00 [iscsi_eh]
73 ? S< 0:00 [dwc_otg]
75 ? S< 0:00 [DWC Notificatio]
77 ? S 0:00 [VCHIQka-0]
78 ? S< 0:00 [deferwq]
80 ? S< 0:00 [bioset]
81 ? S 0:01 [mmcqd/0]
82 ? S 0:00 [jbd2/mmcblk0p2-]
83 ? S< 0:00 [ext4-rsv-conver]
87 ? S< 0:00 [ipv6_addrconf]
104 ? S< 0:00 [kworker/0:1H]
131 ? Ss 0:06 /lib/systemd/systemd-journald
135 ? Ss 0:00 /lib/systemd/systemd-udevd
283 ? S 0:00 [kworker/2:2]
367 ? Ssl 0:01 /usr/sbin/rsyslogd -n
368 ? Ss 0:00 /usr/sbin/cron -f
370 ? Ss 0:00 avahi-daemon: running [raspberrypi.local]
371 ? Ss 1:51 /usr/local/bin/mysgw
372 ? Ss 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfil
375 ? S 0:00 avahi-daemon: chroot helper
379 ? S< 0:00 [cfg80211]
380 ? Ss 0:00 /sbin/dhcpcd -q -b
405 ? Ss 0:00 /lib/systemd/systemd-logind
414 ? S< 0:00 [kworker/3:1H]
430 ? Ss 0:00 /usr/sbin/sshd -D
437 ? Ss 0:00 /bin/bash /usr/share/openhab2/runtime/bin/karaf server
454 ? Ssl 0:00 /usr/sbin/lightdm
596 ? Ss 0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --so
619 tty7 Ssl+ 0:03 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -no
620 tty1 Ss 0:00 /bin/login -f
621 ? Ss 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111
622 ? Ss+ 0:00 /sbin/agetty --keep-baud 115200 38400 9600 ttyAMA0 vt102
629 ? S< 0:00 [kworker/2:1H]
633 ? Ss 0:00 /lib/systemd/systemd --user
638 ? S 0:00 (sd-pam)
646 tty1 S+ 0:00 -bash
703 ? Sl 0:00 lightdm --session-child 13 16
723 ? Ssl 0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
782 ? Sl 1:53 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc
804 ? Ss 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-sessio
807 ? S 0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager
808 ? Ss 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --sessio
818 ? Sl 0:00 /usr/lib/gvfs/gvfsd
822 ? Sl 0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
823 ? S< 0:00 [kworker/1:1H]
997 ? S 0:01 openbox --config-file /home/pi/.config/openbox/lxde-pi-rc.xml
999 ? Sl 0:00 lxpolkit
1003 ? Sl 0:01 pcmanfm --desktop --profile LXDE-pi
1009 ? Ss 0:00 /usr/bin/ssh-agent -s
1018 ? Ssl 0:00 /usr/lib/policykit-1/polkitd --no-debug
1023 ? S 0:00 sh -c zenity --info --text="Your Raspbian system has been upgraded t
1025 ? Sl 0:01 zenity --info --text=Your Raspbian system has been upgraded to the l
1049 ? Sl 0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
1051 ? Ssl 0:00 /usr/lib/udisks2/udisksd --no-debug
1063 ? SNsl 0:00 /usr/lib/rtkit/rtkit-daemon
1073 ? Sl 0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
1077 ? Sl 0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
1083 ? Sl 0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
1089 ? Sl 0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
1091 ? Ss 0:00 /usr/lib/bluetooth/bluetoothd
1104 ? S 0:00 /bin/sh /usr/bin/start-pulseaudio-x11
1105 ? S 0:00 /usr/bin/xprop -root -spy
1121 ? Ssl 0:00 /usr/lib/menu-cache/menu-cached /tmp/.menu-cached-:0-pi
1138 ? Sl 0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
1508 ? S 0:00 [kworker/u8:0]
1523 ? S 0:00 [kworker/1:2]
1556 ? S 0:00 [kworker/3:2]
1641 ? Sl 0:08 lxpanel --profile LXDE-pi
1661 ? S 0:00 [spi0]
1747 ? S 0:00 [kworker/2:0]
1762 ? Ss 0:00 sshd: pi [priv]
1769 ? R 0:00 sshd: pi@pts/0
1771 pts/0 Ss 0:00 -bash
1874 ? Ssl 0:00 /usr/lib/packagekit/packagekitd
1883 ? S 0:00 [kworker/3:1]
2153 ? S 0:00 [kworker/1:0]
2212 ? S 0:00 [kworker/0:0]
2241 ? S 0:00 [kworker/u8:2]
2286 pts/0 R+ 0:00 ps -ax
Hi there!
Just started with my diy home automation project and as was following the https://www.mysensors.org/build/raspberry tutorial.
What I have done so far:
Now, as my sensors haven't arrived yet, I would like to test if I can make the rpi and a adruino mini pro communicate via the radio.
The problem:
pi@raspberrypi:~ $ sudo /usr/local/bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY:ID=0,PAR=0,DIS=0
mysgw: MCO:REG:NOT NEEDED
mysgw: bind: Address already in use
mysgw: Failed to bind!
mysgw: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1
mysgw: accept: Bad file descriptor
mysgw: accept: Bad file descriptor
mysgw: accept: Bad file descriptor
...
mysgw: accept: Bad file descriptor
mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
mysgw: !TSF:MSG:LEN,0!=7
mysgw: accept: Bad file descriptor
...
I found what I think is a similar issue here: https://forum.mysensors.org/topic/1598/openhab-2-0-binding/303
But the process was overwhelming for a a beginner at my level.
There probably is a step I am missing, but couldn't locate it.
The problem with all these tutorials is that they tell what to do but don't explain what you are doing and why. If anyone knows any good basic principle "text books" on the subject, please add a link or something.
Regards,
Fipster