Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
KJ_65

How to use "component.modem.send()"

Question

Dear OpenComputer Forum Users,

I tried to send a message with: component.modem.send("2ef", 123, "hallo") and the other Computer didn´t receive a modem_message. 

 

How I tried it:

-Receiving Computer in the lua interface:

component.modem.open(123)

=event.pull("modem_message")

 

-Sending Computer in the lua interface:

component.modem.open(123)

component.modem.send("2ef", 123, "hallo")

 

-Then is saw the switch blinking, but on the of the Receiving Computer didn´t appear a modem_message.

 

For the backround:

I tried it with networkcards and Wireless networkcards and it didn´t work. It worked with: component.modem.broadcast(123, "hallo") and it also worked with linked cards to send, but there is no adress required.

So i think it has something to do with the Adress. So I tried it with the adress of the receiving Computer´s Network card, the network card of the sending computer and the adress of the computer. Even the full adress of the receiving network card didn´t work ( "2efdd118-8039-4bcc-a86f-12e80010a1b7")

So my question is what do i wrong? What could i try else? Or what do i else have to put in the adress slot for sending?

 

Setup:

 

 

Thank you for any help!

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
1 minute ago, Lizzian said:

You need to use the full address with modem.send()

Thank you for respons,

I tried it with the full adress and that also didn´t worked.

So how do i have to use the adress exactly?

Share this post


Link to post
Share on other sites
  • 0
8 minutes ago, KJ_65 said:

Thank you for respons,

I tried it with the full adress and that also didn´t worked.

So how do i have to use the adress exactly?

The first parameter for the send() function should be the modem that you want to receive the message, not the one you're sending from

Share this post


Link to post
Share on other sites
  • 0

Thank you for reply

I used the the adress from the receiving computer. 

You can see the adresses from the receiving computer in the second picture above. and how i used it in the sending computer in the first picture.

I it didn´t worked.

Can you maybe sendme the component.modem.send() function how you would write it for the channel "123" and the data "Hallo World"

Share this post


Link to post
Share on other sites
  • 0
44 minutes ago, Lizzian said:

The first parameter for the send() function should be the modem that you want to receive the message, not the one you're sending from

Thank you for reply

I used the the adress from the receiving computer. 

You can see the adresses from the receiving computer in the second picture above. and how i used it in the sending computer in the first picture.

I it didn´t worked.

Can you maybe sendme the component.modem.send() function how you would write it for the channel "123" and the data "Hallo World"

 

(I forget the quote so i send it again.)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.