1.1.0-snapshot, still having problems...



  • @skywatch Can you try putty or some other tool to monitor serial port on your Raspberry PI?


  • MOD

    @skywatch

    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:
    0_1511598862237_Screenshot 2017-11-25 at 09.33.24.png



  • @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!


  • MOD

    @skywatch
    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.....



  • @Tag

    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..... 🙂


  • MOD

    @skywatch

    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.



  • Problem solved! 🙂 🙂 🙂

    Thank you both for not giving up on this - a little moral support and encouragement is very welcome during testing times! 🙂

    @Tag
    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!).... 😉

    @jkandasa

    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.....


  • MOD

    @skywatch

    👍 good work!!, even for "old" guys like us! 😉



  • @tag said in 1.1.0-snapshot, still having problems...:

    👍 good work!!,

    Thanks! - Nice to get back working agian....

    @tag said in 1.1.0-snapshot, still having problems...:

    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.


 

Suggested Topics

11
Online

407
Users

371
Topics

2.3k
Posts