erfan

receiving the sended commends from mavproxy on the RPi

Recommended Posts

senario : My pc which is connected to the Ground radio  telemetry needs to send some messages say (hello) or on mavproxy commend (arm throttle) to the pixhawk telem 1,and on the pi which is connected to telem 2 , I need to receive these messages.
what I could do so far is :
Using mavproxy I can send some commends and the pixhawk will act on the commends , e.g arm throttle.(pixhawk port Telem 1 is connected to air radio telemetry).
I can also control the pixhawk using the pi , arm throttle ,... .( Pixhawk port Telem 2 is connected to the PI).
what I could not do is :
receiving the sended commends from mavproxy on the pi?
is there any body that can help to figure out this issue ?

@Spitfire76

Share this post


Link to post
Share on other sites
20 hours ago, erfan said:

senario : My pc which is connected to the Ground radio  telemetry needs to send some messages say (hello) or on mavproxy commend (arm throttle) to the pixhawk telem 1,and on the pi which is connected to telem 2 , I need to receive these messages.

MavProxy is effectively a control station that has a connection to a Pixhawk telemetry port and uses the MavLink protocol for control and telemetry the same as other control stations like mission planner. If I understand correctly it sounds like you want to be able to send messages from your PC to the companion computer, a Raspeberry PI, via the Pixhawk, correct ?. If you have a companion computer usually you want it to perform the control and get back telemetry but it will have its own link to a ground control station using wifi or 4G as it would also handle video. 

I think I understand what you are trying to do and that is to leverage the existing serial radio link that the Pixhawk has to also use to send messages to the Pi. If that's the case what you really need is to use that radio on the pi and not the Pixhawk. Let me know if this what you need and we can discuss further. 

 

Edited by Spitfire76

Share this post


Link to post
Share on other sites
1 hour ago, Spitfire76 said:

 If I understand correctly it sounds like you want to be able to send messages from your PC to the companion computer, a Raspeberry PI, via the Pixhawk, correct ?. 

 

Yes Exactly, Could you explain how this is done?

1 hour ago, Spitfire76 said:

 

I think I understand what you are trying to do and that is to leverage the existing serial radio link that the Pixhawk has to also use to send messages to the Pi. If that's the case what you really need is to use that radio on the pi and not the Pixhawk. Let me know if this what you need and we can discuss further. 

 

Yes that is exactly  what I need to understand .

so your suggestion is to connect the Air radio telemetry on drone side to the pi? I can connect them physicall by connecting the Air radio through usb to the pi .right?
 but do i need to write also some code ?
to connect the pi to the pixhawk: I use the pin 2,6,8,10 on pi side  and connect them to the pixhawk tem2 . right ?

Could you please explain it further?

Thanks

@Spitfire76

Edited by erfan

Share this post


Link to post
Share on other sites
3 hours ago, erfan said:

so your suggestion is to connect the Air radio telemetry on drone side to the pi? I can connect them physicall by connecting the Air radio through usb to the pi .right?

I was suggesting that but after further investigation it does seem that the RPi is restricted on the number of available serial ports. Of course you need one to connect from the Pi to the Pixhawk and its not clear to me if the USB one is accessible, I believe it depends on if it has onboard bluetooth. If range is not an issue would WiFi to the RPi be acceptable ?. Do you need the Pi to be on the drone or can it be on the ground and communicate with the Pixhawk via the serial wireless link ?

Maybe you could share more details of your intended application and I will try to help.

 

 

Edited by Spitfire76

Share this post


Link to post
Share on other sites

The range is indeed an issue. I want to send my drone to somewhere lets say 300m or 400m distance (or maybe more )and once its in the location and landed I get a message regarding that it is landed and give me a message to forexample Turn your LED on  and then I need to tell to the drone it needs to turn on  its led by writing the command or forexample  Start a measurment.

@Spitfire76

Edited by erfan

Share this post


Link to post
Share on other sites
12 hours ago, erfan said:

The range is indeed an issue. I want to send my drone to somewhere lets say 300m or 400m distance (or maybe more )and once its in the location and landed I get a message regarding that it is landed and give me a message to forexample Turn your LED on  and then I need to tell to the drone it needs to turn on  its led by writing the command or forexample  Start a measurment.

@Spitfire76

Ok,  what is the role of the Raspberry Pi ?. If you just need to turn on a LED you could simply use the aux outputs of the the HKPilot32. These can be controlled by either a mission script or a switch on the transmitter. 

http://ardupilot.org/copter/docs/common-relay.html

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.