In this Blog Post, I will carry on with phase I of testing. This consists of four (4) components. The radio head itself, which has not been modified. The Custom Cable consists of 2 DB-25m connected to 3 ARINC connectors. The RSS C-3436A interface. And lastly, a python script running on my Linux box to talk to the radio head via a USB cable just for testing.
The testing will have several major objectives:
- The out of frequency indexes for MHz and KHz are working.
- Make sure that I can retrieve the correct frequency for Mhz.
- The KHz is a simple matter it is just 10 times the index.
- That I can see the power switch's state (ON, OFF)
- (Optionally) and can turn on the front panel lights via the Hv relay.
The slave pictured below (orange picture) has an Arduino its 2 DB25F connectors, an integration power connector DIM-5, a dual RJ-45 breakout board, and the CANbus module, the single-channel power relay has not been installed at this date.
If this all works the next stage is to integrate this with the CANbus using CANaerospace protocol formats. One of the first things that I will have to do is write the heartbeat or IDS on Node Service 0.This makes sure that a CANaerospace network can be scanned for attached units to determine their status, header type, and identifier assignment. Note that within a CANaerospace network, other header types than the standard CANaerospace header and several identifier assignment schemes (including entirely user-defined ones) are supported. Whenever possible, it is strongly recommended to use the proposed standard header and identifier assignment,
For the devices, I will have to construct a structure to hold all of the info, here which you can find here on pages 15 - 45 this radio: has a CAN identifier of 1104 The Suggested Data Type is a Float (32 bits 1 sign bit, 23-bit fraction and 8-bit exponent according to IEEE-744-1985 or ACRHAR4, and its units are in MHz. Now going back to page 7 where you see that ACRHAR4 is 4xASCII chars.
Since the CanAerospace Data package is 8-Bytes, I will create a new Data Type 4xhex chars. So the maximum for the high side is 126 decimal which is 7Exhex, which will go into byte-7. The maximum for the low side is 9 which is 09xhex, which will go into byte-6. That leaves me bytes 4 and 5 for switches etc.
Node-ID | Data-Type | Service-Code | Message-Code | Data | |||
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
450 | 64 | 2 | 09 | 7E | |||
450 | 64 | 1 | 1 |
This device will use a custom Data Type 4xHex | 64xhex
The NodeID assignment is 450x ie page 43 CANaerospace Interface Specification
This is the response for status.
bit 0 is for the power 1::=ON. 0::=OFF
bit 1 is for the lamps
This is the lamp command.
bit 1 is for the lamps