1.1.0-snapshot, still having problems...
jkandasa last edited by
@skywatch Do you have ESP8266 module? If yes you may give a try for WiFi/MQTT.
I now have made a new build of this. New arduino pro-mini (3.3v 8MHz), rf24 PA/LNA soldered to pro mini. Brand new 32Gb Sandisk SD card flahsed with latest raspbian (updated and upgraded) - Latest mycontroller 1.1.0-SNAPSHOT - Latest mysensors 2.2.0-rc.1 ......The result?
Now I can't see any nodes at all! - I have tried to think what might be happening here.
If I attach the arduino gw to the laptop and check in serial monitor I see data arriving from the sensors, so that looks to be working. But when I attach it to the pi I get nothing.
MYC shows the gw serial connection as 'connected successfully', so where/what am I missing here?
In raspi-config I selected serial = on ; serial console = off. I think thats right....?
So the story continues..... since the promini does not have a USB port, how is it connected to the PI?
What is the output of:
stty < /dev/<YOUR-DEVICE-FILE>
Change <YOUR-DEVICE-FILE> with the device file you are using....
It might be that it is set to 9600baud, while mysensors talks at 115200baud...
pi@HAMASS:~ $ stty < /dev/serial1 -bash: /dev/serial1: Device or resource busy
Connection is from pi serial port to promini serial port. That's how it has been since I had to abandon the radio attached directly to pi version. I also added a brnad new raspberry pi 3 today as well....so eliminating hardware as much as possible.....
I have even taken one node and cleared the eeprom and reflashed with the sketch and still I get gw connected but no nodes showing. This is driving me nuts!
jkandasa last edited by
@skywatch Can you try
puttyor some other tool to monitor serial port on your Raspberry PI?
Prior to running the stty command, did you stop mycontroller?
The reason that you do not see any data comming in is most probably due to the fact that mycontroller locked the port...
If you do not see anydata comming in it might be that mycontroller is listening at the wrong baud rate, are you using 115200 baud in mycontroller for your gateway?
This is my setup:
@JK - I will try this when I work it out how to do it!
@tag - Ahhh....why didn't you say 'stop myc then run this' in the first place Haha....you got me on that one
Here is the output without myc running
pi@HAMASS:~ $ sudo stty < /dev/serial1 speed 38400 baud; line = 15; min = 0; time = 0; -brkint -icrnl -imaxbel -opost -isig -icanon -iexten -echo
This matches the set up on myc gw page..... and confirmed when connecting gw to laptop with usb adapter. Does it help at all? I am still baffled by this!
can you try to change the baudrate on your GW in mycontroller to 115200, this is the speed that mysensors on your promini is using by default.... see here (unless you changed it manually in your GW sketch)
You also want to make sure you are using the corect speed setting for /dev/serial1 and need to change the speed setting for /dev/serial1 to 115200 baud (see the command below)
stty -F /dev/serial1 115200
Then you know that the speed on your arduino GW, /dev/serial and mysensors controller gateway are the same. and things should start to work.....
Thanks for trying to help, but that would go in the wrong direction I think. I can connect the gw to the laptop and get good data at 38400 baud rate.
If you look at the mysensors gateway sketch it shows an #ifdef line for 3.3v 8MHz pro-mini to default to 38400 baud rate. Also, it was working last week like this, that is what is really puzzling me. I have swapped out rpi3, arduino, SD card, radio and cables. Things have just got worse.
The more I try to make things better, the worse they get (applies to every aspect of my life !!!)
With the festive season rapidly approaching I am getting pressed on time for this. I'll try and get time to think about this more tomorrow, but have other tasks that need to be done too.... I just thought that I still have the 'old' sd card - maybe I will try that and see.....
Oops, was not aware that 8mhz defaults to 38400 baud.... never too old te learn!
Something must claim /dev/serial1 before you start mycontroller...
in the meantime I will see what i can figyre out from a linux perspective.
Thank you both for not giving up on this - a little moral support and encouragement is very welcome during testing times!
The 'old' SD card worked first time, so that eliminated HW issues. Then I looked into the config and saw that it was using 'serial0' - I think I got 'serial1' on the new build as it would not connect on serial0 when I first tried it, but would connect to serial1 - that was before I realised I had to enable serial on the pi to work and never thought about again after that. Doh! ...... As you say, never too old to learn (but often feels like it!)....
Can I suggest that setting up serial port on pi is included in the instructions to save this happening in the future. User only needs to go raspi-config and turn on serial and turn off console. That might save some people in the future having this or similar issues.....
good work!!, even for "old" guys like us!
Thanks! - Nice to get back working agian....
even for "old" guys like us!
Speak for yourself!
What really puzzeled me was the fact that the gateway connected on serial1 - I didn't really give it much thought (like a usb taking a different com port for programming an arduino).....
But today I got more into the issue and it turns out that with the raspberry pi 3, bluetooth and wifi seems to be enabled by default. There is no option in raspi-config to change this either (despite Eben saying there would be last year)!....
So in this case it appears that the MYC was connecting to the bluetooth serial port on serial1 - no wonder I got no data and that also explains how it could connect to the wrong port......
I have now disabled wifi and BT in config.txt and so far so good.....No errors in the MYC logs and no java errors yet either..... I am currently hopeful for this build!
As you say - never too old to learn!
8 Days and looking good - no errors, no crashes. Just a couple of nodes that misbehave sometimes......
On that note, today I noticed one node had not sent data for many hours and when I got to it, the led connected to pin 13 was rapidly flashing. This is not normally the case, but I can't spare the laptop to monitor the serial port for a week+ just in case it happens again - any ideas? This was using the standard MYS prog for bmp180 pressure sensor. Running on mains powered 5v pro mini.