Can't connect to the switcher (Ethernet Shield 2) - solved

7 posts / 0 new
Last post
Offline

Location

Solothurn
Switzerland
Joined: 08/04/2017
Posts: 3
Can't connect to the switcher (Ethernet Shield 2) - solved

Hello everyone

I'm actually creating my own Blackmagic ATEM switcher panel based on Skaarhoj scripts and PCBs.

Unfortunately I already struggle at connecting my Arduino to my Blackmagic switcher. Maybe someone already had the same problem as I have.

Thats what I use:

- Arduino MEGA 2560
- Ethernet Shield 2
- Blackmagic Design ATEM Television Studio (1st Generation) or 1 M/E Production Studio 4K
- Gigabit Switch
- MacBook Pro with ATEM Software Control

Thats what I have already tried:

- Tested if the Arduino MEGA 2560 works properly. I connected it to the Skaarhoj Breakout Board and one BI8 board. I got respond of the buttons I solderer on this board. So I guess the Arduino works.

- Used the ATEMmonitor script to test the connection. I changed the MAC address of the Ethernet Shield, the IP of my switcher panel as well as the IP of my switcher in the script. Then I uploaded it to my Arduino. In the Serial Monitor only the text "Serial Started" comes up. The line with AtemSwitcher.connect(); doesn't seem to work. I just wrote a Serial << F("test"); after this line and it won't be shown in the Serial Monitor. If I put it right before AtemSwitcher.connect(); it comes up.

- I even used the ConfigEthernetAddressesExtended script to write down the MAC address of the Ethernet Shield, the IP of my switcher panel as well as the IP of my switcher into EEPROM. This upload into the EEPROM memory was successful. Then I uploaded the Skaarhoj E21TVS script to see if it works but it didn't. Again only "Serial Started" and information about all the addresses that are saved in EEPROM appeared in the Serial Monitor.

- I then bought a new Ethernet Shield, changed the MAC address in the scripts, did the same things again and it didn't work either.

- I also tested it by using the 1 M/E Production Studio 4K. Didn't work as well.

This makes me buffle. I don't know what to next. Buying another Arduino MEGA? It seems to be so easy to connect the Arduino to the switcher. I really don't understand why it doesn't work with my hardware.

If you need any code I can post it here of course.

Sincerely,
nsch24

 

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
Don't Use ATEM examples

Hi,

Try any of the other examples from any of the other ATEM libraries (eg ATEMstd, ATEMext, ATEMmin, ATEMmax), DO NOT use examples from the ATEM library.

To quote Kasper "The library just named "ATEM" on GitHub is the old library and usage of this is discouraged - use ATEMstd instead".  I wish he would just remove the folder as many people starting out have the same issue.

If you're still having issues maybe post your code here.

I hope using one of the other examples works for you! :)

Thanks,

Colin

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Solothurn
Switzerland
Joined: 08/04/2017
Posts: 3
Wrong Ethernet Shield?

Hi Colin

Thank you for your reply.
Now as you mention it I remember by myself to do not use the old ATEM library. Thanks for the reminder!

Maybe I found the problem. I accidentally bought the Arduino Ethernet Shield 2 which comes from Arduino.org (the Ethernet Shield that Skaarhoj is using comes from Arduino.cc). The Ethernet Shield 2 uses the Ethernet2.h library instead of the Ethernet.h library.

I have downloaded the needed Ethernet2 files and copied them into my existing Arduino.cc library. In the ATEMmaxMonitor script I changed Ethernet.h to Ethernet2.h (as recommended in this thread: https://forum.arduino.cc/index.php?topic=353475.0).

But when I do this there comes an error message:
libraries/Ethernet2-master/Dhcp.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/Ethernet/Dhcp.cpp.o (symbol from plugin): In function `DhcpClass::reset_DHCP_lease()':
(.text+0x0): multiple definition of `DhcpClass::getSubnetMask()'
libraries/Ethernet2-master/Dhcp.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/Ethernet/Dhcp.cpp.o (symbol from plugin): In function `DhcpClass::reset_DHCP_lease()':
(.text+0x0): multiple definition of `DhcpClass::getGatewayIp()'
libraries/Ethernet2-master/Dhcp.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/Ethernet/Dhcp.cpp.o (symbol from plugin): In function `DhcpClass::reset_DHCP_lease()':
(.text+0x0): multiple definition of `DhcpClass::getDhcpServerIp()'
 
and so on...
Seems that it has trouble with two existing Ethernet libraries. But I don't know where I can delete the "Ethernet.h" file.
I will continue testing and get back to this thread as soon as I found a solution. But of course I appreciate any help. Otherwise I will have to buy the original Ethernet Shield.

Nicolas

Offline

Location

Solothurn
Switzerland
Joined: 08/04/2017
Posts: 3
Now it works with Ethernet Shield 2

Ok it works now!

Thats what I did to solve the problem:

  1. I have downloaded the Ethernet2 library (https://github.com/adafruit/Ethernet2) and copied it into the library folder where also the ATEM libraries are.
  2. I then have deleted the Ethernet folder in the Arduino IDE library (the library is located in the application folder on a mac. You can open it by right clicking on the Arduino.app file.) Otherwise it has some trouble when there exist multiple files like dhcp.cpp.
  3. In ATEMbase.h I changed the line #include EthernetUdp.h to #include Ethernet2Udp.h.
  4. In my test file (in my case it was the Skaarhoj_E21TVS.ino file in the ATEMstd folder) I changed the line #include Ethernet.h to #include Ethernet2.h.

Thank you for your help.

Regards,
Nicolas

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
Great! I'm glad you got it

Great! I'm glad you got it sorted.  I've always used the w5100 ethernet shields which are cheap and work great.  

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

thos-berlin's picture
Offline

Location

berlin
Germany
Joined: 19/06/2012
Posts: 483
It seems, I have the same

It seems, I have the same problem. After pausing working with Arduino for two years, I bought a Mega and an Ethernet shield at "sainsmart". Compilation without errors, but after calling ATEM.connect the sketch freezes....

I hope, the solution also works for me ...

Thomas  S e e w a l d - thos-berlin (amateur)

thos-berlin's picture
Offline

Location

berlin
Germany
Joined: 19/06/2012
Posts: 483
Update "Same Issue"

So, a small update: I tried an other ethernet shield and it works. But after some minutes, the connection fails and the automatic reconnect, don't work. After manual reset, the sketch works fine again until the next fail some minutes later....

The ATEM can be controlled by laptop. So I suggest the problem caused in Arduino "branch". It may be caused in my network, because the Arduino (currently in the living room) is two switches and one router away from the ATEM (in the attic).

I understand, that the connectiion may fail, but why does the reconnect don't work ? My ATEMstd and ATEMbasic are donloaded at the last weekend....

But the ATEM firmware is an old one (4.x). Should I update the Firmware to solve this issue ?

Thomas  S e e w a l d - thos-berlin (amateur)