intrepidcs / python_ics

Library for interfacing with Intrepid devices in Python
MIT License
61 stars 29 forks source link

Ethernet packets do not allow more than 256 bytes #127

Closed bmjones2 closed 2 years ago

bmjones2 commented 2 years ago

In the following example, setting tx_message.ExtraDataPtr truncates the data to 256 bytes.

        tx_message.NetworkID = netid_tx
        tx_message.NetworkID2 = netid_tx >> 8
        tx_message.Protocol = ics.SPY_PROTOCOL_ETHERNET #set communication protocol
        tx_message.StatusBitField2 |= ics.SPY_STATUS2_ETHERNET_NO_PADDING #creates runt frame (where supported) by removing padded zeros; disable if not required
        data = tuple([x for x in range(args.range)])
        tx_message.ExtraDataPtr = data