Ravi Geschrieben June 5, 2020 at 15:13 Share Geschrieben June 5, 2020 at 15:13 Hi, I am using HAT zero Brick and Thermal sensor by FLIR. I am using these components since last 1 week or something and they were working fine until now. Now whenever I am trying to connect it via python script, I am just getting one response, did not receive response. I have also tried to connect it via brick viewer and there is not response at all. I have checked the host address, port address and UID, everything is correct. The shutter of the thermal sensor works some time. Tried attaching sensor at other ports B, and D, but the same response. What can be the problem here? thanks in advance. Ravi Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
rtrbt Geschrieben June 8, 2020 at 09:57 Share Geschrieben June 8, 2020 at 09:57 Hi, When you connect to the Pi with Brick Viewer, can you see the HAT Zero Brick in the setup tab? Is the brick viewer able to connect to the Pi at all? In any case it could be useful, if you post the Brick Daemon log file (/var/log/brickd.log) here. Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
Ravi Geschrieben June 8, 2020 at 12:29 Autor Share Geschrieben June 8, 2020 at 12:29 Hi, When I am connecting the Brick Viewer with Pi, I am not able to see the HAT Zero Brick. How can I check if brick Viewer is able to connect to the Pi or not? Meanwhile I am sending you the log file. I also have the file called 'brickd.log.1', if you want I am happy to send you. Kind Regards, Ravi brickd.log Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
rtrbt Geschrieben June 8, 2020 at 13:34 Share Geschrieben June 8, 2020 at 13:34 The log looks okay so far. If the Brick Viewer can't connect to the Pi, you should get a message box indicating the error. If no error is reported, then the connection succeeds but the Brick Daemon running on the Pi does not see any hardware. To verify this, you can stop the Brick Daemon with sudo systemctl stop brickd and then start a non-daemonized instance with debug logging: sudo brickd --debug -all,+bricklet.c If the HAT is detected, you will get output like this: 2020-06-08 14:27:57.143360 <D> <bricklet.c:182> Found product_id "0x085d" in device tree, using pre-configured HAT Zero Brick setup 2020-06-08 14:27:57.144827 <D> <bricklet.c:220> Bricklet found: spidev /dev/spidev0.0, driver 1, name gpio27 (num 27) If this output is missing, the HAT is not detected. Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
Ravi Geschrieben June 9, 2020 at 08:38 Autor Share Geschrieben June 9, 2020 at 08:38 I have tried this solution and got this (Could not open HAT product_id in device tree, not using pre-configured HAT Brick setup ) sort of error (please find it in attachment). I guess the configurations got changed by me at some Point. How can I use the pre-defined configurations? Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
borg Geschrieben June 9, 2020 at 09:36 Share Geschrieben June 9, 2020 at 09:36 Hard to say why you don't have the deive-tree, the easiest solution is probably to just configure it by hand, see here: https://www.tinkerforge.com/en/doc/Hardware/Bricks/HAT_Zero_Brick.html#compatibility-to-other-boards-and-images Add the lines from the documentation to your /etc/brickd.conf and turn spi interface on with raspi-config. Then the brickd doesn't have to configure anything by reading out the device-tree first and it should just work. Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
Ravi Geschrieben June 9, 2020 at 12:36 Autor Share Geschrieben June 9, 2020 at 12:36 in /etc/brickd.conf, there are other Contents. Do you want me to replace everything or just past these configurations at the end? Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
rtrbt Geschrieben June 9, 2020 at 12:46 Share Geschrieben June 9, 2020 at 12:46 The default content is the same as if the brickd.conf file was empty. So to be sure, that nothing is misconfigured, you can replace everything. Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
Ravi Geschrieben June 9, 2020 at 13:29 Autor Share Geschrieben June 9, 2020 at 13:29 I have tried, now I am getting "could not connect error". I have tried to check the config using "brickd --check-config" and got brick config error. I am also attaching the log file. brickd.log Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
rtrbt Geschrieben June 9, 2020 at 13:48 Share Geschrieben June 9, 2020 at 13:48 The relevant error message in your brickd.log is Quote 2020-06-09 15:13:17.249677 <E> <bricklet_stack_linux.c:100> Could not open /dev/spidev0.0: ENOENT (2) You have to enable the SPI device by running sudo raspi-config and then selecting "Interfacing Options" and "SPI" and answering yes. brickd --check-config does not work, because you are not running it with sudo, so it tries to check the non-existing user specific config file. Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.