@@ -7,7 +7,7 @@ module Post
7
7
module HWBridge
8
8
module Ui
9
9
###
10
- # Automotive extension - set of commands to be executed on CAN bus
10
+ # RF Transceiver extension - set of commands to be executed on transceivers like the TI cc11XX
11
11
###
12
12
class Console ::CommandDispatcher ::RFtransceiver
13
13
include Console ::CommandDispatcher
@@ -18,24 +18,24 @@ class Console::CommandDispatcher::RFtransceiver
18
18
#
19
19
def commands
20
20
all = {
21
- 'supported_idx' => 'suppored USB indexes' ,
22
- 'idx' => 'sets an active idx' ,
23
- 'freq' => 'sets the frequency' ,
24
- 'modulation' => 'sets the modulation' ,
25
- 'flen' => 'sets the fixed length packet size' ,
26
- 'vlen' => 'sets the variable lenght packet size' ,
27
- 'xmit' => 'transmits some data' ,
28
- 'recv' => 'receive a packet of data' ,
29
- 'enable_crc' => 'enables crc' ,
30
- 'enable_manchester' => 'enales manchester encoding' ,
31
- 'channel' => 'sets channel' ,
32
- 'channel_bw' => 'sets the channel bandwidth' ,
33
- 'baud' => 'sets the baud rate' ,
34
- 'deviation' => 'sets the deviation' ,
35
- 'sync_word' => 'sets the sync word' ,
36
- 'preamble' => 'sets the preamble number' ,
37
- 'power' => 'sets the power level' ,
38
- 'maxpower' => 'sets max power'
21
+ 'supported_idx' => 'suppored USB indexes' ,
22
+ 'idx' => 'sets an active idx' ,
23
+ 'freq' => 'sets the frequency' ,
24
+ 'modulation' => 'sets the modulation' ,
25
+ 'flen' => 'sets the fixed length packet size' ,
26
+ 'vlen' => 'sets the variable length packet size' ,
27
+ 'xmit' => 'transmits some data' ,
28
+ 'recv' => 'receive a packet of data' ,
29
+ 'enable_crc' => 'enables crc' ,
30
+ 'enable_manchester' => 'enables manchester encoding' ,
31
+ 'channel' => 'sets channel' ,
32
+ 'channel_bw' => 'sets the channel bandwidth' ,
33
+ 'baud' => 'sets the baud rate' ,
34
+ 'deviation' => 'sets the deviation' ,
35
+ 'sync_word' => 'sets the sync word' ,
36
+ 'preamble' => 'sets the preamble number' ,
37
+ 'power' => 'sets the power level' ,
38
+ 'maxpower' => 'sets max power'
39
39
}
40
40
41
41
all
@@ -66,7 +66,7 @@ def cmd_idx(*args)
66
66
self . idx = 0
67
67
idx_opts = Rex ::Parser ::Arguments . new (
68
68
'-h' => [ false , 'Help Banner' ] ,
69
- '-i' => [ true , 'USB index, default 0' ]
69
+ '-i' => [ true , 'USB index, default 0' ]
70
70
)
71
71
idx_opts . parse ( args ) do |opt , _idx , val |
72
72
case opt
@@ -108,8 +108,8 @@ def cmd_freq(*args)
108
108
arg = { }
109
109
opts = Rex ::Parser ::Arguments . new (
110
110
'-h' => [ false , 'Help Banner' ] ,
111
- '-f' => [ true , 'frequency to set, example: 433000000' ] ,
112
- '-m' => [ true , 'Mhz, default is 24' ]
111
+ '-f' => [ true , 'frequency to set, example: 433000000' ] ,
112
+ '-m' => [ true , 'Mhz' ]
113
113
)
114
114
opts . parse ( args ) do |opt , _idx , val |
115
115
case opt
@@ -147,7 +147,7 @@ def cmd_modulation(*args)
147
147
mod = nil
148
148
opts = Rex ::Parser ::Arguments . new (
149
149
'-h' => [ false , 'Help Banner' ] ,
150
- '-M' => [ true , 'Modulation name, See help for options' ]
150
+ '-M' => [ true , 'Modulation name, See help for options' ]
151
151
)
152
152
opts . parse ( args ) do |opt , _idx , val |
153
153
case opt
@@ -175,7 +175,7 @@ def cmd_flen(*args)
175
175
flen = -1
176
176
opts = Rex ::Parser ::Arguments . new (
177
177
'-h' => [ false , 'Help Banner' ] ,
178
- '-l' => [ true , 'Fixed Length' ]
178
+ '-l' => [ true , 'Fixed Length' ]
179
179
)
180
180
opts . parse ( args ) do |opt , _idx , val |
181
181
case opt
@@ -203,7 +203,7 @@ def cmd_vlen(*args)
203
203
vlen = -1
204
204
opts = Rex ::Parser ::Arguments . new (
205
205
'-h' => [ false , 'Help Banner' ] ,
206
- '-l' => [ true , 'Variable Length' ]
206
+ '-l' => [ true , 'Variable Length' ]
207
207
)
208
208
opts . parse ( args ) do |opt , _idx , val |
209
209
case opt
@@ -234,9 +234,9 @@ def cmd_xmit(*args)
234
234
arg = { }
235
235
opts = Rex ::Parser ::Arguments . new (
236
236
'-h' => [ false , 'Help Banner' ] ,
237
- '-d' => [ true , 'Variable Length' ] ,
238
- '-r' => [ true , 'Repeat' ] ,
239
- '-o' => [ true , 'Data offset' ]
237
+ '-d' => [ true , 'Variable Length' ] ,
238
+ '-r' => [ true , 'Repeat' ] ,
239
+ '-o' => [ true , 'Data offset' ]
240
240
)
241
241
opts . parse ( args ) do |opt , _idx , val |
242
242
case opt
@@ -272,8 +272,8 @@ def cmd_recv(*args)
272
272
blocksize = -1
273
273
opts = Rex ::Parser ::Arguments . new (
274
274
'-h' => [ false , 'Help Banner' ] ,
275
- '-t' => [ true , 'timeout' ] ,
276
- '-b' => [ true , 'blocksize' ]
275
+ '-t' => [ true , 'timeout' ] ,
276
+ '-b' => [ true , 'blocksize' ]
277
277
)
278
278
opts . parse ( args ) do |opt , _idx , val |
279
279
case opt
@@ -345,7 +345,7 @@ def cmd_channel(*args)
345
345
channel = -1
346
346
opts = Rex ::Parser ::Arguments . new (
347
347
'-h' => [ false , 'Help Banner' ] ,
348
- '-c' => [ true , 'Channel number' ]
348
+ '-c' => [ true , 'Channel number' ]
349
349
)
350
350
opts . parse ( args ) do |opt , _idx , val |
351
351
case opt
@@ -375,8 +375,8 @@ def cmd_channel_bw(*args)
375
375
arg = { }
376
376
opts = Rex ::Parser ::Arguments . new (
377
377
'-h' => [ false , 'Help Banner' ] ,
378
- '-b' => [ true , 'Bandwidth' ] ,
379
- '-m' => [ true , 'Mhz' ]
378
+ '-b' => [ true , 'Bandwidth' ] ,
379
+ '-m' => [ true , 'Mhz' ]
380
380
)
381
381
opts . parse ( args ) do |opt , _idx , val |
382
382
case opt
@@ -409,8 +409,8 @@ def cmd_baud(*args)
409
409
arg = { }
410
410
opts = Rex ::Parser ::Arguments . new (
411
411
'-h' => [ false , 'Help Banner' ] ,
412
- '-b' => [ true , 'Baud rate' ] ,
413
- '-m' => [ true , 'Mhz' ]
412
+ '-b' => [ true , 'Baud rate' ] ,
413
+ '-m' => [ true , 'Mhz' ]
414
414
)
415
415
opts . parse ( args ) do |opt , _idx , val |
416
416
case opt
@@ -443,8 +443,8 @@ def cmd_deviation(*args)
443
443
arg = { }
444
444
opts = Rex ::Parser ::Arguments . new (
445
445
'-h' => [ false , 'Help Banner' ] ,
446
- '-d' => [ true , 'Deviat' ] ,
447
- '-m' => [ true , 'Mhz' ]
446
+ '-d' => [ true , 'Deviat' ] ,
447
+ '-m' => [ true , 'Mhz' ]
448
448
)
449
449
opts . parse ( args ) do |opt , _idx , val |
450
450
case opt
@@ -475,7 +475,7 @@ def cmd_sync_word(*args)
475
475
word = -1
476
476
opts = Rex ::Parser ::Arguments . new (
477
477
'-h' => [ false , 'Help Banner' ] ,
478
- '-w' => [ true , 'Sync word (Integer)' ]
478
+ '-w' => [ true , 'Sync word (Integer)' ]
479
479
)
480
480
opts . parse ( args ) do |opt , _idx , val |
481
481
case opt
@@ -508,7 +508,7 @@ def cmd_preamble(*args)
508
508
preamble = -1
509
509
opts = Rex ::Parser ::Arguments . new (
510
510
'-h' => [ false , 'Help Banner' ] ,
511
- '-n' => [ true , 'Number of preamble' ]
511
+ '-n' => [ true , 'Number of preamble' ]
512
512
)
513
513
opts . parse ( args ) do |opt , _idx , val |
514
514
case opt
@@ -550,7 +550,7 @@ def cmd_power(*args)
550
550
power = -1
551
551
opts = Rex ::Parser ::Arguments . new (
552
552
'-h' => [ false , 'Help Banner' ] ,
553
- '-p' => [ true , 'Power level' ]
553
+ '-p' => [ true , 'Power level' ]
554
554
)
555
555
opts . parse ( args ) do |opt , _idx , val |
556
556
case opt
0 commit comments