![VersaLogic Zebra VL-EPC-2701 Скачать руководство пользователя страница 38](http://html1.mh-extra.com/html/versalogic/zebra-vl-epc-2701/zebra-vl-epc-2701_user-manual_1006790038.webp)
Advanced Features and Commands
38
Zebra (VL-EPC-2701) Yocto Linux User Guide
00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:33
4. In one terminal, start
candump
on can1:
sh-4.3# candump can1
5. In a second terminal, run
cansend
on can0 to send a CAN message:
sh-4.3# cansend can0 123#DEADBEEF
6. Verify the
candump
program sees the message that was sent:
can1 123 [4] DE AD BE EF
I
2
C Commands
Here are a few I
2
C commands that may come in handy:
1. Verify that all 3 I
2
C buses are seen:
sh-4.3# i2cdetect -l
i2c-0 i2c 21a0000.i2c I2C adapter
i2c-1 i2c 21a4000.i2c I2C adapter
i2c-2 i2c 21a8000.i2c I2C adapter
2. For each bus (0,1,2), scan the bus for device with the command
i2cdetect -y <bus>
sh-4.3# i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- UU -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: 30 -- -- -- -- -- -- 37 -- -- 3a -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- 4a 4b -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
3. Use the
i2cdump
command to dump device registers:
sh-4.3# i2cdump -y 2 0x30
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f .???????????????
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ????????????????
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f !"#$%&'()*+,-./
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 0123456789:;<=>?
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f @ABCDEFGHIJKLMNO
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f PQRSTUVWXYZ[\]^_
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f `abcdefghijklmno
70: 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f pqrstuvwxyz{|}~?
80: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f ????????????????
90: 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f ????????????????
a0: a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af ????????????????