I have only an counter running on my water node increasing with each pulse. When counter changed, sending value to controller. Controller evaluates delta between current and last receive and adds delta to "water meter". No problem if either controller or sensor looses power.
Posts made by karlheinz2000
-
RE: Saving last known good state, but not in EEPROM
-
RE: MYSBootloader
No. For RFM69 you need Sensbender bootloader and external flash. Then it works.
-
RE: Compiling for STM32F411
After a bit more searching in the forum a came across this topic:
https://forum.mysensors.org/post/106056
Which mentioned
https://github.com/mysensors/MySensors/pull/1422
and finally found this
https://github.com/WhiskyDelta/MySensors/tree/stm32_cores,
which compiles fine for me. -
Compiling for STM32F411
Hello,
I tried to do some modifications on a project from 2 years ago, which is using STM32F411. During that time everything was fine. No issue to compile for STM32F1/F4 controllers.
Now computer has changed and software was updated and I'm not able to compile STM32F4xx controller any more, STM32F1 is still ok.
I always get:#error Hardware abstraction not defined (unsupported platform) ^
Is there anything I forgot tho change or update for using F4 controllers?
-
RE: [SOLVED] RS485 node with STM32
@virtualmkr thanks for pointing to _serialProcess(). This help to understand a little more how it works.
I finally found the issue: bias resistors (10k) at A and B lost connection, so during bus idle RX was low and not high. For AVR this was not a problem, but STM32 did not synchronize right to the frame. -
[SOLVED] RS485 node with STM32
I try to get a node based on STM32 to work with RS485. No success. Mysensors does send on RS485, but does not receive anything. I checked the signals with scope. Physically TX signals go out and reply from gateway goes into RX pin, but is not read by mysensors lib. I tried all UARTs. Apart from mysensors lib, I'm able to do serial communication with other UARTs than the one used for RS485.
I used F103 and F401/411 with both STM libs (maple, ST) when possible.If I just change the ST chip to AVR it works instantly. So network and GW are not the issue.
Any suggestions what to measure/change?
Node:
898097 TSM:FAIL:RE-INIT 898097 TSM:INIT 900098 THA:INIT 900098 TSM:INIT:TSP OK 900098 TSM:INIT:STATID=100 900100 THA:SAD:ADDR=100 900101 TSF:SID:OK,ID=100 900102 TSM:FPAR 900102 THA:SND:MSG=6464FF020307FF 900133 THA:SND:MSG LEN=7,RES=1 900133 ?TSF:MSG:SEND,100-100-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 904134 !TSM:FPAR:NO REPLY 904134 TSM:FPAR 904134 THA:SND:MSG=6464FF020307FF 904153 THA:SND:MSG LEN=7,RES=1 904153 ?TSF:MSG:SEND,100-100-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 908153 !TSM:FPAR:NO REPLY 908153 TSM:FPAR 908153 THA:SND:MSG=6464FF020307FF 908172 THA:SND:MSG LEN=7,RES=1 908172 ?TSF:MSG:SEND,100-100-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 912173 !TSM:FPAR:NO REPLY 912173 TSM:FPAR 912173 THA:SND:MSG=6464FF020307FF 912191 THA:SND:MSG LEN=7,RES=1 912192 ?TSF:MSG:SEND,100-100-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 916192 !TSM:FPAR:FAIL 916192 TSM:FAIL:CNT=7 916192 TSM:FAIL:DIS 916193 TSF:TDI:TSL
gateway
0;255;3;0;9;26409142 TSF:MSG:READ,100-100-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;26409149 TSF:MSG:BC 0;255;3;0;9;26409152 TSF:MSG:FPAR REQ,ID=100 0;255;3;0;9;26409155 TSF:PNG:SEND,TO=0 0;255;3;0;9;26409159 TSF:CKU:OK 0;255;3;0;9;26409162 TSF:MSG:GWL OK 0;255;3;0;9;26409388 TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 0;255;3;0;9;26413162 TSF:MSG:READ,100-100-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;26413168 TSF:MSG:BC 0;255;3;0;9;26413171 TSF:MSG:FPAR REQ,ID=100 0;255;3;0;9;26413175 TSF:CKU:OK,FCTRL 0;255;3;0;9;26413178 TSF:MSG:GWL OK 0;255;3;0;9;26413325 TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 0;255;3;0;9;26417182 TSF:MSG:READ,100-100-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;26417188 TSF:MSG:BC 0;255;3;0;9;26417191 TSF:MSG:FPAR REQ,ID=100 0;255;3;0;9;26417196 TSF:CKU:OK,FCTRL 0;255;3;0;9;26417199 TSF:MSG:GWL OK 0;255;3;0;9;26417269 TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 0;255;3;0;9;26421201 TSF:MSG:READ,100-100-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;26421209 TSF:MSG:BC 0;255;3;0;9;26421211 TSF:MSG:FPAR REQ,ID=100 0;255;3;0;9;26421215 TSF:CKU:OK,FCTRL 0;255;3;0;9;26421219 TSF:MSG:GWL OK 0;255;3;0;9;26422238 TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
-
RE: Corrupted data from RS485 Sensor Node
RS485 data is different to serial api. Serial api is only from gateway to controller.
Please check links in 1st post.
https://forum.mysensors.org/topic/1947/rs485-rs232-serial-transport-class-for-mysensors-org -
RE: Get STM32 blue pill to run
Yes, no real EERPOM, but emulation in flash. EEPROM failure was the first finding when checking for this error message. Maybe somthing else...
Now complete sketch is ported from AVR ProMini to STM32 and is runnig fine -
RE: Get STM32 blue pill to run
This helped a lot! Got the serial to work. But...
13:29:37.828 -> __ __ ____ 13:29:37.828 -> | \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___ 13:29:37.862 -> | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __| 13:29:37.862 -> | | | | |_| |___| | __/ | | \__ \ _ | | \__ \ 13:29:37.862 -> |_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/ 13:29:37.862 -> |___/ 2.4.0-alpha 13:29:37.862 -> 13:29:37.862 -> 18 MCO:BGN:INIT NODE,CP=RNNNM---,FQ=72,REL=0,VER=2.4.0-alpha 13:29:37.862 -> 29 !MCO:BGN:HW ERR
Looks like these cheap blue pills have some issue with EEPROM?
I later connected a Maple Mini board, which goes straight to "loop" as expected.
-
Get STM32 blue pill to run
I struggle since 2 days to get a node based on STM32 to run. It is my first test with STM32. I installed the arduino libs. I can upload "blink" and this works, serial output also.
But when I include <MySensors.h> the STM seems not to start/run. LED doesn't blink, no output on serial. I would expect some some lib prints on serial, but nothing.
Compile and upload is with no error.
It doesn't matter if radio is connected or not.
Any special things need to be considered for STM32?#define MY_DEBUG //MYSENSOR Lib #define MY_TRANSPORT_WAIT_READY_MS 100 #define MY_NODE_ID 49 // id of the node //#define MY_PARENT_NODE_ID 55 //#define MY_PARENT_NODE_IS_STATIC // ++++++++++++++ NRF24 +++++++++++++++++ #define MY_RADIO_NRF24 // This is needed if you use an STM32 board: #define MY_RF24_CE_PIN PB0 #define MY_DEBUGDEVICE Serial1 #include "MySensors.h" #include <SPI.h> ///////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////// BEFORE //////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void before() { Serial1.begin(115200); Serial1.print("before"); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////// SETUP /////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void setup() { Serial1.begin(115200); Serial1.print("setup"); pinMode(PC13, OUTPUT); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////// LOOP //////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void loop() { digitalWrite(PC13, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(PC13, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
-
RE: ECHO problems when sending with no payload
I've opened an issue for that.
https://github.com/mysensors/MySensors/issues/1452According to API payload is same on ECHO message.
I feel this should be handled/fixed in lib, but I have no idea how to do...
If it is not possible to fix in lib, it shall not be allowed to send message with no payload anymore, which controller has to make sure then.
@rejoe2
Regarding FHEM, at the moment we should keep it as it is. No payload is not the normal use case.
I flashed gateway with 2.2.0 and this fixed the problem for me. -
RE: ECHO problems when sending with no payload
All tests are done with nRF24 radio only.
-
RE: ECHO problems when sending with no payload
Same with ethernet gateway (UNO, W5100)
gateway 2.2.0
10:25:06.047 -> 73634 GWT:RFC:MSG=70;0;1;1;47; 10:25:06.047 -> 73639 TSF:MSG:SEND,0-0-70-70,s=0,c=1,t=47,pt=0,l=0,sg=0,ft=0,st=OK: 10:25:06.088 -> 73652 TSF:MSG:READ,70-70-0,s=0,c=1,t=47,pt=0,l=0,sg=0: 10:25:06.088 -> 73657 TSF:MSG:ACK
MYSController
13.11.2020 10:25:06 TX 70;0;1;1;47; 13.11.2020 10:25:06 RX 70;0;1;1;47;
gateway 2.3.2
10:30:45.718 -> 22546 GWT:RFC:MSG=70;0;1;1;47; 10:30:45.718 -> 22550 TSF:MSG:SEND,0-0-70-70,s=0,c=1,t=47,pt=1,l=1,sg=0,ft=0,st=OK:0 10:30:45.718 -> 22561 TSF:MSG:READ,70-70-0,s=0,c=1,t=47,pt=1,l=1,sg=0:0 10:30:45.718 -> 22566 TSF:MSG:ECHO
MYSController
13.11.2020 10:30:45 TX 70;0;1;1;47; 13.11.2020 10:30:45 RX 70;0;1;1;47;0
Now I have to look for some ESP board...
-
RE: ECHO problems when sending with no payload
I again checked with latest 2.3.2 development lib. Same, ECHO does not work.
You use ethernet gateway, my is serial. This might be the difference...13.11.2020 09:17:20 TX 70;0;1;1;47; 13.11.2020 09:17:20 RX 0;255;3;0;9;10969 TSF:MSG:SEND,0-0-70-70,s=0,c=1,t=47,pt=1,l=1,sg=0,ft=0,st=OK:0 13.11.2020 09:17:20 RX 0;255;3;0;9;10989 TSF:MSG:READ,70-70-0,s=0,c=1,t=47,pt=1,l=1,sg=0:0 13.11.2020 09:17:20 RX 0;255;3;0;9;11008 TSF:MSG:ECHO 13.11.2020 09:17:20 RX 70;0;1;1;47;0
I now try to setup an ethernet gateway just for test.
-
RE: ECHO problems when sending with no payload
Is 2.3.2 running on your GW?
I see different behaviour between 2.3.2 and old 2.2.0.
With 2.3.2 on GW I see ECHO problems, with 2.0.0 everything is fine.
First running a 2.3.2 GW, then switch to a 2.2.0 GW.
The 2.3.2 version is adding a "0", which causes problems.12.11.2020 22:24:11 TX 70;0;1;1;47; 12.11.2020 22:24:11 RX 0;255;3;0;9;41152 TSF:MSG:SEND,0-0-70-70,s=0,c=1,t=47,pt=1,l=1,sg=0,ft=0,st=OK:0 12.11.2020 22:24:11 RX 0;255;3;0;9;41174 TSF:MSG:READ,70-70-0,s=0,c=1,t=47,pt=1,l=1,sg=0:0 12.11.2020 22:24:11 RX 0;255;3;0;9;41192 TSF:MSG:ECHO 12.11.2020 22:24:11 RX 70;0;1;1;47;0 12.11.2020 22:25:10 INFO Disconnected 12.11.2020 22:25:24 INFO Flushing FIFO 12.11.2020 22:25:24 INFO Connected to COM4 12.11.2020 22:25:29 TX 70;0;1;1;47; 12.11.2020 22:25:29 RX 0;255;3;0;9;192065 TSF:MSG:SEND,0-0-70-70,s=0,c=1,t=47,pt=0,l=0,sg=0,ft=0,st=OK: 12.11.2020 22:25:29 RX 0;255;3;0;9;192088 TSF:MSG:READ,70-70-0,s=0,c=1,t=47,pt=0,l=0,sg=0: 12.11.2020 22:25:29 RX 0;255;3;0;9;192106 TSF:MSG:ACK 12.11.2020 22:25:29 RX 70;0;1;1;47;
-
RE: ECHO problems when sending with no payload
@frits, can you please check, if MySController reads correct ECHO from a no payload message? I have some ECHO problems, when sending with no payload. But maybe FHEM related...
-
RE: ECHO problems when sending with no payload
@frits thanks for supporting. This works.
-
RE: ECHO problems when sending with no payload
Debug does not help. According to debug payload is empty "" (or space). When I get the payload in receive() it reads "]".
-
ECHO problems when sending with no payload
I have this LED matrix to display time and text https://forum.mysensors.org/post/102819.
Text is sent from controller (fhem), time is only requested once from node and the runs only on node.
To switch from text to time, controller sends "" (no text). Node checks received data for NULL.strcpy(tempMessage, message.getString()); // copy it in if (tempMessage[0] == NULL) { //time
I didn't use the text option for a long time. Now it does not work anymore.
If controller sends "", node receives "]" and this does not work with NULL.
Did anything change in MySensors?
How can I debug what raw data is received? Maybe some changes on controller side... -
RE: Handling NACKs
@sundberg84 - yes, it's just a 16bit incrementing counter. It counts all NACKs as long as the node is not reset.
Before node goes to sleep, node sends the total number of NACKs. I'm using V_ID for that. Controller (FHEM) calculates then delta NACKs between two sends -> "lost messages". The lost messages are counted day by day separately. So I can easily see when during the day the lost messages rise and can also compare values day by day.
I'm not using presentation that much. For most nodes I configure the controller manually. So I'm more flexible in which variables I can use in which context. -
RE: Handling NACKs
I count in every node, if send() returns false and send the number to controller to get an idea about rf quality.
I do not retry, because Mysensors already retries, right?
I use NFR24 and RFM69. Behavior is sometimes strange. No NACKs for weeks and then a really high number of NACKs for a few days. Setup not changed. I have no idea why... Same for indoor and outdoor sensors. -
RE: What did you build today (Pictures) ?
Another 8x8 matrix based display...
This is not a real project, just a try to hide the LEDs for better WAF.
Print still needs some impovements, but from a little distance you can't see the details.
-
SPLASH_SCREEN with MY_DEBUGDEVICE
The splash screen at startup is not redirected to a new serial port, if MY_DEBUGDEVICE is used. It still comes out of hardware serial(1). Tested on NANO/ProMini with latest mysensor lib. All other debug information comes out of the new defined MY_DEBUGDEVICE.
-
RE: 💬 FOTA (Wireless Programming)
DualOptiboot: if you do your own board layout, always keep the CS signal of the external flash at pin D8. You can change the pin number in your sketch, but not for the bootloader It is hard coded in the bootloader!
In this case the uploaded firmware is written to external flash by the sketch, but the bootloader can not read it and not write it to internal flash. Firmware will never get updated. Took me some time to find out... -
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
The new build runs since several hours with no problems
The old one stoped within 10min. -
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
@tekka I did this already. GW connected to MYSController and to terminal program in parallel via 2 USB2serial adapters. MYSController stops logging, but terminal keeps logging MSGs. So I expect no GW issue. I tried 3 different USB serial adapters with no difference.
-
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
I have problems connecting a serial NRF24 gateway to MYSController b3314. After some minutes working properly, no more messages seem to get received by MYSController. If I disconnect and connect again (button, not USB), it works for about the same time until it stops again.
I put a second USB2serial in parallel and connected a terminal program (hterm). The terminal programm continuously receives messages, even when MYSController stops receiving. So it's no gateway issue.
I tried several different USB2serial adapter with MYSController - no difference.
Any idea how to get MYSController to work continuously ? -
RE: Sleep time and external interrrupts
@mfalkvidd any idea for a (quick and dirty ) workaround? Just copy
ms
inhwInternalSleep
in some global variable? Or will this not work? I'm more in hardware than software... -
RE: Sleep time and external interrrupts
Is it possible to read
ms
fromvoid hwInternalSleep(unsigned long ms) { // Let serial prints finish (debug, log etc) #ifndef MY_DISABLED_SERIAL MY_SERIALDEVICE.flush(); #endif while (!interruptWakeUp() && ms >= 8000) { hwPowerDown(SLEEP_8S); ms -= 8000;
?
mySleepTime - ms
, should be the elapsed sleep time?! -
RE: Sleep time and external interrrupts
No, I have something like this https://www.mysensors.org/build/rain, but try to get it battery powered.
It generates a pulse after a certain amount of rain. -
Sleep time and external interrrupts
I have a sensor to count events (rain sensor). This sensor uses sleeps mode to save power. Any event triggers an external interrupt to wake up the sensor and increment the counter. After an certain time the sensor should send the counter value to the controller.
I useint8_t sleep(int interrupt, int mode, unsigned long ms=0);
to wake up either from external IRQ or timer. But if many events occure, the timer never triggers (and the sensor does not send values to controller).
Is it possible to get the elapsed sleep time, when external IRQ triggers? Then I can calculate/estimate when it's time to send values to controller. -
RE: Debug to a sd-card module?
Another interesting option for debugging: http://jeelabs.org/wp-content/uploads/2015/06/24/ftdi-over-wifi-esp-bridge/index.html
But I did not test this yet. -
RE: Which are the *best* NRF24L01+ modules?
I checked the print and it is different to the cheap ones. But, I got genuine NRF24 chips (just the ICs) from mouser and this print is similar to the cheap ones!!??
Edit:
The print quality of cheap modules is not as good as genuine one and more space between dot and first line.
Genuine parts differ in little dot or square.ITEAD
IC from Mouser
Cheap Ali/ebay
-
RE: [Solved] Multiple messages with same content received
With radios from ITEAD this issue is obsolete. They seem to populate original nordic chips, or even good fakes.
-
RE: Which are the *best* NRF24L01+ modules?
I ordered modules from ITEAD. They seem to have real nordic chips populated. Each module comes in paper box and ESD bag. The modules look like the cheap ebay stuff, but with 0402 components.
With these modules I got rid of my issue with repeated messages.
(https://forum.mysensors.org/topic/5588/multiple-messages-with-same-content-received) -
RE: NRF24 problems with cold temperatures
Same to me. Nodes didn't work below 0°C.
I changed the capacitor at the radio to a new one w/ bigger value (47uF). Now it works...
Some nodes got a tantal cap (10uF) instead, which works good too. -
RE: SmartSleep and FHEM - does it work?
It's not working. FHEM sends messages instantly and does not wait until a node wakes up.
New features unfortunately not supported by FHEM. -
RE: MYSBootloader 1.3pre2 testing
Understood.
But if I'm not using MYSB, I can flash a sketch with defined ID and this will work instantly in the network.
With MYSB I always have to do assign a new ID just to get the node to run the first time after flashing.
Any chance to get MYSB to know, if a sketch is an flash?
And start this sketch, which then will use the defined ID or request a new ID from controller and writes the eeprom? -
RE: MYSBootloader 1.3pre2 testing
Attached the log file from MYSC. After activating AUTO ID the node starts. No other GW active.
No serial output during this time.
Node ID is defined before including .h.Node is flashed via ISP (Dragon) with "...with_bootloader.hex".
-
RE: MYSBootloader 1.3pre2 testing
After flasing a node with ISP (bootloader+sketch) the node will not start since the eeprom is emty (forgot to enable eeprom safe). Node needs to get a ID from controller, even if ID is defined in the sketch. After receiving a ID from controller the node starts and uses the ID from sketch.
Any solution to overcome this? -
RE: [Solved] Multiple messages with same content received
Still same problems. In one msg payload type changed, in other variable type is not defined?!
Is it a problem of (too) cheap/fake radios?
-
RE: [Solved] Multiple messages with same content received
I use NRF24.
Yesterday I received 6 identical msgs in a second; no debug log, but V_ID is a rolling counter, which is sent only one time before sleep.
Topology is: "main" controller running fhem on RPi. MYSC on notebook in parallel (RX only). 6 sensor nodes, one as repeater. 5 nodes directly connected to controller, one via repeater. -
[Solved] Multiple messages with same content received
I use MYSController since a few weeks.
I wonder why I receive messages multiple times? According to debug output its sent only once.
Does the library send more than one time?
I checked with 1.5.x, 2.0.0 and 2.0.1. its all the same.
It is not only one special node or sensor, it happens all over my network (6 different nodes).
Maximum was 5 times same msg. If its more than 2, sometimes content is corrupted.Any idea?
My problem is not the multiples msgs, its the corrupted content some time. -
RE: Windows GUI/Controller for MySensors
How do I get MYSController to save info about each node?
I always have to set "battery-powered" after each upload and it does not save sketch name etc. -
RE: MYSBootloader 1.3pre2 testing
For all who have problems with serial (debug) output using MYSBootloader:
When you burn the 8MHz bootloader, it sets avr fuses to internal 8MHz RC oscillator. This has high tolerance. The serial baudrate was only 108000baud in my case and Arduino IDE did not work.
Setting the fuse to use the external quartz/resonator lead to 111000baud, which was close enough to 115200, to get arduino IDE to read serial data. -
RE: Gateway using ATmega32U4
Update:
Setup still not running as a RS485 GW
No debug info coming out of serial/USB.I flashed a normal NRF serial GW -> works.
I did not define "MY_GATEWAY_SERIAL" -> works as a RS485 node.Any idea why just the RS485 GW feature does not work with 32U4?
-
Gateway using ATmega32U4
Did anyone get a serial gateway with ATmega32U4 to run?
I read about some problems in the past using this chip...
I need a small board with 2 harware serials to run a serial RS485 gateway. A ProMicro board looks nice
Right now my gateway runs on a mega board, but this a little too big -
RE: Analog power meter reading TCRT 5000
I use digital output. The R&C modification works only with digital output.
-
RE: Analog power meter reading TCRT 5000
Most of these cheap boards do not have any hysteresis and tend to oscillate during output switching.
Populate a resistor (100k...330k) for hysteresis and remove a capacitor. I my case this did help.
Unfortunately in German, see the picture:
https://forum.fhem.de/index.php/topic,54408.msg459962.html#msg459962 -
RE: RS485/RS232/Serial transport class for mysensors.org
[Solved]
Initial Problem were incoming messages at sensor node during reading an image from SD card (170ms). Increase of serial RX buffer size solved the problem.Good to know:
The serial buffer size is not defined in:
c:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.h
You can change the numbers with no effect to your sketch.You have to change:
c:\Users...\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino\HardwareSerial.hThen it will work
-
RE: RS485/RS232/Serial transport class for mysensors.org
@LeoDesigner
I did a hardware update. Now sensor and gateway are arduino mega. Everything is running on 115200 hardware serial.
RS485 communication looks good. Data is going into sensor node, but does not appear in MySensors.
I tried to increase RX buffer via #define SERIAL_RX_BUFFER_SIZE 256, with no effect in functionality. Does this define works as expected? Because this buffer size number has no effect on the 'dynamic memory' usage after compiling the sketch. It shows always the same number of used bytes, independent of the RX buffer size. -
RE: RS485/RS232/Serial transport class for mysensors.org
Is any data buffer/FIFO implemented in RS485 gateway?
My controller (fhem) is transmitting data too fast to the gateway, so some data is not transmitted on RS485.
I checked RX/TX from controller to gateway -> all data is going into gateway. But not all data goes out to my sensor node.I have only one sensor (and gateway) on RS485.
Baudrate is 19200 on RS485 and to controller.
Sensor node uses HW serial. Gateway is on NANO with AltSoftSerial. -
RE: RS485/RS232/Serial transport class for mysensors.org
I use a mega with hw-serial and a nano (gateway) with AltSoftSerial.
It works fine the last 24 hours. Still running...
I did not test other configurations. -
RE: RS485/RS232/Serial transport class for mysensors.org
Got it working too
Problem was: RX1 and TX1 labels on the chinese Mega2560 board are swapped.
All other RX/TX labels are right. -
RE: RS485/RS232/Serial transport class for mysensors.org
@Bart
Does it work with serial1 on mega2560?I can't get a single bit out of the harware serial1.
Is it only the smal patch in MyTransportRS485.cpp?