×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi / Rock Pi

  • Posts: 421
  • Thank you received: 102
I have a change that I need to commit to git, that you might be interested in. It enables the Abort button, as well as showing the current position in realtime as it's moving. Handy for people with focusers with 50,000 steps. :)

I should have that change committed to git sometime later today.
The following user(s) said Thank You: Andrew, Jon Carleton
2 years 9 months ago #71829

Please Log in or Create an account to join the conversation.

  • Posts: 215
  • Thank you received: 16
Last time I went you your git page, it was broken....  (no it wasn't...I was broken..."pilot error")

....and yes, that'd be handy.

While on the subject, I notice that WaveShare doesn't promote the dual HAT board anymore on their website. You can still find it if you dig. They seem more inclined toward small, single HAT boards for the pi. Do you know if any of those still work with the code. I imagine they would, if they use the same controller chip.

I may have to try one and see. The full-size double HAT board blocks the fan quite a bit and gives me thermal issues when I run Siril for stacking on the pi (which is a handy thing to do while waiting for an hour's worth of new images to come in).
Last edit: 2 years 9 months ago by Jon Carleton.
2 years 9 months ago #71851

Please Log in or Create an account to join the conversation.

  • Posts: 421
  • Thank you received: 102
The new changes are now committed on Github. I hope it still proves to be as reliable as ever, and that I didn't break something. :)

I looked on the Waveshare site, and I could only find one HAT that controls stepper motors: www.waveshare.com/product/raspberry-pi/h...tepper-motor-hat.htm

Do you have a link to the board you are talking about?
The following user(s) said Thank You: Jon Carleton
2 years 9 months ago #71860

Please Log in or Create an account to join the conversation.

  • Posts: 215
  • Thank you received: 16
My error. The board I was looking at (www.waveshare.com/motor-driver-hat.htm) is for two non-stepper motors. I mistook the output for the two coils of a stepper. Different chip anyway. Oddly enough, now that I have ordered two of the stepper-motor-hat boards, it comes right up in the search. I must have been having a bad digital day. (probably fat-finger syndrome).

Although, this looks interesting: www.robotshop.com/en/drv8825-stepper-mot...r-pins-soldered.html

By the way, ignore the PM and my complaint above about issues finding your github repository.  I have been dealing with the government a lot recently, where everyone seems to be INITIAL.LASTNAME, so when I tried to access your repository at github.com/k.ross, it failed.  My novel solution, since I had gone there from a link in this thread before, was to actually READ the thread again and get the appropriate link.  Success.  You are k-ross, not k.ross.

I look forward to trying your new modifications and will report back...if ever we get a clear night again.  The site clearoutside.com seems to be very fond of RED for the foreseeable future for NW Georgia.
Last edit: 2 years 9 months ago by Jon Carleton.
2 years 9 months ago #71893

Please Log in or Create an account to join the conversation.

  • Posts: 215
  • Thank you received: 16
Alas, a problem. I am running Ubuntu MATE for Pi4 64-bit. I can attest to the fact this is a non-Java error :)

Scanning dependencies of target indi_wmh_focuser
[ 20%] Building CXX object CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o
/home/jon/Projects/indi-wmh-focuser/wmh_focuser.cpp: In lambda function:
/home/jon/Projects/indi-wmh-focuser/wmh_focuser.cpp:346:12: warning: unused variable ‘ticks’ [-Wunused-variable]
346 | uint32_t ticks = (uint32_t) abs((int)targetPos - (int)FocusAbsPosN[0].value);
| ^~~~~
[ 40%] Building CXX object CMakeFiles/indi_wmh_focuser.dir/DEV_Config.cpp.o
[ 60%] Building C object CMakeFiles/indi_wmh_focuser.dir/DRV8825.c.o
[ 80%] Building C object CMakeFiles/indi_wmh_focuser.dir/bcm2835.c.o
[100%] Linking CXX executable indi_wmh_focuser
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::Connect()':
wmh_focuser.cpp:(.text+0x3b4): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::Disconnect()':
wmh_focuser.cpp:(.text+0x3f8): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: wmh_focuser.cpp:(.text+0x440): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::initProperties()':
wmh_focuser.cpp:(.text+0x4e0): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: wmh_focuser.cpp:(.text+0x58c): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o:wmh_focuser.cpp:(.text+0x640): more undefined references to `INDI::BaseDevice::getDeviceName()' follow
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::updateProperties()':
wmh_focuser.cpp:(.text+0x7d0): undefined reference to `INDI::BaseDevice::isConnected()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::ISNewNumber(char const*, char const*, double*, char**, int)':
wmh_focuser.cpp:(.text+0x934): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::ISNewSwitch(char const*, char const*, ISState*, char**, int)':
wmh_focuser.cpp:(.text+0xad8): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::_gotoAbsolute(unsigned int)::{lambda(unsigned int)#1}::operator()(unsigned int) const':
wmh_focuser.cpp:(.text+0xf64): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: wmh_focuser.cpp:(.text+0xfbc): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: wmh_focuser.cpp:(.text+0x102c): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o:wmh_focuser.cpp:(.text+0x1358): more undefined references to `INDI::BaseDevice::getDeviceName()' follow
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o:(.data.rel.ro._ZTV14IndiWMHFocuser[_ZTV14IndiWMHFocuser]+0x178): undefined reference to `non-virtual thunk to INDI::Focuser::SetFocuserMaxPosition(unsigned int)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/indi_wmh_focuser.dir/build.make:129: indi_wmh_focuser] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/indi_wmh_focuser.dir/all] Error 2
make: *** [Makefile:130: all] Error 2


Same error occurs on my x86_64 Xubuntu 20.04 desktop.
 
Last edit: 2 years 9 months ago by Jon Carleton.
2 years 9 months ago #71898

Please Log in or Create an account to join the conversation.

  • Posts: 421
  • Thank you received: 102
Hmm, all I can say is it works on my regular plain vanilla Raspbian Pi, with INDI and KStars built from source, as well as on an Astroberry setup, where I don't built INDI and KStars from source, but rather just use what's in the repository.

It looks like some mismatch between header and library files. Make sure libindi, and libindi-dev are up to date. I'm assuming you're using INDI and KStars from the repository, and not building them from source. What version is your libindi? "dpkg -l libindi" will tell you.
The following user(s) said Thank You: Jon Carleton
2 years 9 months ago #71909

Please Log in or Create an account to join the conversation.

  • Posts: 215
  • Thank you received: 16
Actually, I am not using the repository version. I have had issues with updates causing last minute issues to a previously working system, so I killed the sources.list entry and am running a straight, compiled version off github of indi-core and indi3rdparty. The previous indi_wmh_focuser version was happy with that. I did get libindi-dev from the ubuntu repository, so that may be the issue.

dpkg -l says: 1.9.1~202105310319~ubuntu20.04.1 on the x86_64

I blew away the ubuntu repository version of libindi-dev (1.8.1) and recompiled the github libraries on the pi4. They now report 1.9.1 However, the same link error comes up.

The previous version code still compiles without issue. I will try tomorrow to get the kstars repository version and see how that plays.
Last edit: 2 years 9 months ago by Jon Carleton.
2 years 9 months ago #71913

Please Log in or Create an account to join the conversation.

  • Posts: 215
  • Thank you received: 16
I dumped everything KStars/INDI related from the x86_64 Ubuntu Desktop and installed the KStars sources.list, then loaded KStars and INDI back into the machine from the repository. The versions seemed to be the same as the GitHub compiles when I looked at libindi and libindi-dev.

Same failed result. Perhaps a 64 bit OS issue? Although, the old code compiles just fine with all renditions of library code.

I didn't try on the Pi4, becuase that is working (with the old code) presently. If I break the Pi, the clouds will go away and otherwise we are not expecting a clear night for some time.
2 years 9 months ago #71945

Please Log in or Create an account to join the conversation.

  • Posts: 421
  • Thank you received: 102
Hmm, very odd that it used to work, and now it doesn't.

I will try on one of my 64 bit Debian Linux desktop machines later today (I don't have Ubuntu, but the test should still be valid). Currently I've only tried it on (32 bit) Raspbian.

BTW, you should be able to test on your Pi without breaking anything. Just download the Waveshare driver to a new folder, and try to build it, without installing it. You're getting errors in the build phase, not the install phase. As long as you don't run sudo make install, anything you do will be contained to that new folder, and won't affect your currently installed Waveshare driver.
2 years 9 months ago #71946

Please Log in or Create an account to join the conversation.

  • Posts: 215
  • Thank you received: 16
To be clear...

I have never been able to compile the latest version without error for all the 64bit OS combinations I have on hand.

I have ALWAYS been able to compile the previous version (code for which I still have) on all the 64bit OS combinations I have on hand and still can successfully compile that version, even after a failure of the current version. On either platform, I can simply go to ~/Projects/indi-wmh-focuser/build and run the compile commands and fail, then cd ~/Projects/old-indi-wmh-focuser/build and run the compile and succeed on either the Pi4 or X86_64. I did try refreshing the git on the new version with one of the machines, but that apparently wasn't an answer either.

Alas, I do not run Raspbian. And yes, seems odd.
2 years 9 months ago #71948

Please Log in or Create an account to join the conversation.

  • Posts: 215
  • Thank you received: 16
Hmmm... Apparently there is someting itchy about Ubuntu. I just tried the compile on a 18.04 Ubuntu Pi3 I had laying around with a fresh KStars repository install and got even more compile errors. Of course, 18.04 is a bit long in the tooth, so there's that. I may try putting Raspbian on that thing later on and see if I can get a compile to work.
2 years 9 months ago #71949

Please Log in or Create an account to join the conversation.

  • Posts: 421
  • Thank you received: 102
Ubuntu 18.04 has INDI version 1.7.1, which I know for certain is too old for my driver, it won't build. Or did you add the KStars PPA repository?

I have one last idea. Delete the build folder, recreate the build folder, and do the usual cmake .. and make maneuvers. cmake has been known to cache stuff in the build folder, that even running cmake again won't clear. Since you were trying different INDI versions, that could be a cause of mismatched libraries and headers.
2 years 9 months ago #71951

Please Log in or Create an account to join the conversation.

Time to create page: 0.469 seconds