sebleedelisle/ofxLaser

Etherdream 3 soft restarting

ErikNatanael opened this issue · 19 comments

Hi!

I'm not sure this is related to the library, but I thought I'd start here. Sometimes, at irregular intervals and frequencies, the Etherdream 3 DAC seems to soft restart and the following messages are posted in the terminal window of the ofxLaser app:

[notice ] response : I command : d

protocol           : 0
light_engine_state : ready 0
playback_state     : idle 0
source             : 0
light_engine_flags : 00000
playback_flags     : 000
source_flags       : 0
buffer_fullness    : 224
point_rate         : 0
point_count        : 15743447

[notice ] sendPrepare()
[notice ] sendBegin()

The visual result is ~one black frame every time it restarts, sometimes also with a dot at the top left corner of the laser. Any idea what might cause it and how to avoid it?

Thanks!

Good idea, I'll give that a go when I get back to my equipment on Monday. Cheers!

Sorry about the late reply, the new networking hardware took a while to arrive. Initial tests show I'm getting way fewer of these with a new router and a shorter cable to the laser as well so it seems to be related at least!

I'm getting similar bugs with an etherdream 2 but they only occur when I run my ofx code in linux, macos seems to work without interruption.

Is the vibe that this is a networking issue?

protocol : 0
When it plays up this is what I get

light_engine_state : ready 0
playback_state : idle 0
source : 0
light_engine_flags : 00000
playback_flags : 011
source_flags : 0
buffer_fullness : 0
point_rate : 0
point_count : 0

[notice ] sendPrepare()
[notice ] sendBegin()

I'm on Linux as well so that's probably one parameter. Some network implementation detail specific to Linux perhaps?

I've tried it with both a manual static ip and with a spare router, currently running with a router

inxi gives
Network:
Network:
Device-1: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: 3.2.6-k
port: efa0 bus ID: 00:1f.6
IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac:

ifconfig config gives
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.100 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::e9e2:cb28:c8e1:6995 prefixlen 64 scopeid 0x20
ether 04:d4:c4:4d:30:2c txqueuelen 1000 (Ethernet)
RX packets 3100681 bytes 247489754 (247.4 MB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 3140337 bytes 688458581 (688.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0x80600000-80620000

I've tried setting it to 99 still resets loads. It's weird, exact same code base seems fine in macos.

Just recompiled basic example and same error persists. I've tried the etherdream wired directly in and static ip and and over router. Lowering the point rate improves things a bit but it still resets just not as often. I've just fitted the saturn 1 galvos and was enjoying flicker free high point rate.

Point rate anything betweeen 45k and 70k seems to give best results, works fine on mac os, anything less seems to flicker when I increase detail even if I fiddle with the speed settings. One thing I'd noticed was in mac install (I'm on a hackintosh) I had internet sharing set from wifi to ethernet but even when I try that in linux it still gives the same errors. I've tried wired direct with manual static ip, wired via router with dhcp and internet sharing and they all seem to give the same problem. I'm starting to wonder if there's something hinky with my mint install ethernet driver.

If you have any tips on how you get best results over ethernet in linux with the ether dream I'm all ears let me know btw, thanks!

It seems that there was in fact an issue with ED3 - there was some junk data in the control flags parameter in the point_data which ED2 didn't seem to have a problem with but with ED3 would instantly disconnect! I'm not sure if that's the issue you were encountering but it certainly caused problems here.

Fixes pushed to main, please test it out and let me know how you get along.

(BTW there is a dangerous bug in the ED3 firmware that is shipped so make sure to update to the latest one on ether-dream.com )

#32

Although it's much improved I think there are still some weird issues affecting ED3. I'm gonna rewrite the ED code from scratch within a month or two. I'm hoping to add the ability to adjust the latency / buffer, and better recognise poor connection quality

Just to let you know I have given the DAC code a major refactor, and ED3 is working very well now. Check out the dev branch if you want to try it out.