I am trying to get an Arduino Nano running with Autosteer_UDP_v5_6 but I am not able see any activity in AgIO. For debug purposes I have disconnected everything and only have the Arduino Nano connected with a ENC28J60 Ethernet shield v1.0. Ethernet connected to computer. It is powered form USB.
I have tested that the ethernet shield is ok by running a webserver example.
I have tried tag/5.6.34, tag/5.6.33 and tag/5.6.2. When compiling these files I always get alot of varnings but I assume that is normal?
With Autosteer files from 5.6.2 the I get the following error:
Error compiling for board Arduino Nano.
But if I use IMU_UDP_v5_6 or Machine_UDP_v5_6 from 5.6.2 it works and I can see a connection in AgIO.
With the 5.6.33 and 5.6.34 versions of the files I do not get the error when compiling the Autosteer file but neither Autosteer_UDP_, IMU_UDP_ or Machine_UDP_ of these versions manages to connect to AgIO…
I do not know what hardware version the Nano have, there is nothing written on it… How do I find out?
I used the same settings for all the testing and tried it several times back and forth. I get other simple sketches to run so I think the settings are correct.
Board: “Arduino Nano”.
Processor: “ATmega328P (Old Bootloader)” I have tried the other processor options but that dose not work…
That looks fine I thought you may have been using a 3.3 nano. Can you upload the usb ino sucessfully? Is should finish with upload complete with no errors. There is a mod for the enc board that you may have to do to get ethernet working.
I tried a different Nano and ethernetshield but no luck.
I downloaded tag 5.6.2 again and now Autosteer_UDP_v5_6 compiles and uploads without the error, but I still get a bunch of warning messages and no connection to AgIO. Can this be the problem? (Warnings in the bottom)
If I upload IMU_UDP_v5.6, I do get the same warnings but I do get a connection:
5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino: In function ‘void setup()’: 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino:323:35: warning: invalid conversion from 'void ()(uint16_t, uint8_t, uint16_t, uint8_t*, uint16_t) {aka void ()(unsigned int, unsigned char, unsigned int, unsigned char*, unsigned int)}’ to ‘UdpServerCallback {aka void ()(unsigned int, unsigned char, unsigned int, const char*, unsigned int)}’ [-fpermissive]
In file included from 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino:63:0: 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\EtherCard_AOG.h:489:17: note: initializing argument 1 of ‘static void EtherCard::udpServerListenOnPort(UdpServerCallback, uint16_t)’ 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino: In function 'void udpSteerRecv(uint16_t, uint8_t, uint16_t, uint8_t, uint16_t)': 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino:677:93: warning: invalid conversion from 'uint8_t {aka unsigned char}’ to ‘const char*’ [-fpermissive]
In file included from 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino:63:0: 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\EtherCard_AOG.h:445:17: note: initializing argument 1 of 'static void EtherCard::sendUdp(const char, uint8_t, uint16_t, const uint8_t, uint16_t)’ 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino:696:101: warning: invalid conversion from 'uint8_t {aka unsigned char*}’ to ‘const char*’ [-fpermissive]
In file included from 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino:63:0: 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\EtherCard_AOG.h:445:17: note: initializing argument 1 of 'static void EtherCard::sendUdp(const char, uint8_t, uint16_t, const uint8_t, uint16_t)’ 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino:780:115: warning: invalid conversion from 'uint8_t {aka unsigned char*}’ to ‘const char*’ [-fpermissive]
In file included from 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\Autosteer_UDP_v5_6.ino:63:0: 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\EtherCard_AOG.h:445:17: note: initializing argument 1 of 'static void EtherCard::sendUdp(const char, uint8_t, uint16_t, const uint8_t, uint16_t)’ 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\udpserver.cpp: In static member function ‘static bool EtherCard::udpServerHasProcessedPacket(uint16_t)’: 5.6.2\ArduinoModules\UDP\Autosteer_UDP_v5_6\udpserver.cpp:68:22: warning: invalid conversion from 'uint8_t {aka unsigned char}’ to ‘const char*’ [-fpermissive]
hmm not completely, but I think so, I have gotten some ethernet stuff to work… I will try again tomorrow…
At least I managed to get rid of the warning messages. It was the language setting in arduino compiler. when I changed from “Standard” to “English” the warnings disappeared.
If you are using a diferent type of enc28j60 shield. Then check what CS pin is being used. The ino program expect pin d10 on nano.
EDIT : I used an enc28j60 board that connects to nano with wires. The two led at ethernet port did not light up or blink at first. Because 3.3 v supply from nano is not enough. My enc28j60 work now with 3.3v supply from other source.
Hello again, Thanks for the advice I appreciate it. Unfortunately, I have still not found the problem. But to reiterate and sum up where I stand at the moment.
Autosteer_USB_v5_0 works great, but I want to use UDP. Mostly trying with tag 5.6.2, but have also tried with 5.6.33 and 5.6.34.
I have the rip off “nano”/“pro mini”, I am not sure which but I have tried both settings in Arduino IDE and can not se any difference between them.
I have the ENC28J60 ethernet shield. It dose not have the short described in video above.
I have three Nanos and three ethernet shields but they are from the same batches, they all behave the same way so if it is a hardware issue it is a batch problem.
The Ethernet server example I posted above works good and it responds to pings from computer.
Based on the above code I tested and determined that the CS pin is 10.
Both LEDs on ethernet shield blinks as on a normal ethernet outlet.
If I upload IMU_UDP_v5_6 to the Nano, I get a reading in AgIO which I interpret to mean that there is some traffic, but it dose not respond to pings from the computer.
When IMU_UDP_v5_6 or Autosteer_UDP_v5_6 is loaded to the nano there is a lot less blinking but there is some. (with a direct connection between the computer and the nano, the green is solid and yellow makes a short blink every 1-3s.)
I have tried all of this with both the nano and ethenet shield as stand alone and as connected to the WAS and Cyrton (picture in the bottom).
Teensy with F9P and IMU over UDP works great.
I have a dedicated switch for this setup. The computer connect to my home network by normal ethernet cable and to this switch with a ethernet to USB adapter.
Both networks runt at 192.168.1.* but it dose not help to disconnect the home network so I assume thats not an issue…
Unplug the ethernet adapter from the board with the arduino not connected.
Upload the udp steer program to the nano with nothing connected. Make sure its says ok.
Unplug usb from nano
Connect the udp shield. Connect the usb but only for power do not connect anything to the com port. Now plug in the ethernet cable if your steering module shows up.
Even if you have manually set the IPs, set IP in agio and remember to press send.
The shield is blocking nano, if ethernet data is being received during usb comms.
This should work, then plug it into you board.
After this its checking windows firewall setting to make sure agio is being fully let through.
The ethernet adapter could be the problem. My USB eth adapter in some cases give a strange ip, depending on the sequence the system is connected.
I ended up using a wifi router connecting nano by cable to that one and then connect computer by wifi to same router. Router delivets ip address 192.168.1