Changing HVAC information brings errors on CAN bus.

Description

In Icefish 9.0.0 I got following error while changing temperature

Mar 17 15:20:36 inf-agl-devstation afbd-hvac@0.1[1605]: qml: Left Temp changed 16
Mar 17 15:20:36 inf-agl-devstation afbd-agl-service-can-low-level@9.0[464]: ERROR: [API low-can] Error sending : 9 Bad file descriptor /w/workspace/release-jjb-icefish-snapshot/MACHINE/intel-corei7-64/label/agl-test-slave/repoclone/output/tmp/work/corei7-64-agl-linux/agl-service-can-low-level/9.0.0-r0/git/low-can-binding/utils/socketcan-bcm.cpp:110,write_message
Mar 17 15:20:36 inf-agl-devstation afbd-agl-service-can-low-level@9.0[464]: ERROR: [API low-can] Error write message id : 48 /w/workspace/release-jjb-icefish-snapshot/MACHINE/intel-corei7-64/label/agl-test-slave/repoclone/output/tmp/work/corei7-64-agl-linux/agl-service-can-low-level/9.0.0-r0/git/low-can-binding/binding/low-can-subscription.cpp:755,tx_send
Mar 17 15:20:36 inf-agl-devstation afbd-agl-service-can-low-level@9.0[464]: ERROR: [API low-can] Error sending : 9 Bad file descriptor /w/workspace/release-jjb-icefish-snapshot/MACHINE/intel-corei7-64/label/agl-test-slave/repoclone/output/tmp/work/corei7-64-agl-linux/agl-service-can-low-level/9.0.0-r0/git/low-can-binding/utils/socketcan-bcm.cpp:110,write_message
Mar 17 15:20:36 inf-agl-devstation afbd-agl-service-can-low-level@9.0[464]: ERROR: [API low-can] Error write message id : 48 /w/workspace/release-jjb-icefish-snapshot/MACHINE/intel-corei7-64/label/agl-test-slave/repoclone/output/tmp/work/corei7-64-agl-linux/agl-service-can-low-level/9.0.0-r0/git/low-can-binding/binding/low-can-subscription.cpp:755,tx_send

 

I added a slcan device as slcan0 and changed /etc/dev-mapping to hs="slcan0"  (was not sure if it is necessary but changed ls to "slcan0" too) and /etc/hvac.json "can_device": "slcan0"

 

Environment

Up Squared Icefish 9.0.0

Activity

Show:

Scott Murray 
August 19, 2020 at 4:45 PM

In Icefish, agl-service-hvac is using the low-can write support, so I would not expect /etc/hvac.json to do anything.  It's likely there's something else going on, I'll try and get to some experiments to see if I can reproduce.

Thomas Walzer 
July 3, 2020 at 7:21 AM

Okay I think I have now all the changes that are necessary. I starting my socketcan-service now after the networkd.service (propably to early but I haven't problems with that up to now). CANbus is working and I get updateted Information in the dashboard when I send the right can-data. That means mph are changing.

But hvac is not working more or less the hvac-service  I changed /etc/hvac.json changes according to my candevice

 

 

 

 

here is the output of jouralctl -f

 

 

 

 

 

 

 

Scott Murray 
June 30, 2020 at 5:11 PM

, I wouldn't expect your service to be getting started with your changes, as you're not adding a dependency on it anywhere.  As I mentioned in my previous comment, look at what is done in the do_install_append in meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bb in Icefish. You should be able to do the same with afm-api-low-can@.service, i.e. add a dependency in an over-ride conf file in /etc/systemd/system/afm-api-low-can@.service.d, that would result in your service being started before low-can automatically.

Thomas Walzer 
June 30, 2020 at 8:07 AM

: I've done the first steps https://git.automotivelinux.org/AGL/meta-agl/commit/?h=sandbox/walzert/can_build&id=bfe2291f5cd0a014bd7ef2904b08083b14ca6eb0

Do I have to do more than adding the socketcan*.service something like the enable? I recognized that you added

is that necassary to enable the service? Because my service was not starting on boot. But I could do it manually.

Just adding " <param name="urn:AGL:permission::platform:can:write" value="required" />" to  the "config.xml" is working. I can now write the values over canbus. But the hvac is not working at the moment , I'm doing a further research about that.

But I wll try it by a whole image that I will build.

 

 

Thank you for your help so far (: .

Thomas Walzer 
June 26, 2020 at 12:06 PM

: first I installed a new building machine to do all the changes hope it is now working. I'm currently in the building process and waiting for finishing that.

For your information I don't have experience with yocto at all, beacuse ot that my questions might be stupid. I was digging in the meta-agl files and used the top-bottom approach from the hvac-application:

 

 

 

 

I have to change information here https://git.automotivelinux.org/apps/agl-service-hvac/tree/hvac.json

 

 

change information here https://git.automotivelinux.org/AGL/meta-agl-demo/tree/recipes-config/dev-mapping-demo/dev-mapping-demo/dev-mapping.conf.demo

 

As I see in dev-mapping there is a " RPROVIDES_${PN} = "virtual/low-can-dev-mapping" and in agl-service-can-low-level there is a "RDEPENDS_${PN} = "virtual/low-can-dev–mapping" but in the further services/apps  there is no "RDEPENDS_${PN}"

 

My idea was now to add in dev-mapping a section that copies my service in the system. Like in the example that you mentioned.

Is it stupid to change that files locally or do I have to fork that repos and then change the paths in the different systems?

 

Inactive

Details

Assignee

Reporter

Hardware Platform(s) Affected

Intel Upsquare

Components

Affects versions

Priority

Created March 17, 2020 at 2:23 PM
Updated March 29, 2023 at 6:40 PM
Resolved March 29, 2023 at 6:40 PM