Problem with LGT-RF-Nano



  • I ordered a bunch of LGT-RF-Nano's (v2.0), uploaded a working mysensors sketch (which works on the "standard"RF-Nano), but it doesn't work on the new LGT-RF-Nano.
    The serial output monitor looks like when the serial speed is not set correct, but whatever speed is selected it doesn't work.

    The serial output is one line and looks like this : x⸮x⸮⸮x⸮x⸮x⸮⸮xxx⸮⸮
    If i upload a non mysensors sketch the serial output works fine.

    Anybody some advice on what i can test?



  • Unfortunately I can't help you with this problem, as I'm struggeling with the same issue.
    So I hope someone comes up with a solution.
    Otherwise I've wasted some money...



  • I'm not really familiar with that board, but it looks like it should be capable.

    But I don't see the wiring between the Arduino side and the RF side. Are you sure you set the pins correctly so that the Arduino can communicate with the radio?

    Other than that, I think it would have to be hooked to a scope or logic analyzer to do much more troubleshooting.

    If you don't already have one, you can get a super cheap analyzer here: https://www.aliexpress.com/item/4000364877295.html

    It won't win any prizes for fastest or whatever, but along with the free software sigrok: https://sigrok.org/wiki/Main_Page it can show you what is going on and help to diagnose. You can also capture files and then other people, like me, could help you see what is going on, if you can't figure it out on your own.

    There's a bit of a learning curve with sigrok, but it's not too bad. There are protocol decoders in there and you can play around with the settings to see if you can figure what is going on with those nonsense characters.

    I can't find it now, but at one point I was also seeing weird things on the serial port. Whenever the library is using the serial port, it will switch the speed. Can be really annoying. In your code, you can do this:

    #define MY_BAUD_RATE (115200ul)
    

    and set it to whatever you want. I would suggest having the library use the same speed that you are using in your own code, assuming you are doing anything with the serial port. I also assume you haven't done anything with the number of bits, or the parity bit, right?

    edit: I just found this page: https://github.com/nulllaborg/lgt-rf-nano, which seems to show that the pins are all connected just as MySensors expects them to be, with the exception of no Interrupt Request (IRQ) pin. That can be an issue. In case you haven't seen it, the connections are here: https://www.mysensors.org/build/connect_radio

    Maybe it's not needed if you're careful?
    https://forum.mysensors.org/topic/667/can-i-run-radio-without-irq-on-pin-2-or-have-an-interrupt-on-other-pins-than-2-3/2

    But anyway, even if the radio fails completely, you should still get a serial message about that. So whether it's working or not seems like it's probably at least not causing your current issue. Just something to keep in mind later on if you run into problems after this current one is fixed.



  • Thanks for your reply.
    I will try to get your suggested logic analyzer, as it seems to be a realy good tool for our Arduino projects.

    Nevertheless, currently the mysensors library seems to uses some Atmel328P commands, which are not 100% compatible with the LGT processor.

    So I have to hope, that maybe someone can fix that on the library side...



  • @btmerz Actually someone already did it 🙂
    You can find Mysensors library compatible with LGT8Fxxx here: https://github.com/KooLru/MySensors/tree/LGT8F and short description here: https://koolru.livejournal.com/134201.html? - unfortunately in Russian, so just use google translator.
    I'm using this version of Mysensors library for quite a long time, building several nodes based on LGT8F328P, and it is working stable for years now. Maybe it's worth to merge it with new release of MySensors?



  • Hi Rbonat,

    thanks for your great help.
    I finaly got it to work. After installing the boardmanager from "https://raw.githubusercontent.com/dbuezas/lgt8fx/master/package_lgt8fx_index.json", I got upload errors, due to the wrong upload speed (57600 instead if 115200 baud).

    After changing the value in the board.txt file in the hardware folder I got it to work for my boards.

    Again, many thanks!!



  • @btmerz Your welcome 🙂
    Just for clarification, is it working with standard Mysensors library, or the one I've pointed to?
    I still have some spare LGT8F328P boards, so if the standard library is working with tis board definition, it will help mee too.


Log in to reply
 

Suggested Topics

  • 7
  • 19
  • 13
  • 4
  • 3
  • 1
  • 1
  • 6

76
Online

10.6k
Users

10.9k
Topics

111.3k
Posts