OpenComputers

OpenComputers

49M Downloads

Racks do not receive modem_message

GalacticArc opened this issue ยท 1 comments

commented

Going to reopen this issue, previously opened #3095 however racks and modem messages appear to be broken again

Version OpenComputers-MC1.12.2-1.7.5.217
(Also tried version 192)

Forge 14.23.5.2855

Reproduction steps:

  1. Setup 3 computers, 1 as a rack.
  2. Put the sending script posted below on one of the normal computers
  3. Put the receiving script posted below on both the rack and the other normal computer
  4. Check the modem_messages being received and see that the rack computer does not receive modem_message events despite being connected

Image of setup:
image

Image of scripts running
image

Rack setup
image

Addon mods:

  • OpenGlasses-MC1.12.2-2.2-53
  • openscreens-1.12.2-1.0.1
  • OpenSecurity-1.12.2-1.0-83
  • ocbookconv-0.1
  • OpenPrinter-1.12.2-0.1.0.15

Receiving script:

local component = require("component")
local computer = require("computer")
local event = require("event")
local args = {...}
local m = component.modem
local num = 0
local term = require("term")
local gpu = component.gpu
local xs,ys = term.getViewport()
m.open(1)
gpu.fill(1, 1, xs, ys, " ")
local lastupdate = computer.uptime()
local frametime = 5
while true do
  local ev, _, from, port, _, message = event.pull(0.1)
  if ev == "modem_message" then
    num=num+1
  end
  if computer.uptime() - lastupdate >= frametime then
    lastupdate = computer.uptime()
    gpu.fill(1, 1, xs, 1, " ")
    gpu.set(1,1, "Receiver")
    gpu.set(1,2,"Packets/s: ".. (num/frametime) .. string.rep(" ",5))
    gpu.set(1,3,"Uptime: ".. computer.uptime() .. string.rep(" ",5))
    num = 0
  end
end

Sending script:

local component = require("component")
local computer = require("computer")
local args = {...}
local m = component.modem
local num = 0
local term = require("term")
local gpu = component.gpu
local xs,ys = term.getViewport()
m.open(1)
gpu.fill(1, 1, xs, ys, " ")
local lastupdate = computer.uptime()
local frametime = 2

while true do
	for i=1,50 do
	  m.broadcast(1, "PING!")
	  num=num+1
	end
  if computer.uptime() - lastupdate >= frametime then
    lastupdate = computer.uptime()
    gpu.fill(1, 1, xs, 1, " ")
    gpu.set(1,1, "Sender")
    gpu.set(1,2,"Packets/s: ".. (num/frametime) .. string.rep(" ",5))
    gpu.set(1,3,"Uptime: ".. computer.uptime() .. string.rep(" ",5))
    num = 0
  end
	os.sleep()
end
commented

I cannot reproduce this bug, latest builds succeed in sending modem messages over relays to rack mounted servers. Here are some things to consider

  1. an internet card (modem component) is required in the machine to send and receive modem_messages through the relay. so your rack mounted server blade will need a network card
  2. the network port in the rack needs to be connected to the relay, the relay does not need to be a component connected to the machine
  3. the relay needs a network card capable of receiving the messages

The pictured attached to this issue appears to satisfy these requirements. It's possible this bug was fixed from a previous build but it definitely does not repro now