Hi all
I want to give feedback here.
Today i tried to build a orange pi gateway with a connected usb - rs485 converter on it. And what should I say - It worked without problems. Many thanks to you all
Great
Hi all
I want to give feedback here.
Today i tried to build a orange pi gateway with a connected usb - rs485 converter on it. And what should I say - It worked without problems. Many thanks to you all
Great
Hi all
I want to give feedback here.
Today i tried to build a orange pi gateway with a connected usb - rs485 converter on it. And what should I say - It worked without problems. Many thanks to you all
Great
@tboha said in RS485 Gateway with Nano and ENC28J60:
@hausinger
Yes, there is somebody - me.
Just like magic - I switched back from my W5100 GW to ENC28J60 GW for testing purposes --- and it is working .
Maybe because the node entries in the database were populated by the W5100 GW? I don't know.
I have not changed anything within the GW software or hardware.
So I still think it's a MysController setup issue. Maybe you will succeed using a serial GW for a short time to "initiate" MysController database and then switch to ENC28J60 GW ?? (I haven't tested adding new nodes...)
hi @tboha
thank you for your testing and your answers here.
I tried it with a serial gateway (it work in myscontroller). Then i tried it with the nano and enc28j60, but still "connection refused".
Than i tried to build a orange pi gatway and i can connect it with myscontroller. so there is a problem on the nano + enc28j60 + rs485 (maybe altsoftserial??)
I also tried the enc28j60 module with a simple hello world scetch to make sure that it is working fine. And yes, it worked. So the module is ok.
I don't know, how to solve this problem
@tboha
Thank you for your fast answer. I tried do dowgngrade to board version v1.6.11, now i didn't have reboots on the gateway => Great
But i still have a problem.
I can't connect the MYSController with the gateway.
My gateway fully start and write me the ip adress. If i connect a node through rs485 with it, i can see the messages in the serial monitor of the gateway. But if i want to connect the MYSController (on my windows pc) with the correct ip, i get this after some seconds (without output) : "Error on connect: connection refused"
Hello community.
I wanted to build a Gateway with a Nano, a Max485 module and a ENC28J60 network module.
I tried the ENC28J60 Gateway sketch with the changes to the rs485 transport, but there is a problem
If i start the gateway it looks ok, if i start a node (connected through rs485 to my controller) it seems, that the nano reboots everytime if a message is received. I can't connect to the gateway with the "mysController".
I think there is a problem with UIPEthernet and altsoftserial. Maybe someone have a idea to solve that?
UIPEthernet uses pin 10. Altsoftserial uses the same timer for this pin (so pwm is not possible on pin 10). Maybe this is the problem?
Hope you can help me.
Thank you
Best regards
@marceloaqno said:
@hausinger That shouldn't happen (gateway quitting itself). Could you submit the debug log with MY_DEBUG_VERBOSE_RF24 enabled?
Yes i can check that, but how?
I tried it to enable it in "example_linux" => mysgw.cpp (added the line "#define MY_DEBUG_VERBOSE_RF24")
I also tried it in the file: "MyConfig.h" (also added the line "#define MY_DEBUG_VERBOSE_RF24")
But my output is still the same in the console.
@jirm said:
Of course you dont need any SPI bus.
And so sorry but before I checked so badly the error you posted.Not seems any related working error for mysgw. I think you have mysgw working fine, seems only they can not connect/work with sensor node.
You seems only need check node communication and adjust node configuration to have your mysgw working.
I don't see you found so much trouble to make working from usb-rs485 adapter if you can do it with usb/serial node, it's only matter that the driver of adapter can work with mysgw without so much issues.
Regards
Thank you for your fast answer.
I try to answer it as best as I can.
I tried it once again:
connected the arduino to the USB port on my OPI
DMESG says it is port ttyUSB0
If i start the Gateway with:
sudo ./bin/mysgw -d
I got the same result as posted before. My CPU Usage is at 100% on one core.
if I kill the process of mysgw and start openhab2 (my used controller) it can connect direct to the Arduino (connected as USB as before) and it worked fine.
So my configuration of my nodes (currently only 1 for testing) is working fine through rs485.
Summary:
Connection node -> Arduino Gateway = OK
Connetion from openhab2 to Arduino Gateway = OK (openhab2 on same OPI as Arduino)
OPI as a Ethernet - Serial Gateway = NOT OK, Problem is shown on my screenshot.
USB-RS485:
I also tried this, but after my configuration:
./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
I can do the "make" command.
After that I start it with:
sudo ./bin/mysgw -d
I only get this:
I can now type a new command in the console (Gateway quit itself)
@jirm said:
Hi again to all OPI users.
I like see that are great movements here.
I think main goal here is achieve that OPI board can run mysensors for herself connected radio boards.
Of course that can work OPI (or any board) if we attach over some port the radio board, because use of any "conventional" port (means usb, serial, eth) is the same for any hardware from the software view.Said this, I would simplificate (and reduce all hardware to minimum) all things I can and with a powerful board I can concentrate much of the roles needed.
Attach directly (means through GPIO) all hardware the board can manage without issues is my goal, and I think other much people.I think the error posted @hausinger for run mysgw seems derived from de main problem we see when try compile mysensors on OPI, and is that the need (maybe although not always necessary) that SPIDEV driver are up and working properly and mysensors software can not detect SPI bus (then fail SPIDEV) on OPI while is not being adapted all software stuff from some mysensor coder.
I hope some mysensors coder hear our call and soon can help here.
Regards
In my case, why should it be necessary to have a working spi bus? I wanted to connect a working arduino with the mysensors gw scetch on it throug USB to the OPI and use this as a ethernet gateway.
My last goal is to use a USB to RS485 converter on my OPI (works as a Gateway) without a connected arduino, because my whole mysensors communication should be over RS485.
@pansen said:
@hausinger: try to change
./configure --my-gateway=serial --my-serial-port=/dev/USB0 --my-serial-baudrate=115200
to
./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200Be aware that USB devices are enumerated in the order they have been plugged in, so you cannot rely 100% on the arduino being "0".
@mihai-aldea: haha I didn't even consider this. are there any disadvantages except for the increased power consumption? (and slightly higher cost)
ooh sorry. Sure, i wrote "ttyUSB0". It was a typing mistake here on the forum. In my configuration I already typed ttyUSB0
I edited my last post.
But the issue is still the same.
I'm using a orangepi one and with your help I can compile it.
I tried it with a serial gateway. I connected a arduino nano with the gateway serial scath on it through USB to my orangepi one. DMESG say to me, that it is attached to ttyUSB0
So i tried to build the gateway with:
./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200
make has no errors
after that, i tried to start it with:
sudo ./bin/mysgw -d
Is started but i get this problem:
(
Do you know whats wrong with it?
@aand said:
@hausinger -- are you running armbian on your orange pi one?
Yes, I'm running on armbian on my orange pi one