PINK: Correct Telnet output and correct CLS
Jared Fry
Posts: 4
I am communicating with a pink ethernet module using a microprocessor (not a stamp though) and am not able to correctly command the PINK. I can see my messgaes come through on the telnet, but am not sure if what I am seeing is actually correct. Could someone provide me with a telnet output that is correct or that corresponds to a sucessful command? Thanks.
This is what I am seeing on Telnet:
Diagnostic display of Stamp to Netburner I/O
type logout to exit the monitoring session
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]!NBO]
Received from stamp:[noparse][[/noparse]W]
Received from stamp:[noparse][[/noparse]0]
Received from stamp:
Received from stamp:[noparse][[/noparse]:]
Received from stamp:
Received from stamp:
... and then it stops there.
Note, I am writing in C. I am assuming that outputing a CLS at the end of the command/message in BASIC is equivalent to a printf("\0") in C. I have not seen anything that confirms this for me though. I am operating at 9600 baud as well.
Thanks,
Jared
This is what I am seeing on Telnet:
Diagnostic display of Stamp to Netburner I/O
type logout to exit the monitoring session
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]!NBO]
Received from stamp:[noparse][[/noparse]W]
Received from stamp:[noparse][[/noparse]0]
Received from stamp:
Received from stamp:[noparse][[/noparse]:]
Received from stamp:
Received from stamp:
... and then it stops there.
Note, I am writing in C. I am assuming that outputing a CLS at the end of the command/message in BASIC is equivalent to a printf("\0") in C. I have not seen anything that confirms this for me though. I am operating at 9600 baud as well.
Thanks,
Jared
Comments
<CLS>
<CLS>
<CLS>
!NBO
W
0
4
:
3
4
It looks like you use !NBOW04:34
however, you should use !NB0W04:23
(use a 0 (zero) after !NB, not a O (capital o))
regards peter
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]!NB0W02:23
but I never get the ending bracket nor any other line to follow (nor a <CLS>). This makes me think that I am not terminating the message/command correctly with teh CLS. If I try and send a UDP message, I get this:
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]<CLS>]
Received from stamp:[noparse][[/noparse]!NB0WBI:192.168.0.101!NB0WBM:Hello Jareds Laptop!NB0SM
Note, some of the variables I noticed have changed when looking at the PINK variables via my browser. For example, variable 2 has in it [noparse][[/noparse]23#???]. My guess is that the #??? is just garbage that got picked up, possibly because of improper termination.
Again, my C code looks like this:
printf("!NB0W02:23\0");
Thanks
Jared
Try printf("!NB0WBI:192.168.0.101%c",(char)0);
this will print the binary 0 after the string.
regards peter
Jared