CC: Tweaked

CC: Tweaked

57M Downloads

Peripheral API ignores peripherals connected via non-adjacent modem

osmarks opened this issue ยท 3 comments

commented

If you have a modem on a peripheral network exposing some peripherals only accessible by callRemote etc. on that modem, and it's not adjacent to a computer, the peripheral API entirely ignores the peripherals connected to it - you can only access them by using callRemote on that modem, and can't directly peripheral.call or wrap them.

I don't think this comes up in CC on its own, but there appears to be some OpenComputers integration involving being able to remotely call OC peripherals via its Relay, which acts as a CC modem making available some peripherals. If a Relay is placed directly beside a computer its connected peripherals are detected and work fine, but if it's further away and connected by networking cable it itself will be detected but peripherals connected to it won't.

commented

Can you provide some screenshots and/or example code? I'm really struggling to visualise what you're describing here.

commented

I was worried about that. Here are some screenshots, then.

Here, a peripheral is connected via a modem directly beside the computer. It works fine, you can wrap it directly, etc.

2018-12-30_16 46 10
2018-12-30_16 46 12

But if I have a modem only connected to the computer via another modem, you can't - you can wrap the modem itself and call its functions, but the stuff connected to it's not available.

2018-12-30_16 46 17
2018-12-30_16 46 14

commented

I'm labelling this as wontfix for now, as we don't support modem-chaining (linking one wired modem to another), as it introduces all sorts of complications with networking.

I guess an alternative here would be to allow mixing OC and CC networks together, so you don't need the wired modem there at all - the cable connects directly to an OC modem.