TLV is the short for Type Length Value. It is a technique mostly used to encode optional information within data communication protocols.
Questions tagged [tlv]
109 questions
0
votes
3 answers
Can ASN.1 support putting field lengths in a different place?
I have a protocol whose on-the-wire format is already defined and I'd like to use ASN.1 to encode/decode it, but it seems to break the defined BER/DER/PER options. For whatever reason, the protocol developers did not put payload sizes/lengths…

timcardenuto
- 40
- 6
0
votes
2 answers
How to send multiple AID from a Payment App to a Terminal?
I want to send multiple AID to the terminal from my android payment application. For doing so how to construct a response message of the select command?
Suppose I am getting 00 A4 04 00 0E (14 bytes data) 00 from the terminal. In response, I am…

faysal
- 162
- 2
- 14
0
votes
2 answers
Convert BCD byte array to a NSDecimalNumber
Given a 6 byte array from a specific TLV tag:
unsigned char bytes[] = { 0x00, 0x00, 0x00, 0x01, 0x23, 0x45 };
NSData * data = [NSData dataWithBytes:bytes length:6];
How could one convert it to the decimal number with value of:
12345
I tried…

Said Sikira
- 4,482
- 29
- 42
0
votes
0 answers
How to read data from tlv file in Java Program?
Products should be delivered to fictional stores. There's no store backend instance.
Product amount is unspecified. Just make sure that each store get what they are selling - one product can be delivered to multiple store, if needed.
After…

ab jatoi
- 39
- 6
0
votes
1 answer
Found wrong LRC
I want to calculate LRC (in JAVA) for the following message:
String TLV1="003D6000010000544553543531333030303234FF8B6028DF0225DF82040C544553543531333030303234DF820803000160DF820903170222DF820A03172011D5";
My LRC should be "D5" = 213 But my code…

Akin Gunduz
- 103
- 7
0
votes
1 answer
How to create TLV encode/decode msg data using C?
I'm trying to encode/decode tlv msg data using C. Actually im newbie about TLV formatting. I just found few codes from the Google and i do not understand them.
unsigned char *tlv_buffer = NULL;
int size = 1;
int len = 0;
int result;
tlv_buffer =…

Dulguuntur
- 43
- 3
- 9
0
votes
1 answer
SMPP connection using TLV
I would like to send commands to the device using Open Smpp protocol.
API people provided me ProgramID, but i didn't find any method which is accepting programId in open smpp api.
So i thought to add it in setExtraOptional(TLV tlv)
but i am not…

User12377777
- 145
- 2
- 20
0
votes
1 answer
check if length in rtattr even
In my kernel code I need to parse a number of TLV-like attributes rtattr. Is there a way to validate that length is correct, i.e. it has to be even. Is there a macro for this?

Mark
- 6,052
- 8
- 61
- 129
0
votes
1 answer
EMV JavaCard APDU Response in TLV Format
I have a simple JavaCard HelloWorld script, i execute it in JCIDE with virtual reader then i send apdu commands from pyapdutool: 00a404000e aid then 80000000 and i receive javacard string, everything runs fine. My question is: how can i return a tlv…

Clarke
- 63
- 9
0
votes
2 answers
Can anybody identify this Json-like TLV Data Format?
I'm currently working on a project that involves migrating a legacy database over to a new schema. The old database has records of orders that have been placed and a single column containing the shopping cart.
The problem is the cart is in a format…

Gareth Brading
- 45
- 7
0
votes
1 answer
TLVs and sub-TLVs over websockets or what really to use
I have service that is utilizing web sockets in order to transfer data.
I need a way to encode a tree structure and transfer that tree structure over the websocket. I have been reading about the TLV and sub-TLV encoding which seems to be a great…

Tito
- 2,234
- 6
- 31
- 65
0
votes
1 answer
Any better code to define generic TLV initiatzed to different types
Maybe more of this is object oriented programming based -
defined a generic TLV as
class MYTLV(Packet):
fields_desc = [
ByteEnumField("type", 0x1, defaultTLV_enum),
FieldLenField("length", None, fmt='B',…

mungayree
- 313
- 1
- 12
0
votes
1 answer
Can I edit a TLV file using a perl script?
I'm trying to find out if it's possible to edit/add parameters to a TLV* file because I have no idea if a solution exists and how to go about it. Thank you.
A tlv file (extension .bin file) is an emta configuration file defined by docsis.

il-fox
- 75
- 2
- 8
0
votes
2 answers
Any lib or formal method handling TLV in Erlang?
I'm working on a protocol handling data exchange that somehow a little complex, then I found TLV is the one I need. Is there a formal way to read and write TLV in erlang? or some lib / code example handling this? thanks.

Jason Xu
- 2,903
- 5
- 31
- 54
-1
votes
1 answer
How to parse TLV tag string in java
I am trying to parse TLV string:
24 00 35 E1 31 9F 08 02 38 30 9F 37 04 4A 66 6B 69 DF AE 05 01 41 9F 26 08 73 30 35 76 4F 6A 36 4E DF AE 06 0C 33 34 71 76 69 70 6B 4D 53 63 66 55 9F 36 02 00 01 90 00 7B
In this case 9F08 is tag followed by length…

Kaka
- 1
- 3