Jump to content




Communication Problems


  • You cannot reply to this topic
6 replies to this topic

#1 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 21 July 2016 - 04:58 PM

I'm writing an API which, when completed, will verify the identity of the computer sending a message. I've gotten it to the point that all messages are sent, but the receiving computer is not returning the data.

pastebin.

#2 Lupus590

  • Members
  • 2,028 posts
  • LocationUK

Posted 21 July 2016 - 05:19 PM

A few debug tricks for rednet: set up a listener which just prints out everything it hears on the rednet repeater channel (65533)

add debug prints to your code on the receiver, one for "got something" and another for who it thinks the sender is

#3 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 21 July 2016 - 05:23 PM

I have a listener with a max size monitor printing out every message, it shows everything as fine.

I also have a debug print in my code, line 87. That is printing the appropriate information as well.

#4 Lupus590

  • Members
  • 2,028 posts
  • LocationUK

Posted 21 July 2016 - 05:49 PM

is it possible that blink_message events are not being created?

#5 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 21 July 2016 - 05:51 PM

The only way a blink_message event would not be queued is if the verification was wrong.

            elseif message.type == "message" and message.verification == deviceKeys[ message.from ] then
                os.queueEvent( "blink_message", message.body, message.from )
            end

...but I've checked, and the verification should be the same on both computers.


#6 Lupus590

  • Members
  • 2,028 posts
  • LocationUK

Posted 21 July 2016 - 05:59 PM

If you provide some install instructions I'll have a play around and see what I can find.

Just load as and API right?

Edit: just tried replicating what I think is your setup and my listener can't hear any messages listener can hear now, but receiver still gets nothing, strange

Edited by Lupus590, 21 July 2016 - 06:58 PM.


#7 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 21 July 2016 - 09:31 PM

It's loaded as an API, but you'll have to configure some things. For the sender, you need to set the device's secret password through setDeviceKey. For the receiver, you need to call pair with the ID and secret password of the sender.


Edit: This has been solved. I believe the problem was transmission over modem corrupting the key, as it worked after implementing base64 encoding.

Edited by KingofGamesYami, 22 July 2016 - 01:23 AM.






3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users