PINK internet module setup and testing
Peter Verkaik
Posts: 3,956
Hi,
I received my module a couple of hours ago and have it setup like this:
Pink module:
ip = 10.10.10.71
network mask = 255.255.255.0
gateway = 10.10.10.1
dns = 10.10.10.8
baud = 9600
I connect direcly (using the crossover cable) to my pc network card.
Network card:
ip = 10.10.10.70
network mask = 255.255.255.0
gateway = 10.10.10.1
dns = empty
Everything works.
I have access to the Pink webserver.
I wrote a simple test program to read out the variables.
The values of all variables is NA when it arrived.
The status returns 0x01 which means connected and ready to send email
The post value is 0xFF, indicating no variable has been updated.
I modified Nb_var00 (ram) to PINK using the webbrowser (page VV_show.htm),
I could see the change by reading Nb_var00, but the status never set the update bit
and the post value remains 0xFF. Does the VV_show.htm page not use the POST method?
Also noted, not only the first 20 variables can be written to flash, but also all the
special purpose registers.
regards peter
Post Edited (Peter Verkaik) : 11/7/2005 4:14:21 PM GMT
I received my module a couple of hours ago and have it setup like this:
Pink module:
ip = 10.10.10.71
network mask = 255.255.255.0
gateway = 10.10.10.1
dns = 10.10.10.8
baud = 9600
I connect direcly (using the crossover cable) to my pc network card.
Network card:
ip = 10.10.10.70
network mask = 255.255.255.0
gateway = 10.10.10.1
dns = empty
Everything works.
I have access to the Pink webserver.
I wrote a simple test program to read out the variables.
The values of all variables is NA when it arrived.
The status returns 0x01 which means connected and ready to send email
The post value is 0xFF, indicating no variable has been updated.
I modified Nb_var00 (ram) to PINK using the webbrowser (page VV_show.htm),
I could see the change by reading Nb_var00, but the status never set the update bit
and the post value remains 0xFF. Does the VV_show.htm page not use the POST method?
Also noted, not only the first 20 variables can be written to flash, but also all the
special purpose registers.
regards peter
Post Edited (Peter Verkaik) : 11/7/2005 4:14:21 PM GMT
Comments
Have you played with the telnet debug window?
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
So Peter, what do you think?
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
So the stamp is not informed when a variable is updated via the webbrowser,
only when the stamp updates a variable itself, but then it already knows
the value is updated, so for what purpose is the post register interesting (webpages?)
Example please.
I haven't use telnet yet, but was planning to use it as remote debug window,
replacing the program port for debugging.
regards peter
The manual states at page 10:
Nb_varSV will hold the number of the last variable updated from a web page POST.
Is the manual incorrect regarding Nb_varSV?
regards peter
A webpage updates a variable.
The flag that a variable has been changed is set.
The stamp polls the PINK to see if a variable has been changed.
The PINK responds with the value indicating that a variable HAS changed. (This read clears the flag on the PINK)-
The stamp requests the NUMBER of the variable that was changed.
The PINK responds with that value.
The stamp then requests the value of the register.
Think of the VV page as a debugging helper- changing the variables via that page does not change the flags (except for ready to send email)- Changing a variable via that page will NOT set the variable updated flag....
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
regards peter
When writing variables from the stamp
the following applies:
If writing up to 63 bytes plus CLS (binary 0) then the variable reads
back as 63 bytes plus CLS
If writing 64 bytes plus CLS, then the variable reads back as 64 bytes
plus the contents of the next variable(s) until CLS.
If writing 65 or more bytes plus CLS, then the variable reads·back as 64 bytes
plus the contents of the next variable(s) until CLS.
You must write the CLS character so PINK knows the end of input.
So, when·writing more than 63 bytes, you must then explicitly write to the next variable if more
than 64 bytes, or explicitly clear the next variable if exactly 64 bytes.
If variables are filled up with 64 bytes, reading the variable continues with the next variable
until a CLS is·read.
regards peter
Post Edited (Peter Verkaik) : 11/7/2005 9:02:24 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Must test that when I test the email sending.
regards peter
·
my javelin test file can be found here
http://groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/peripheral/web/
I hope others will post basic stamp tests also.
regards peter
·
It's fun to see people discover the module.
I hope you all get as much enjoyment out of it as I do. I love using the thing.
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
I will post my other javelin test results in this thread
http://forums.parallax.com/showthread.php?p=557005
regards peter
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I wired up the netburner to a Stamp per instructions and connected the netburner via the red cable directly to the ethernet port on the PC. I used the red crossover cable because that is what Peter used. I'm not clear on when to use straight thru and when to use crossover. I think if I take this later and attach it to a port on the router, then I should use the straight thru blue cable, right?
The netburner drew 170 milliamps of current. (I'm obsessive about checking current draw of things). Don't try to run this off of a 9 volt battery for long!
The first time I started the IPsetup utility, all the fields were blank and there was nothing in the "Select a Unit" field. I filled in the fields in exaclty the same way as Peter did, then clicked on close. Still nothing indicated in the "Select a Unit" field.
At that point I became lost. Where do you go on a PC to configure the network card? I'm a Mac guy. If I mess with the configuration, am I going to regret it later when I reconnect the ethernet cable to our office network and nothing works? I looked at a couple of control panels and got that feeling of not knowing at all what I am doing.
So I restarted the IPSetup utility. Now, all the fields have zeros, baud rate is 115200, and the "Select a Unit" field now lists the SB70 as,
SB70[noparse][[/noparse]00-03-F4-01-D3-12] DHCP'd at 0.0.0.0 running Parallax Web
I tried clicking on the "Launch Webpage" button, but that comes up with a "Page cannot be displayed" error at http://0.0.0.0. I then clicked on the "Set" button in IPSetup, and got the following message "You must first select an NDK in the Select a Unit in the tree". Then when I click on the "Search Again" button, the SB70 reappears.
Our office network is set up as DHCP via a router to the internet.
So, I guess the question is, where do I go on a PC to set up a network card in a manner that also allows me to revert to the office network? Would I be better off just plugging in to the router with the blue cable?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
You should try to connect the pink to your router (or switch/hub) with the blue cable,
especially if you only have one network card in your pc.
If you run the ipsetup then, it should find the SB70. (click on search).
regards peter
You have interpreted the cables correctly.· Think of things like an RS-232 and DCE vs. DTE equipment.· While not technically correct, let's go with the analogy.· Your PC and the PINKy are both DTE (or DCE, take your pick).· Routers, hubs and switches, etc. are the opposite.· When you connect any two, if they are different, you use a straight through cable.· If they are the same, you need the cross over cable.· Some newer network gear (switches, routers, hubs, etc.) can do an "auto configure" and can "change genders" as required.
In terms of network setup, you need to get things in a state where they can talk to each other.· There are a bunch of ways to do this, and no right or wrong way (actually, there are a bunch of wrong ways, as you've already found out).
Can you describe your basic network setup where you're working on this?· Is this at home or an office network?· Are you worried about others on your network "seeing" the PINKy?
If this can wait until after 5:00 PM CST, I could maybe help over the phone.· Send me a Private Message if you are interested.
In direct answer to where to set up the network card, you'll need to get to the properties page of the network connection (OS dependant on how to do this), and then got the properties dialog for the TCP/IP protocol.· You'll need to remember/record the settings for your office network, make changes for the PINKy and potentially change back.· Depending on concerns about others seeing the PINKy, and how your office network is setup, you may be better off plugging the PINKy into the router (assuming the PINKy can be set up this way.· I don't have mine yet, and have only glanced at the docs).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
8 + 8 = 10
I can connect fine via the wireless (+ethernet) router. The PINK is hardwired to the router via the blue straight through cable. All the computers in the shop can now connect to the Netburner default page via the DHCP assignment, which happens to be 192.168.0.104, which I found by looking at the status info page in the router config utility.
John, thanks for the explanations. This is a small office setting with one PC and 3 Macs, hooked together via a D-link wireless router. For the initial test I unplugged the PC (which is setup for ethernet connection DHCP to the router) from the office network and did the tests as described in an earlier post.
Now that it is working on the DHCP enabledd router, (which apart my initial miscue was as easy as falling off a log) I think I'll leave it there and proceed with the fun stuff of filling up some variables from the Stamjp and seeing them appear on a web page. I think for any application I might want it to be plugged into the router and exposed to view in so much as the dynamic DHCP allows. But for development, the router is not conveniently lcated and a direct connection to a Mac or PC will be easier to carry around.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Now that the DHCP is all configured, life actually becomes easier if you want to move the PINKy to the PC.
Use the interface to the PINKy and record the address and other information.
Depending on how the PINKy handles the DHCP "lease", you might be all set.· Just move the PINKy from the blue wire to the red wire, plugged into the PC.· They should see each other just fine.· Eventually, the DHCP lease may expire, and then you'd need to move the PINKy back to the router, at least long enough to get the DHCP lease renewed.
If the PINKy doesn't remember and/or hold it's DHCP IP address, move it back to the Blue wire, and let it get the DHCP address again.· Then go in and "hard code" that information (address, gateway, DNS, etc.) into the PINKy.· Now you should be able to move it back and forth between the router and a direct connect to the PC.
Keep in mind, when you are connected directly from the PC to the PINKy, neither will have access to The Internet, or anything else on your local network (unless the PC has another network card or wireless connection).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
8 + 8 = 10
After that, I took the netburner back over to the router, and ran the IPSetup utility on the PC and it was still able to contact the netburner and to read out its current IP settings. I then changed the IP to 192.168.0.120 (which is in the range of values assigned to the router). And pressed "Set", and now the netburner is accessible from all computers on address 192.168.0.120. I wasn't sure what would happen if I assigned it a fixed address within the range assigned to the router, if the router might freak out at not being able to assign the address, but it works.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
The potential problem is that if the address you "hard coded" in is in a range that the router may use as a DHCP address, then there is a risk.· Depending on the dynamics of your network, how real this risk is, or could become, is questionable.· Here is the situation:
_IF_ the address you assigned PINKy is in the range of addresses the router could use for a DHCP address, and _IF_ a new divices is added to the network that uses DHCP, and _IF_ said address is the next address to be assigned (this is not necessarily based on numeric order), then it is possible that the router will assing this address to the new divice.· This is not a good thing, and you would end up with two divices with the same IP address on the same network.
There are a couple ways around this.· First, if you network is not changing, this is not likely to be a problem, and you can safely (relatively) ignore the issue.· If you are concerned, you can either assign a fixed address not in the "DHCP Address Pool", or, if the router supports "reservations", take out a reservation for the PINKy at that address.· This will work because you have the PINKy configured with a "fixed" address, so it will never ask for the DHCP address (and if it does, so what...).· If another device(s) asks for an address, it will never get PINKy's address because it is reserved, and the reservation is for a different device.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
8 + 8 = 10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
If you need any info on networking, I have some, PM me, and I can send you some..
Wikipedia is a great place to find out just about anything.
Bob N9LVU
There are a lot of "ifs" that need to happen before you have a problem. If your network isn't active in terms of new devices coming on line, you should have plenty of time before this becomes an issue. Just wanted you to know what's up in case it does come to bite.
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
8 + 8 = 10
This also applies to the special variables.
The memory map (in order of address)
00 to 99, BM, BI, EV, EC, ES, EF, ET
Writing 64 or more bytes to ET, then ET reads back
as 64 bytes immediately followed by the CLS character.
Wether this is because the ET variable has a hardcoded 0 byte following it, I don't know.
It could be an internal variable that happend to be 0.
Because BM·may be overwritten due to received udp message, the maximum databytes
for an email message, if you use this rollover, is·100*64-1 bytes, the last byte of
variable 99 must be the CLS character to prevent rollover into BM.
regards peter
udp messages to/from the PINK.
The port has been preset to 10000 which is the port PINK uses.
The PINK truncates received udp messages to 63 bytes.
regards peter
Depending on your router Tracy, the DHCP will see that the IP is already being used, and won't try to issue that IP to someone else. (Again that depends, but depending on your equipment, it should be fine.)
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
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