MC3090 moving Physical Sites, how does it contact NEW Relay Server

Hi All,

Placemakers have many sites and a Relay Server in each site. When a device goes back to the Partner "Datacom" we want it to contact the new Relay Server (which is at Datacom).

The MC3090s have 2 WLAN profiles, one for Placemakers and one for Datacom and "profile roaming" works fine so when they are back at Datacom they connect to the WLAN, but they can't connect to their old Relay Server at the customer (Placemakers) site.

Can we use a constraint to Ping the new relay server, and based on it responding; set the SiteID and RelayServer to start it checking in on the Datacom Relay Server?

Is this normal, perhaps an easier way, or will this even work?

Cheers
Stephen Vye
Thank you such Allan, I have

Thank you such Allan, I have the Blob files, I've set Pingable conditions (As per my attachment in DevCentral) and I've got 2 x Scenarios set up for each condition.

Each Action is to run a batch file (I haven't created yet, I assume I need to suffix it with .batch and put the rdclient command in to use the appropriate blob)? You've provided the string already thanks.

Cheers
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi, you can define a staging

Hi,

you can define a staging site that is using Datacom's WLAN and Relay Server and a production site that is using Placemakers WLAN and Relay Server.
In the Staging Profile you select inherit from site and than your staging site and production site as well as the bundle you want to process. RDC will first set the staging site and process the bundle and at the end it will set the production site with your customers settings. It can than be shipped to the production site.
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Allan Herrod
What Thomas suggested is

What Thomas suggested is correct, but I don't think it answered the question you were asking.  As he suggests, if you want to Stage the devices at the partner, for use at the customer Site, then Site Inheritance is indeed the way to go.  But if I understand the question correctly, you want to automatically detect that the device has returned to the partner and automatically reconfigure it to talk to the Relay Server at the partner Site.  And, I assume, you may want it to switch back to the production Relay Server once the device is back at the customer Site.

You can do this beginning with MSP 3.2.1, but it is not trivial.  MSP is only designed to talk to one Relay Server at a time.  We have had some requests to have a "secondary" Relay Server for failover purposes, but we do not have such a feature yet.  So, default operation is that MSP will only contact the Relay Server it is configured to talk to, based on the last Relay Server applied to the device, either during Staging (explicitly by selecting a Relay Server or by Inheriting a Relay Server from a Site) or by pushing a Relay Server Settings or Production Site Bundle to the device.

What you are looking to do is to change which Relay Server Settings are applied on a device when it roams to a new WLAN network.  This is possible if you have the Settings BLOB for the desired Relay Server in the device, since you can run the RDClient with a command line parameter to process that Settings BLOB, such as:

\windows\rdclient.exe –I\Application\myRS.blob

The tricky parts are how to get the Settings BLOB for the proper Relay Server into the device.  The Settings BLOB for the Relay Server can be pulled off the Relay Server as a file that is part of the Settings Package sent to the Relay Server that configures a device onto that Relay Server.  If there is only one partner Relay Server, you should be able to get it once and put it into all devices (so long as the definition of that Relay Server doesn't change).

Then, you should be able to find and save the Relay Server Settings BLOB that is part of the Relay Server Settings Pacakge in each device, which might well be different for devices at each Site.  So, once you have the two Settings BLOBs in a known place in the device, you are set to be able to make the switch by running the RDClient with the right command line to reference the right BLOB.

Then, the question becomes how to detect when you want to do the switch.  As you suggested, you could periodically ping some IP Address that is reachable from the partner network but is not reachable from the customer network.  If you reach that IP Address, then you can apply the Relay Server Settings that are appropriate.  Similarly, you could do the same for the customer network.  If there is not a single IP Address that is reachable from all customer Sites but is not reachable from the partner network, then it gets a LOT more complicated.

Assuming there IS a single IP Address that is reachable from all customer Sites but is not reachable from the partner network, then you could actually make this work without writing any custom code by using the LockAndWipe Control Module.  You could define 2 LockAndWipe Scenarios, one for each network.  You make each Scenario Conditional based on a Connectivity Condition, and define each Connectivity Condition to look for a Continuously Pingable Target that is the IP Address that is reachable from each network.  When a Scenario is met, use a Wipe Action to do nothing but execute a batch file, where that batch file runs the RDClient to apply the proper Relay Server Settings.

As I said, it is non-trivial, but it CAN be done.  It just requires a lot of finicky details, getting everything set up, deployed to the right places, etc.  If you are willing to write custom code, it can be done with a lot fewer moving parts since then your code is responsible for deciding WHEN and then running the RDClient to apply the right Relay Server Settings.



Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
do not know your application,

do not know your application, but if you get the ip address of your mu via dhcp and you can derive from the ip address the address of the relay server you can put this one programmatically as the server ip into the registry (airbeam.reg) ... after stopping and starting agent30.exe again - this can be done programmatically as well - then the mu is contacting this new relay server automatically
i have this running in a real application and is working very well ...
Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Damian Stock
Steve, If it is possible to

Steve,

If it is possible to use the same last octet for the relay server (ie .101) in the stores and the partner network, and the devices are in the same subnet as the relay server in each case, then the device should find the local relay server when it connects to the local LAN. This has been a standard feature of the ABS client since MSP 2.x. I have this working at multiple customers, to provide for device roaming between locations, without any requirement to do anything "programatically".

Good luck,

Damian
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
hi damian, where to set this

hi damian,
where to set this feature in the abclient ... does it need to be 101 or could it be also something else
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Damian Stock
In the relay server "Private

In the relay server "Private Access Info" page set the IP address of the relay server to its last octet only, such as 101, 55 or whatever IP address is available in all sites (with or without the preceding . - I can't remember). The mobile unit will then append the first three octets of its own IP address to the provided value to come up with the full address of the local relay server. The mobile unit will then use this to contact the relay server.



This was broken in the client agent in the initial version of MSP3 but I know that it is working now.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Stephen Vye
Hi Allan, The Partner is

Hi Allan,

The Partner is readressing this and want some help, and my MSP knowledge is rusty (especially on Control objects), would you be able to review my work in the attachment?

It contains 1 x Wipe Settings Package and 2 x Conditions based on Pingable targets.

If it's all good, I just need help with how to create an Airbeam Batch file you referred to, the Airbeam manual doesn't seem to help. I can create an old DOS batch file....

Steve Vye
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Allan Herrod
Steve; A Batch file launched

Steve;

A Batch file launched via LockAndWipe is the same as a Batch file used as an Install or Uninstall command in a Pacakge.  Basically it is a text file with one command per line.  The command on each line can be anything that could be executed as a Package Install or Uninstall command.  The commands in the file are executed in sequence until one fails or all have completed.  Such a Batch file referenced in a LockAndWipe Settings has the identical capabilities and is processed the same way as well.

The real tricks to using the described approach to "auto switch" Relay Servers are to get the desired Relay Server Settings BLOBS and to know when to change them.  MSP can be used to export Settings BLOBS for regular Settings Object, but since Relay Server Settings are created from Relay Server Objects instead of from Settings Objects, they cannot be exported directly as BLOBS from the Transfer Tab of the MSP Console UI.  The best you can do is pull the required BLOB from a Relay Server or device where it was sent as part of a Relay Server Settings Package.

Messing with Settings BLOBS directly, as this approach does, also means you have stepped outside what MSP can do for you automatically, since it has no knowledge of what you have done and can't update the BLOBS for you if the Relay Server definitions change.  So beware.  In the case you describe, I would think that the partner's Relay Server information might be considered CONSTANT.  If so, then you could build in the Settings BLOB for that Relay Server with reasonable safety and leave MSP to deliver the normal production Relay Server Settings to devices.

Then, you need to define a Condition that tells LockAndWipe WHEN to make the change.  A Connectivity Condition sounds like it would do the job.  If you find that the partner's Relay Server (or any other Server that would be reachable only when at the partner facility) is "continuously pingable" for a suitable time, then you could execute a Batch to apply the built-in Settings BLOB.  Then, on the NEXT check-in, it would check-in with the newly configured Relay Server.

If you wanted to get REAL ambitious, you could have another scenario that would set it back to the MSP-defined Relay Server Settings by applying the BLOB that would be stored persistently in the device.  But perhaps that is not needed since the partner could be tasked with configuring the device to the right state before shipping it.  Do beware, however, that so long as the device remains at the partner facility and hence can ping the specified Server, LockAndWipe may kick in and override and reconfiguration that the partner might do.  So, getting this all to work flawlessly could be quite challenging.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Allan Herrod
Steve; You can name a batch

Steve;

You can name a batch file anything you want, it does not have to have any particular extension.  Just make sure to specify the full path, file name, and extension of the batch file as the value in the LockAndWipe Settings Object.

Probably you would want to put the BLOB files, batch files, etc. in a Package and deploy it in the same Bundle, just before deploying the LockAndWipe Settings.

Allan
Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Stephen Vye
Hi Allan, I have created

Hi Allan,

I have created the Batch file, conditions, and got the Relay.blob files in the \Application folder. I then watched as the RD Client was kicked into action (not silently) but stayed there awaiting barcodes.

If I run the following command from the Command Shell, it works fine and changes the Relay Server:

\windows\rdclient.exe –I\Application\workingPLC.Datacom.FTPRelayS.blob

I tried placing BATCH in front of it and that didn't work at all (I saw this in some old postings).

Do I need to enclose the string in "quotes" because at present it is obvious the -I extension is being ignored, or perhaps the dot notation.

Regards
Steve
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Allan Herrod
Steve; Every line of a


Steve;

Every line of a batch file must have a carriage return at the end, just like a normal text file.
If it does not, then that line will not be executed correctly.
You can test you batch file by using the AirBEAM client to process it.

For example, you could execute the following from the command shell:

\windows\abclient.exe -C\test\mybatch.txt

Once that does the same as executing the command(s) in the batch file from the command shell, then you know your batch file will produce that same result used from anywhere else.

You cannot use the word BATCH inside a batch file, that is ONLY supported at the start of a Package command to indicate that a batch file should be invoked.  You cannot call a batch file from a batch file.

Allan
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Juan-Antonio Ma...
Would it be a problem reading

Would it be a problem reading a barcode every time a terminal comes to a given location?

What we do in Spanish Post is having a silly dummy "empty" stg profile that just sets the right Relay Server. Once terminal reads it (w/ RD), it starts using it.
So, in your case, when terminals get to Datacom, they should read a Stg profile with Datacom's RD.
When they come back to their site, first thing some operator must do is reading the barcode of this particular site.

This always requires human operation, and hence might not be a possibility in your case.
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Stephen Vye
Thanks for your responses,

Thanks for your responses, yes I'm still having trouble automating what we can do by Manually scanning the Staging sheets:

Hi Alan, thanks for your advice, I can run the command prompt as follows and my Relay Server changes perfectly:

\windows\rdclient.exe –I\Application\workingPLC.Datacom.FTPRelayS.blob

I checked my Batch files and I have a CR and LF at the end of the line, but the following command does NOT change my Relay Server - hence Batch file broken it would seem: (attached as well)

\windows\abclient.exe -C\Application\SetRelayNO.batch

I checked the .batch file is present in the \Application folder along with the .blog files, and I tried to research your -C extension you are parsing? to abclient, but I can't find a list of abclient extensions anywhere so far.

At lease I know my Batch file is not being executed by Airbeam Smart!!! Any thoughts why?

Cheers


Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments