msacco created a new topic ' How ASIAIR works?' in the forum. 3 years ago

Hey, I was just curious how ASIAIR works 'under the hood' in more details as it seems pretty interesting. I understand the basics, it's simply a RPI running indi drivers, phd etc, etc..It's pretty straight forward I guess, but I'm wondering is how the communication between the RPI itself and the ASIAIR app works, I assume it's some API between the RPI and the app, but what kind of API is implemented there? Is it simply the INDI drivers API and then the app/RPI simply sends the data to each other? What about PHD or some other external softwares?

Just trying to expand my knowledge here, so if you could answer in details that would be much appreciated. Thanks a lot for the help! :)

Read More...

msacco replied to the topic 'How HID 'drivers' are communicate?' in the forum. 4 years ago

TallFurryMan wrote: Linux HID communication is done from user space by reading and writing to the /dev device. There's a sample from a knowledgeable person at github.com/torvalds/linux/blob/master/sa...hidraw/hid-example.c .

The hidapi library is another way to go, check github.com/signal11/hidapi/blob/master/hidtest/hidtest.cpp .

Look up the hidapi support files in the indilib/indi repository, folder libs/indibase.



-Eric

jpaana wrote: INDI uses hidapi library which is layered on top of libusb so it works pretty much everywhere now, even Windows. There is a fairly clear basic example in the SX wheel driver ( github.com/indilib/indi-3rdparty/blob/ma.../indi-sx/sxwheel.cpp ) First you connect to the device with hid_open() which takes the vendor and device ids as parameters (which identify the device) to get a handle and then send data to the device with hid_write() and read responses back with hid_read() with that handle and eventually close the connection with hid_close(). So the basic communication is very easy
from user point of view, devil is in the details what to write and read :)


Thanks for the comments :)

Read More...

porkyhttp wrote: Yes random. I think that isrelated ti Arduino that reset on serial connection and the code ti ger the motore position. Capacitior should evitate this.


So.....I tried it with a 100nF capacitor, it seems like it does prevent auto reset as I wasn't able to upload firmware with it, and I was able without it.
But when I tried connecting the indi drivers, still that didn't work, I'm not really sure what the issue is :\

Any other ideas?
Thanks.

Read More...

msacco created a new topic ' How HID 'drivers' are integrated?' in the forum. 4 years ago

Hey, generally it's not a specific indi related question, but I believe asking here could be very knowledgeable.

So I'm wondering how HID drivers perform the connection to the platform(indi/ascom). Since HID is pretty much a native driver, there needs to be some way to determine that something has connected, and that it is actually the correct thing.
I've looked it up a bit on ASCOM, but didn't see any support for HID drivers, so I was wondering if for every HID device the "additional drivers" that comes with it for either ascom or indi needs to handle the connection between the platform and the device? Also, does it 'convert' the connection itself to be compatible with serial connection in a way?

Would love to get some input on how HID devices communicate and works with indi/ascom, sorry if I was talking nonsense.

Thanks a lot for the help! :)

Read More...

porkyhttp wrote: once that the code has been loaded you can connect the capacitor, if you need to reflash you have to disconnect it


Yes I'm aware of this, thanks a lot for all the help! :)

Read More...

porkyhttp wrote: I tested it now with and without the capacitor. Without the capacitor some problem in the connection with or without unplug the usb port. With the capacitor no problem on connection in about 10 times


That is awesome! I'll give it a shot when I get the chance, I have some capacitors, but I'm not sure I have exactly 10uF capacitor, do you know if it makes much of a difference?

Thanks :)

Read More...

porkyhttp wrote: Yes random. I think that isrelated ti Arduino that reset on serial connection and the code ti ger the motore position. Capacitior should evitate this.


That's very interesting, I'll surely give it a try when I have the chance, will you be able to let me know if you tried it too?

Thanks!

Read More...

porkyhttp wrote: I do not know the problem, but it is not related to the arduino code, or the moonlite driver. I have the same issue with myfocuser 2 pro, but i need to try with the capacitor. Other times it connects without problems


Oh you're experiencing the exact same problem?

Read More...

porkyhttp wrote: Try to install a 10uF capacitor connected betwee GND and RST arduino's pin


There was a capacitor initially, but it worked flawlessly on windows with whatever program I used(SGP, NINA, firecapture, sharpcap), so I didn't install it on the new arduino board.
The capacitor should disable auto reset or something like that I think, is there any logic for it to work on windows and not work with indi?

Read More...

wvreeven wrote: Disconnect the moonlite and eqmod, open a terminal and type

dmesg -w

This will print out all kernel messages so far and will wait (that's what the -w does) for new messages. Now plugin the moonlite. Now leave the moonlite connected and also connect the eqmod. Copy the new lines and paste them here.


Wouter


I currently don't have access to my mount, I don't think I'll be able to reproduce this with simulator drivers unfortunately.
Basically that's what I received though:
2020-06-14T17:22:12: [INFO] Error retreiving data from MoonLite, please ensure MoonLite controller is powered and the port is correct.
2020-06-14T17:22:12: [INFO] Handshake failed after 3 attempts
2020-06-14T17:22:08: [ERROR] Handshake Attempt 2, updatePosition response error: Timeout error.
2020-06-14T17:22:12: [ERROR] Handshake Attempt 3, updatePosition response error: Timeout error.

Read More...

knro wrote: After you plug the moonlite, what does dmesg say? does it get assigned port?


I'm not sure where I should see that?

Read More...

Hi, I recently bought a raspberry pi 4B(4GB), yesterday I was excited to try my first attemp with it, but I had 2 issues I've encountered with:
1. Whenever I connected my USB(from the USB HUB) to the USB3 port, for a weird reason the wifi/hotspot stopped working, can't really tell why, it's a powered USB HUB, so it shouldn't draw too much power from the rasbperry pi.
Eventually I've simply connected the hub to a usb2 port and that fixed the issue.

2. After I solved the first issue, I ended up with another frustrating issue, I'm using a DIY focuser(ardufocus, which is compatible with moonlite focus drivers), for a weird reason, I didn't manage to get both my moun(EQMOD) and focuser to connect at the same time.
According to the connected USB's, both were connected, but I was only able to connect one at a time, if the EQMOD was connected, the focuser wasn't able to be found, and if the focuser was connected, I couldn't connect to the EQMOD.

I didn't manage to solve this issue, I also tried connected both of them directly to the raspberry pi and not through the USB hub, but that didn't help. Eventually after around 2-3 hours of trying to troubleshoot and google, I simply gave up, connected everything to the USB hub and then to my laptop and imaged with it.

Any ideas what could be the issue?
Thanks.

Read More...

That helped me so much guys, thanks a lot for the help! Much appreciated :)

Read More...

jerry wrote: Hi,
Indi Web Manager can control and provide an indication of what indi services are running. www.indilib.org/support/tutorials/162-indi-web-manager.html
I have it running on an Odroid-N2 under ubuntu, so I can't comment on its suitability/compatibility under raspbian.
Cheers
Jerry

wotalota wrote: Reading through the entries under indilib.org/about.html provides a good overview. You generally monitor and control the indi
drivers from a client running locally or remotely. KStars/Ekos can also be run on the Rpi although it will be under powered. More common I think is for a client to communicate remotely to a Rpi running the drivers.


Thanks for the commends, I'm wondering though, if I'm running a raspberry pi headlessly, without actually having another machine running a client, can I validate that some driver is connected?
If so, how would I go about testing that?

Read More...

Hey guys, got a raspberry pi recently and I'm trying to understand some of the basics of indi. Yes, I'm totally aware of the fact that there is astroberry which is a ready image, still, I like to learn how things work.
So I have installed a fresh raspbian image, I have installed indi which includes the server and the actual indi drivers, I did manage to start a server and obviously I'll need some software to "talk" to it, but on the raspberry pi level, is there any way of knowing that some device is "ready" or connected?

E.g:

indiserver -v indi_simulator_focus

This starts an indi server, so I guess that now the raspberry pi can talk to a client trying to access this driver? Can the raspberry pi communicate with itself? (I know it doesn't really make much sense...) For example, instead of connecting from a client(android, web, etc), control the driver directly from the raspberry pi itself? I assume that this is what happens under the hood maybe, the client simply sends commands to the raspberry pi which then forwards that to the drivers?

Sorry for the dumb questions, just trying to understand some of the basics and how some things work.
Thanks! :)

Read More...