Static IP

Things to come.
Post Reply
User avatar
oakbarn
Posts: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Static IP

Post by oakbarn »

Firmware Update:

If a Static IP is set in the System Setting

AND

BCS Fails to connect with 6 cycles (or a time factor)

then revert to DCHP.

Flash Warning in BCS Web Interface that Static IP was not found ( BCS connected but Connection IP not = Static IP).
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: Static IP

Post by brahn »

I'm a little confused about what you're asking for. To try to clarify what I think you're saying I'm going to refer to the firmware in two pieces, the "device" code is what's running the BCS processes, etc. The "client" code is the web application that you use to connect to the BCS. The client talks to the device using the API.

It sounds like you're talking about the client detecting that it can't re-establish connection with the device after a firmware upgrade. You want the client to revert to DHCP. The problem with this is that the DHCP setting only applies to the device, not the client. So if the client can't connect to the device, it can't change the DHCP setting. Does that make sense?

I looked into recreating the BCS Finder code in JavaScript, which would let the client try to detect the new IP address after a firmware update. Unfortunately even with all the really cool stuff they're going with JavaScript these days, there doesn't appear to be any way to send/receive UDP packets from JavaScript so this won't work.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Static IP

Post by JonW »

Isn't there a way to maintain the IP settings between firmware updates? I know on the Atmel processors that I program, I can reserve variable space in the bootloader for persistent values between firmware updates.
User avatar
oakbarn
Posts: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Static IP

Post by oakbarn »

brahn wrote:I'm a little confused about what you're asking for. To try to clarify what I think you're saying I'm going to refer to the firmware in two pieces, the "device" code is what's running the BCS processes, etc. The "client" code is the web application that you use to connect to the BCS. The client talks to the device using the API.

It sounds like you're talking about the client detecting that it can't re-establish connection with the device after a firmware upgrade. You want the client to revert to DHCP. The problem with this is that the DHCP setting only applies to the device, not the client. So if the client can't connect to the device, it can't change the DHCP setting. Does that make sense?

I looked into recreating the BCS Finder code in JavaScript, which would let the client try to detect the new IP address after a firmware update. Unfortunately even with all the really cool stuff they're going with JavaScript these days, there doesn't appear to be any way to send/receive UDP packets from JavaScript so this won't work.
What I was talking about is a specific problem I had. I had connected to Network in Colorado, then came home and connected to my home network. The Static IP that I had assigned in Colorado would not work on my home network as the third octlet was different on the two networks.. I plan to move the BCS between networks. I guess the easy solution is to use the DCHP and BCS finder. If you had a button on the BCS finder to connect (open the default browser) to the found IP Address, then you could always launch the BCS finder and click connect as a surefire method of connecting without having to type in an IP Address each time without missing a "peroid".
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Static IP

Post by JonW »

If you're moving between two networks, you should be using DHCP. Additionally, you could probably set an IP address reservation in the routers at each site so that the BCS always gets the same address.
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: Static IP

Post by brahn »

JonW wrote:Isn't there a way to maintain the IP settings between firmware updates? I know on the Atmel processors that I program, I can reserve variable space in the bootloader for persistent values between firmware updates.
I'll look into this, but I don't know if there's any space available in the bootloader section of the flash. I know the image uses up the entire 4K, but there may be some space in there I could hijack. That would be a nice feature. This could definitely be done by modifying the bootloader itself and not erasing the entire flash space on each upgrade, but there's no way to update the bootloader on existing devices without a JTAG.

JonW wrote:If you're moving between two networks, you should be using DHCP. Additionally, you could probably set an IP address reservation in the routers at each site so that the BCS always gets the same address.
Yes, this. In fact, that's the configuration I would recommend to anyone regardless of moving between 2 networks. DHCP + IP address reservation is the easiest way to configure your BCS and always be able to find it.
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Static IP

Post by clearwaterbrewer »

just use a static reservation in your router for your BCS... never have to mess with it again.
User avatar
oakbarn
Posts: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Static IP

Post by oakbarn »

It was very confusing to me when I changed networks. I understand that DHCP is a good method and reserving am IP is another way to go but I do not "own" the router on the other network. A Connection Button on the BCS Finder utility would make like a lot easier for a newbie like me. I have gotten quite an education about IP Addresses and DHCP in the past couple of weeks but that has little to do with the BCS (except that it is a PIA to get connected the first time (and my second time when I changed Networks because I set a static ip (so I could put a Short Cut on my Desktop.) My first thought was off somewhat because I thought the BCS was there but just at the wrong address. Since my "education", it was a "dumb" suggestion but first impressions are important and the connection issue is frustrating when you want to see your newest toy.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Static IP

Post by JonW »

The BCS is a networking device and as such it does require some basic understanding about networking - especially if you want to flip-flop modes of access like direct connect, DHCP and static addressing. Part of the flexibility and power of the BCS is directly related to it being a network device.
Post Reply