Shop OBEX P1 Docs P2 Docs Learn Events
PINK internet module setup and testing - Page 2 — Parallax Forums

PINK internet module setup and testing

2»

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-09 17:55
    Tracy,
    Here is the utility I used to monitor the bridge connection.
    http://www.ethereal.com/distribution/win32/

    Even if the pink tries to send an udp message to the machine it directly connects to,
    it first goes to the router, and from the router it goes to the machine. That's how
    I found out my email messages were sent even though I didn't receive them at first.

    If you install ethereal and run it, look for UDP and SMTP protocol packets.

    Go here for other platforms than windows.
    http://www.ethereal.com/download.html

    regards peter


    Post Edited (Peter Verkaik) : 11/9/2005 5:59:26 PM GMT
  • GearHeadGearHead Posts: 23
    edited 2005-11-09 18:29
    Tracy,

    If you want to get to the PINK from the internet, you'll need to setup Port Forwarding on your router. On a D-Link, I believe it's under the advanced tab. If you already have a system using Port 80, you'll have to assign another port like 81 or 8080 or something like that.

    A bridged connection is the same as internet connection sharing.
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-11-09 18:36
    Ok, first a few things-

    Since we are talking about networked devices here, be careful when using MAC vs. Mac. In general, Mac should refer to the computer brand, MAC is the hardware MAC address, which you can see on your PINK modules on the white sticker. [noparse]:)[/noparse]

    Peter, yes, there is a second serial port on the module. It is not implemented in this version of the firmware. We are working on the ability to remotely update Stamp code (programming of the Stamps)- currently this is vaporware. (I'm just being honest.) That doesn't mean it won't happen, but we are really busy here in Rocklin as of late.

    A bridge is exactly what the name sounds like: a device for connecting two 'segments' or separate networks. Tracy, when you have an internal network, you tend to use a particular address range for the IPs. (You can't have two computers on the internet with the same IP, won't work, no one-to-one mapping there...you need a function...) However you can have a single IP address to the outside world (the internet) that is shared by lots of devices internal to your network. That is what your routers do, they take the traffic from the outside world, and peel down the packets to figure out where internally the data should go internally.

    Other software to check out if you are interested in how the data packets function: SNORT, ETHEREAL, etc....

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-10 14:54
    Trying my udpclient and udpserver tool on another machine

    gave the error Framework .NET v2.0 required

    You can download this runtime package here

    ·http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-12 13:16
    You can view my PINK setup here

    http://62.166.28.248

    regards peter
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2005-11-12 16:12
    Hi Peter,
    Is that being served from the PINK? I see the photo of the nice custom board and the links, but I don't see anything after that that would come from the stuff below the source line,
    <!-- DO NOT CHANGE THE SCRIPTS BELOW, WEB! WILL MALFUNCTION IF YOU DO! -->
    What is "WEB!"?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-12 16:43
    Hi Tracy,

    Yes that is the index.htlml page on the PINK. It only has the picture and two links on it.

    Web! is a cheap and easy "create your own homepage" program. I think there is

    special HTML code that Web! inserts/appends below the line you mentioned. The program

    itself uses drag and drop to insert pictures or text and then you can apply functions

    to these objects (like scrolling text etc.)

    regards peter
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2005-11-12 17:43
    The netburner documents say the SB70 has 512kbytes of flash memory and 2 megabytes of sram. I presume the web pages and the flashable variables and probably some system configuration stuff are stored in the Flash, so 512 kbytes is the limit there. Does that make sense? Room enough for a lot of text as well as a few compressed graphics.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-12 17:50
    The PINK specifies 256KB flash for webpages.

    The remaining is used for variables, the factory pages,

    and other internal uses. No ram amount is specified.

    regards peter
    ·
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2005-11-12 20:33
    Oh, I see that on the Parllax web page at,
    www.parallax.com/detail.asp?product_id=30013
    (where it is said to be ENORMOUSLY popular)

    I was referring to the SB70 data sheet from Netburner at
    www.netburner.com/datasheets/SB70-Datasheet-R1p3.pdf
    www.netburner.com/products/processors/sb70.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-12 20:46
    I think the PINK has special firmware (not the standard SB70 firmware)

    so you don't need the Netburner Development Kit. And the PINK·has the

    AppMod protocol implemented on the serial port which makes it easy to

    connect to the stamp.

    regards peter



    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-14 07:47
    Ryan,

    Can you specify the use of status bits 4 and 5. According to my tests

    status bit4 gets set after sending an email and after status bit2 is cleared (ready to send

    email) again. I use the following test code:

    ······· //setup email variables first
    ······· Format.printf("sending email...");
    ······· do {
    ········· myPink.getStatus();
    ······· } while (!myPink.isReady());· //wait until Pink ready to send email
    ······· myPink.sendEmail();· //send email
    ······· do {
    ········· myPink.getStatus();
    ······· } while (!myPink.isReady()); //wait until Pink is ready again
    ······· Format.printf(" done\n");
    ········myPink.getStatus();· //returns status bit4 is set

    Status bit5·gets set when I send an udp message (from the pc).

    You find the same code in file Pink_sendEmail_test.java located here
    http://groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/peripheral/web/

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-14 09:08
    Ryan,

    Investigating this further, using Telnet I noticed the following:

    When ready to send email I issue the send email command. Telnet says:

    Received from Stamp: [noparse][[/noparse]!NB0SM]
    Setting up to send E-Mail
    Received from Stamp: [noparse][[/noparse]!N] Missformed message
    Received from Stamp: [noparse][[/noparse]B]
    Received from Stamp: [noparse][[/noparse]0]
    Received from Stamp: [noparse][[/noparse]S]
    Received from Stamp: [noparse][[/noparse]T]

    Apparently Pink does not recognize the first getStatus command after sending an email,

    and therefore the command getStatus will timeout, returning errr.TIME_OUT value to my main program.

    Can you confirm this behaviour? Need we a delay between send email command and getStatus command?

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-14 09:39
    Ryan,
    Even a 1 second delay between the send email command and the getStatus command
    does not resolve the error. The fastest way I have found is to force a Missformed message
    by sending '!','X' directly after the send email command.
    Following telnet session illustrates:

    Diagnostic display of Stamp to Netburner I/O
    type logout to exit the monitoring session
    Received from stamp:[noparse][[/noparse]!NB0WEV:smtp.zonnet.nl<CLS>]
    Set Var [noparse][[/noparse]EV] to [noparse][[/noparse]smtp.zonnet.nl]
    Received from stamp:[noparse][[/noparse]!NB0WEC:directly typed text 2<CLS>]
    Set Var [noparse][[/noparse]EC] to [noparse][[/noparse]directly typed text 2]
    Received from stamp:[noparse][[/noparse]!NB0WES[noparse]:p[/noparse]ink email test 2<CLS>]
    Set Var [noparse][[/noparse]ES] to [noparse][[/noparse]pink email test 2]
    Received from stamp:[noparse][[/noparse]!NB0WEF:verkaik6@zonnet.nl<CLS>]
    Set Var [noparse][[/noparse]EF] to [noparse][[/noparse]verkaik6@zonnet.nl]
    Received from stamp:[noparse][[/noparse]!NB0WET[noparse]:p[/noparse]eterverkaik@boselectro.nl<CLS>]
    Set Var [noparse][[/noparse]ET] to [noparse][[/noparse]peterverkaik@boselectro.nl]
    Received from stamp:[noparse][[/noparse]!NB0ST]
    Write Status value = 01
    Sent to Stamp:[noparse][[/noparse]]
    Received from stamp:[noparse][[/noparse]!NB0SM]
    Setting up to send E-Mail
    Received from stamp:[noparse][[/noparse]!X] Missformed message
    Received from stamp:[noparse][[/noparse]!NB0ST]
    Write Status value = 05
    Sent to Stamp:[noparse]/noparse
    Received from stamp:[noparse][[/noparse]!NB0ST]
    Write Status value = 01
    Sent to Stamp:[noparse][[/noparse]]
    Received from stamp:[noparse][[/noparse]!NB0RBM]
    Read Var [noparse]/noparse]BM] value is [noparse][[/noparse
    Send to Stamp:[noparse][[/noparse]<CLS>]
    Received from stamp:[noparse][[/noparse]!NB0RBI]
    Read Var [noparse]/noparse]BI] value is [noparse][[/noparse
    Send to Stamp:[noparse][[/noparse]<CLS>]
    Received from stamp:[noparse][[/noparse]!NB0REV]
    Read Var [noparse][[/noparse]EV] value is [noparse][[/noparse]smtp.zonnet.nl]
    Send to Stamp:[noparse][[/noparse]smtp.zonnet.nl<CLS>]
    Received from stamp:[noparse][[/noparse]!NB0REC]
    Read Var [noparse][[/noparse]EC] value is [noparse][[/noparse]directly typed text 2]
    Send to Stamp:[noparse][[/noparse]directly typed text 2<CLS>]
    Received from stamp:[noparse][[/noparse]!NB0RES]
    Read Var [noparse][[/noparse]ES] value is [noparse][[/noparse]pink email test 2]
    Send to Stamp:[noparse][[/noparse]pink email test 2<CLS>]
    Received from stamp:[noparse][[/noparse]!NB0REF]
    Read Var [noparse][[/noparse]EF] value is [noparse][[/noparse]verkaik6@zonnet.nl]
    Send to Stamp:[noparse][[/noparse]verkaik6@zonnet.nl<CLS>]
    Received from stamp:[noparse][[/noparse]!NB0RET]
    Read Var [noparse][[/noparse]ET] value is [noparse][[/noparse]peterverkaik@boselectro.nl]
    Send to Stamp:[noparse][[/noparse]peterverkaik@boselectro.nl<CLS>]
    Received from stamp:[noparse][[/noparse]!NB0ST]
    Write Status value = 11
    Sent to Stamp:[noparse]/noparse
    Received from stamp:[noparse][[/noparse]!NB0RBM]
    Read Var [noparse]/noparse]BM] value is [noparse][[/noparse
    Send to Stamp:[noparse][[/noparse]<CLS>]
    logout
    GoodBye
    The 1st status read after send email command returns status bit2 set (not ready to send email)
    The 2nd status read after send email command returns status bit2 clear (ready to send email)
    The 3rd status read after send email command returns status bit4 set (manual states received udp message)

    Any idea about this Missformed message behaviour? Neither of the other commands show
    this behaviour.

    regards peter

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-14 10:31
    I have updated the Pink_sendEmail_test.java and Pink.java files here

    http://groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/peripheral/web/

    to resolve the Missformed message error.·Also in Pink_sendEmail_test any timeout is now properly

    handled in the main program.

    regards peter
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-11-14 16:09
    Sorry I just got to this message Peter- I'm looking into it...

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • MarcelMarcel Posts: 32
    edited 2006-09-18 15:19
    Peter Verkaik said...

    Ryan,

    Any thoughts on status bit5 (should be bit4 according to manual)?

    regards peter



    I discovered the same. I see also BIT5 set to·1·when a message arrives, whatever the manual tells.
  • TimCTimC Posts: 77
    edited 2006-09-19 02:43
    All,

    This thread might help since it covers many of the same topics on the PINK

    http://forums.parallax.com/showthread.php?p=568523

    One thing to point out is the MANY flags that get fired when sending an email.

    Regards
    Tim
Sign In or Register to comment.