1
1
# icepap-ipassign
2
2
3
- Remotely configure IcePAP network settings.
3
+ Remotely configure IcePAP network settings.
4
+ [ ![ Total alerts] ( https://img.shields.io/lgtm/alerts/g/cydanil/icepap-ipassign.svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/cydanil/icepap-ipassign/alerts/ ) [ ![ Python 3.9 application] ( https://github.com/cydanil/icepap-ipassign/actions/workflows/python39.yml/badge.svg )] ( https://github.com/cydanil/icepap-ipassign/actions/workflows/python39.yml )
4
5
5
6
IPAssign is a tool developed within ESRF's DEG (Detector and Electronics Group).
6
7
Its aim is to provide an easy way to set-up network settings over UDP multicast,
@@ -46,7 +47,6 @@ ipassing sending a new configuration to a device.
46
47
Acknowledgements are sent by a device upon applying a new configuration.
47
48
These are not sent if the device was requested to reboot.
48
49
49
-
50
50
A typical exchange of information has the following format:
51
51
52
52
[ipassign] who's there? discovery packet
@@ -59,11 +59,9 @@ A typical exchange of information has the following format:
59
59
60
60
For demonstration purposes, a simple listener is available in ` utils/listener.py ` and can be invoked so:
61
61
62
- ``` bash
63
- $ ipassign-listener
62
+ $ ipassign-listener
64
63
65
- Waiting for messages...
66
- ```
64
+ Waiting for messages...
67
65
68
66
Messages seen in the multicast group will then be displayed in human readable format.
69
67
@@ -101,13 +99,12 @@ An IPAssign packet has the following structure:
101
99
102
100
` target count ` is called so, to maintain consistency with other legacy code.
103
101
It was originally envisioned that several devices could be targeted by a single
104
- message, hence its uint16 format.
102
+ message, hence its uint16 format.
105
103
In practice, however, it is effectively used as a boolean: it should be
106
- understood as ` is_not_broadcasting ` .
104
+ understood as ` is_not_broadcasting ` .
107
105
108
106
---
109
107
110
-
111
108
### Discovery Messages
112
109
113
110
Here is the anatomy of a discovery message:
@@ -210,6 +207,7 @@ An acknowledgment payload has the following structure:
210
207
- ` [error code] ` is a status code of having applied the received settings.
211
208
212
209
Here is an acknowledgement payload:
210
+
213
211
``` python
214
212
from ipassign import acknowledgements, Acknowledgement
215
213
@@ -244,26 +242,18 @@ For development, a mock IcePAP server can be found in `utils/mock_icepap`.
244
242
This mock server behaves like real hardware, and will send the appropriate
245
243
replies:
246
244
247
- ``` bash
248
- $ python ipa_utils/mock_icepap
249
- Working with e3:cd:77:a0:18:30 and dvepklrlyq, no ack: False
250
- ```
245
+ $ python ipa_utils/mock_icepap
246
+ Working with e3:cd:77:a0:18:30 and dvepklrlyq, no ack: False
251
247
252
248
The script also accepts a mac address as argument:
253
249
254
- ``` bash
255
- $ python ipa_utils/mock_icepap 00:0B:AD:C0:FF:EE
256
- Working with 00:0b:ad:c0:ff:ee and kqifwchhiz, no ack: False
257
- ```
250
+ $ python ipa_utils/mock_icepap 00:0B:AD:C0:FF:EE
251
+ Working with 00:0b:ad:c0:ff:ee and kqifwchhiz, no ack: False
258
252
259
253
It's also possible to make the script not send acknowledgements:
260
254
261
- ``` bash
262
- $ python ipa_utils/mock_icepap --nack
263
- Working with 53:2e:d2:f9:7b:af and kvdkkleuqc, no ack: True
264
- ```
265
-
266
-
255
+ $ python ipa_utils/mock_icepap --nack
256
+ Working with 53:2e:d2:f9:7b:af and kvdkkleuqc, no ack: True
267
257
268
258
## Embedded IcePAP Considerations
269
259
@@ -277,21 +267,19 @@ the `listener` crash.
277
267
To restart it, telnet as ` root ` in the IcePAP device, and execute
278
268
` /usr/sbin/icepap_startup_local restart ` :
279
269
280
- ``` bash
281
- $ telnet icepap
282
- icepap login: root
283
- Password:
284
-
285
- root@icepap > /usr/sbin/icepap_startup_local restart
286
- Stopping ipassign listener......done
287
- Stopping icepap communication...done
288
- Removing icepap driver..........done
289
- Removing blisspipe driver.......done
290
- Loading icepap driver..........done
291
- Loading blisspipe driver.......done
292
- Starting icepap communication...done
293
- Starting ipassign listener......done
294
- ```
270
+ $ telnet icepap
271
+ icepap login: root
272
+ Password:
273
+
274
+ root@icepap > /usr/sbin/icepap_startup_local restart
275
+ Stopping ipassign listener......done
276
+ Stopping icepap communication...done
277
+ Removing icepap driver..........done
278
+ Removing blisspipe driver.......done
279
+ Loading icepap driver..........done
280
+ Loading blisspipe driver.......done
281
+ Starting icepap communication...done
282
+ Starting ipassign listener......done
295
283
296
284
The device will then appear in ` ipassign ` upon doing a ` Refresh ` .
297
285
0 commit comments