This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
KingofGamesYami's profile picture

Communication Problems

Started by KingofGamesYami, 21 July 2016 - 03:58 PM
KingofGamesYami #1
Posted 21 July 2016 - 05: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.
Lupus590 #2
Posted 21 July 2016 - 06: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
KingofGamesYami #3
Posted 21 July 2016 - 06: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.
Lupus590 #4
Posted 21 July 2016 - 06:49 PM
is it possible that blink_message events are not being created?
KingofGamesYami #5
Posted 21 July 2016 - 06: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.
Lupus590 #6
Posted 21 July 2016 - 06: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 on 21 July 2016 - 05:58 PM
KingofGamesYami #7
Posted 21 July 2016 - 10: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 on 22 July 2016 - 12:23 AM