You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dwood-appareo would it be possible to use latest builds of both python_ics and libicsneolegacy?
Not sure if it is by design by pip is only finding 910, I manually installed 912.4 after building from source.
per build_libicsneo.py the hash is not the last commit, so I have updated that and rebuilt.
Here is how I am sending messages to test:
def transmit_can(device):
msg = ics.SpyMessage()
msg.ArbIDOrHeader = 0x18FFFFFD # CAN Arbitration ID
msg.Data = (1,2,3,4,5,6,7,8) # Data Bytes go here
msg.NetworkID = ics.NETID_HSCAN # First channel of CAN on the device
msg.NumberBytesHeader = 8
msg.StatusBitField = ics.SPY_STATUS_XTD_FRAME
# msg parameter here can also be a tuple of messages
ics.transmit_messages(device, msg)
def transmit_canFD(device):
msg = ics.SpyMessage()
msg.ArbIDOrHeader = 0x18FFFFFF # CAN Arbitration ID
msg.NetworkID = ics.NETID_HSCAN
msg.Protocol = ics.SPY_PROTOCOL_CANFD
msg.NumberBytesHeader = 8
msg.StatusBitField = ics.SPY_STATUS_CANFD and ics.SPY_STATUS_XTD_FRAME
msg.StatusBitField3 = ics.SPY_STATUS3_CANFD_BRS
msg.ExtraDataPtr = tuple([x for x in range(64)])
ics.transmit_messages(device, msg)
if __name__ == "__main__":
connected_count = len(ics.find_devices())
print("Found {} connected device(s)...".format(connected_count))
for i in range(connected_count):
device = open_device(i)
print("Finished.")
try:
while True:
receive_can(device)
time.sleep(1)
transmit_can(device)
transmit_canFD(device)
except KeyboardInterrupt:
print("breaking")
@dwood-appareo Can you provide the source for receive_can also? I'm not sure what is going on with pip and installing an older version. Let me get my hands on a Raspberry PI and see if I can reproduce this. Having binaries with pip for arm is on my todo list. This might take me a couple days to get to but I can try to give more feedback for you while I work on this.
@dwood-appareo Can you provide the source for receive_can also? I'm not sure what is going on with pip and installing an older version. Let me get my hands on a Raspberry PI and see if I can reproduce this. Having binaries with pip for arm is on my todo list. This might take me a couple days to get to but I can try to give more feedback for you while I work on this.
def receive_can(device):
msgs, error_count = ics.get_messages(device)
print("Received {} messages with {} errors.".format(len(msgs), error_count))
for i, m in enumerate(msgs):
print('Message #{}\t'.format(i+1), end='')
print('\tArbID: {}\tDLC: {}'.format(hex(m.ArbIDOrHeader),m.NumberBytesData))
print('Channel:', m.NetworkID)
I did not have any issues building from source so no problems there, maybe just more of a note to you that the build_libicsneo clones an old hash.
After updating python_ics and libicsneo, I also explicitly set the override library:
Yes, the receive function I am using is just dumping the DLC len for debugging.
Hardware wise I have the valueCAN connected to another device, that I have candump running on, so with the two transmit functions I sent previously this is my output:
In my full setup I am actually using python-can, but when I discovered the payloads being empty I thought the best course would be to go to the python-ics level.
I do know that my receiving hardware is functioning because my python-can script works on windows.
@dwood-appareo we are able to reproduce this internally. We are working on fixing it. As for the version being old, it looks like an older version of pip can only install up to 910.10. pip must have broke compatibility upstream somehow.
@dwood-appareo we are able to reproduce this internally. We are working on fixing it. As for the version being old, it looks like an older version of pip can only install up to 910.10. pip must have broke compatibility upstream somehow.
Great that you were able to reproduce it, looking forward to an update.
@dwood-appareo we found the issue and pushed a fix to libicsneo, and I have checked it on 912.4 with libicsneo commit 9ef93eb73e1ada72ccc7a571744b9db1a564f18b. Would you please give this a try? Thank you very much for your clear report and cooperation!
@dwood-appareo Although I don't have arm releases yet, I've pushed v912.4post1 with this fix to PyPI.
I have checked out that tag and rebuilt and confirmed my package as v912.4post1, I am still not seeing payloads on CAN FD frames, I also explicitly set ics.override_library_name to the correct .so built from the referenced hash and experienced the same results.
@dwood-appareo we are having a hard time reproducing this here. We did run into a couple issues where we ended up with stale/old versions left over on our test machines. I would triple check there aren't any old versions of libicsneo laying around and same with python_ics. I've seen issues with pip if installing from PyPI and setup.py. Running pip uninstall until it complains nothing can be found seems to resolve that issue.
Activity
drebbe-intrepid commentedon Jun 23, 2023
@dwood-appareo would it be possible to use latest builds of both python_ics and libicsneolegacy?
dwood-appareo commentedon Jun 23, 2023
Not sure if it is by design by pip is only finding 910, I manually installed 912.4 after building from source.
per build_libicsneo.py the hash is not the last commit, so I have updated that and rebuilt.
Here is how I am sending messages to test:
drebbe-intrepid commentedon Jun 23, 2023
@dwood-appareo Can you provide the source for
receive_canalso? I'm not sure what is going on withpipand installing an older version. Let me get my hands on a Raspberry PI and see if I can reproduce this. Having binaries with pip for arm is on my todo list. This might take me a couple days to get to but I can try to give more feedback for you while I work on this.dwood-appareo commentedon Jun 23, 2023
I did not have any issues building from source so no problems there, maybe just more of a note to you that the build_libicsneo clones an old hash.
After updating python_ics and libicsneo, I also explicitly set the override library:
And this provided the same results of an empty CAN FD payload.
drebbe-intrepid commentedon Jun 23, 2023
When you say empty payload I assume
m.NumberBytesDatais zero?Are any of the messages you are receiving actually receive messages?
https://github.com/intrepidcs/python_ics/blob/master/examples/transmit_canfd_example.py#L86
dwood-appareo commentedon Jun 23, 2023
Yes, the receive function I am using is just dumping the DLC len for debugging.
Hardware wise I have the valueCAN connected to another device, that I have candump running on, so with the two transmit functions I sent previously this is my output:
In my full setup I am actually using python-can, but when I discovered the payloads being empty I thought the best course would be to go to the python-ics level.
I do know that my receiving hardware is functioning because my python-can script works on windows.
drebbe-intrepid commentedon Jun 26, 2023
@dwood-appareo thanks for the update, I'm assuming on windows you are using icsneo40 and not libicsneo correct?
I'm dealing with power outage and internet issues right now so I'm delayed on getting to this at the moment. Thank you for all the information.
dwood-appareo commentedon Jun 26, 2023
I believe so? I got the drivers from installing Vehicle Spy.
drebbe-intrepid commentedon Jun 26, 2023
ics.get_library_path()should tell you exactly what you are using on windows.dwood-appareo commentedon Jun 26, 2023
icsneo40.dll on windows.
drebbe-intrepid commentedon Jun 26, 2023
thanks, we will look into this ASAP.
dwood-appareo commentedon Jun 26, 2023
Thank you, please reach out if you need more information.
drebbe-intrepid commentedon Jun 28, 2023
@dwood-appareo we are able to reproduce this internally. We are working on fixing it. As for the version being old, it looks like an older version of pip can only install up to 910.10. pip must have broke compatibility upstream somehow.
dwood-appareo commentedon Jun 28, 2023
Great that you were able to reproduce it, looking forward to an update.
kjohannes-intrepidcs commentedon Jun 28, 2023
@dwood-appareo we found the issue and pushed a fix to libicsneo, and I have checked it on 912.4 with libicsneo commit 9ef93eb73e1ada72ccc7a571744b9db1a564f18b. Would you please give this a try? Thank you very much for your clear report and cooperation!
Updated libicsneo hash to fix CANFD length issue. #150
updated libicsneo to fix CANFD payload error. #150
drebbe-intrepid commentedon Jun 29, 2023
@dwood-appareo Although I don't have arm releases yet, I've pushed v912.4post1 with this fix to PyPI.
dwood-appareo commentedon Jun 30, 2023
I have checked out that tag and rebuilt and confirmed my package as v912.4post1, I am still not seeing payloads on CAN FD frames, I also explicitly set ics.override_library_name to the correct .so built from the referenced hash and experienced the same results.
drebbe-intrepid commentedon Jul 10, 2023
@dwood-appareo we are having a hard time reproducing this here. We did run into a couple issues where we ended up with stale/old versions left over on our test machines. I would triple check there aren't any old versions of libicsneo laying around and same with
python_ics. I've seen issues with pip if installing from PyPI andsetup.py. Running pip uninstall until it complains nothing can be found seems to resolve that issue.drebbe-intrepid commentedon Aug 10, 2023
@dwood-appareo I'm closing this out, I'm under the assumption this has been resolved. Please feel free to reopen this if this isn't the case.
Updated libicsneo hash to fix CANFD length issue. intrepidcs#150