Download Command 0x01 - Initialization Map Structure

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Download Command 0x01 - Initialization Map Structure

NEAL SINGH
Administrator

To control the Master Controllers (MC) use of the Memory, the Map Structure will define how the memory is used to store data relating to Config, Tags, Mode of operation etc.

When a MC is powered up, it will asked for a reference number (10 Digit) / Alternately if there was Unique ID number from the CPU or another source, the Keypad could be used to invoke the MC to check-in to the

Web to get its Setup information. 

{ NB: if we do have to modify the current board, we can add the ID chip }

 

If we use the reference code method, then the Tech will enter all the data into Web and will be given a Ref# that will be entered via the keypad or CC1310 link to a Laptop.

Then MC will then link into the WEB and download its Memory Map starting with this command [0x01]

 

Download Command 0x01 – Tech Config : Initialization Map Structure

Field Name

Description

Example

Initialization Code

A unique 2Byte Code that indicates the M/C is initialized

BYTE & NOT(BYTE) e.g 0xA5;0x5A

Version Code

2 Bytes that indicate to the Firmware compatibility

 

SITE ID

3 Bytes

0x04FD00

Config_Addr_Str

Start address where Config info resides

0x000004

Config_Addr_End

End address where Config info resides

0x0003E8 (NB: Rest all random

CMD_Addr_Str

Start address where Commands Addr resides

0x000F04  just to give the idea)

CMD_Addr_End

End address where  Commands Addr resides

0x0013E4

Tag_Addr_Str

Start address where Tag info resides

0x000F04 

Tag_Addr_End

End address where Tag info resides

0x0013E4

Att_Addr_Str

Start address where Att info resides

0x000004

Att_Addr_End

End address where Att info resides

0x0003E8

Driver_Addr_Str

Start address where Driver info resides

0x000004

Driver_Addr_End

End address where Driver info resides

0x0003E8

Veh_Addr_Str

Start address where Vehicle info resides

0x000004

Veh_Addr_End

End address where Vehicle info resides

0x0003E8

Stock_Addr_Str

Start address where Stock info resides

0xfffff (not used)

Stock_Addr_End

End address where Stock info resides

0xfffff (not used)

Trans_Addr_Str

Start address where Transaction info resides

0x000004

Trans_Addr_End

End address where  Transaction  info resides

0x0003E8

 

 

 

Below a sample of the comms from the Web to the M/C

STX

[1] Hex

SiteID[3]

Hex

Packet Type[2] Hex

Payload length [1]

Hex

Payload

 

CRC [1]

Hex

ETX

[1]

Hex

0x32

0x04FD00

0x02

0x2E

0xA50x5A|0x01;0x05  |0x04FD00|0x0003E8 etc

XX

0x33

 

Reply | Threaded
Open this post in threaded view
|

Re: Download Command 0x01 - Initialization Map Structure

NEAL SINGH
Administrator
Missing here is the Start and end Address of the Accounts.
NB: all Vehicles and Drivers belong to an Account
Reply | Threaded
Open this post in threaded view
|

Re: Download Command 0x01 - Initialization Map Structure

juanchigarin
Administrator
In reply to this post by NEAL SINGH
For this command, the best is that the payload has the information of each one field directly in bytes without any separator (|), for then in the arduino the byte array can be copied directly to the structure, without any parse or special treatment. Only will be checked that the version of the package matchs with the firmware version like FirstByte.SeccondByte (00.00 to 255.255 version numbers) before to copy for avoiding errors.
Reply | Threaded
Open this post in threaded view
|

Re: Download Command 0x01 - Initialization Map Structure

juanchigarin
Administrator
In reply to this post by NEAL SINGH
Will be necessary to develop a command 0x00 that will ask to the device the firmware version, Memory map version and maybe the ID. With that information the Web server will be able to determine what memory map struct must to be used.
For that into the device will be a Firmware version that will change as the bugs are fixed and a memory map version to be used in the begining for matching the maps information.
For that the second field of the previous table will be the Firmware Memory Map version.