# Machine Code UDP Send Message

**URL:** <https://discourse.agopengps.com/t/machine-code-udp-send-message/10967>\
**Category:** Software\
**Created:** [20 December 2022 15:11 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967 "2022-12-20T15:11:05Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![WHFarms](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/w/ecae2f/32.png) [@WHFarms](https://discourse.agopengps.com/u/WHFarms)\
**Post date:** [20 December 2022 15:11 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/1 "2022-12-20T15:11:06Z")

</div>

Does anyone know where @BrianTee_Admin sends the message to the machine board in the AOG solution file. I would like to copy this message and send it to a UDP socket on another machine so I can connect the AOG autosteer monitor to another monitor for an implement. I would be sending speed, workswitch. Speed is speed but the second variable would stop the seed from planting when I reach my boundary and I would make a loud audible signaling to manually lift the 3 pt arms.

Im sure thats claear as mud.

---

<div class="post-metadata">

**Author:** ![bricbric](https://discourse.agopengps.com/user_avatar/discourse.agopengps.com/bricbric/32/9918_2.png) [@bricbric](https://discourse.agopengps.com/u/bricbric)\
**Post date:** [20 December 2022 16:08 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/2 "2022-12-20T16:08:41Z")

</div>

did you check arduino code of machine module?  
you can get info from here and hope to you to use as you want ?

---

<div class="post-metadata">

**Author:** ![andyinv](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/a/ecccb3/32.png) [@andyinv](https://discourse.agopengps.com/u/andyinv)\
**Post date:** [20 December 2022 16:18 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/3 "2022-12-20T16:18:55Z")

</div>

I might be wrong, but isn’t it broadcasting to the entire subnet already? I thought I saw something saying that was already happening. A quick look with Wireshark will confirm.

---

<div class="post-metadata">

**Author:** ![WHFarms](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/w/ecae2f/32.png) [@WHFarms](https://discourse.agopengps.com/u/WHFarms)\
**Post date:** [20 December 2022 19:19 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/4 "2022-12-20T19:19:09Z")

</div>

I did check this code. I was specifically looking for the code inside the VB application.

---

<div class="post-metadata">

**Author:** ![bricbric](https://discourse.agopengps.com/user_avatar/discourse.agopengps.com/bricbric/32/9918_2.png) [@bricbric](https://discourse.agopengps.com/u/bricbric)\
**Post date:** [20 December 2022 19:38 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/5 "2022-12-20T19:38:36Z")

</div>

check the code  
 ![image](https://discourse.agopengps.com/uploads/default/original/2X/b/bb6fdd4914cc9f9e981d41ad9bc3676457084e16.png)

you can find value

 ![image](https://discourse.agopengps.com/uploads/default/original/2X/e/eac6ef447bba0664678bba46f3a90d2eee359a89.png)

for example at the end they add explantaion for GPS speed

 ![image](https://discourse.agopengps.com/uploads/default/original/2X/a/acfd8701097af08836c3bcb72864be811e5a2288.png)

---

<div class="post-metadata">

**Author:** ![WHFarms](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/w/ecae2f/32.png) [@WHFarms](https://discourse.agopengps.com/u/WHFarms)\
**Post date:** [20 December 2022 20:25 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/6 "2022-12-20T20:25:04Z")

</div>

This is the wrong direction. I want aog to broadcast.

Cory Raisbeck  
Whispering Hill Farms  
(608)412-2867

---

<div class="post-metadata">

**Author:** ![Raycorp](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/r/dec6dc/32.png) [@Raycorp](https://discourse.agopengps.com/u/Raycorp)\
**Post date:** [20 December 2022 20:58 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/7 "2022-12-20T20:58:59Z")

</div>

Look for pgn\_233 in visual studio. Udp designer and position designer. Not behind pc so i think i forget some.

---

<div class="post-metadata">

**Author:** ![m\_elias](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/m/94ad74/32.png) [@m\_elias](https://discourse.agopengps.com/u/m_elias)\
**Post date:** [20 December 2022 21:42 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/8 "2022-12-20T21:42:39Z")

</div>

I thought AoG was already broadcasting

---

<div class="post-metadata">

**Author:** ![PotatoFarmer](https://discourse.agopengps.com/user_avatar/discourse.agopengps.com/potatofarmer/32/11865_2.png) [@PotatoFarmer](https://discourse.agopengps.com/u/PotatoFarmer)\
**Post date:** [20 December 2022 22:47 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/9 "2022-12-20T22:47:47Z")

</div>

AOG uses PGN codes to transfer information.

The IP address of the device allows it to join the same network,

Each device then either sends data, or listens for data at pre determined PORT numbers. Any device listening to these ports on the network can read the data being sent. then dependant on the programming of the device it can choose what to do with the Data.

The actual data streaming from the PORT, is the PGN. The PGN is a message of encoded data that is broadcast to any device listening at the PORT where it is created.

 ![image](https://discourse.agopengps.com/uploads/default/original/2X/5/5c0687f47af1644e8bd285405aefd949f2185513.png)

Moving Data is much like moving water,  
IP address 192.168.0.xxx = The water well, tank or trough location, all water devices need to be on the yyy.yyy.yyy.xxx (sameFarm#.sameWell#.samePump#.differentdevice#)  
Port Number = The water tap description  
PGN = The type of water  
LAN Cable / Wifi = The hose  
Network Switch / Router = Flow Splitter

---

<div class="post-metadata">

**Author:** ![WHFarms](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/w/ecae2f/32.png) [@WHFarms](https://discourse.agopengps.com/u/WHFarms)\
**Post date:** [21 December 2022 02:45 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/10 "2022-12-21T02:45:07Z")

</div>

I don’t think it does a true broadcast . I’ll confirm tommorrow when I am in front of visual studio. I think it sends a message to a specific board over uDp. I’m assuming that’s we the MAC addresses are in the arduino code.

Someone that suggested doing a search for the pgn number. I think that will get me to the proper place. I’ll follow up with more info once I learn more.

---

<div class="post-metadata">

**Author:** ![m\_elias](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/m/94ad74/32.png) [@m\_elias](https://discourse.agopengps.com/u/m_elias)\
**Post date:** [21 December 2022 02:52 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/11 "2022-12-21T02:52:40Z")

</div>

It uses the broadcast IP of x.x.x.255 but you have to listen on the correct UDP port according to the PGN you want.

---

<div class="post-metadata">

**Author:** ![PotatoFarmer](https://discourse.agopengps.com/user_avatar/discourse.agopengps.com/potatofarmer/32/11865_2.png) [@PotatoFarmer](https://discourse.agopengps.com/u/PotatoFarmer)\
**Post date:** [21 December 2022 03:16 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/12 "2022-12-21T03:16:03Z")

</div>

> [@m\_elias](#):
>
> you have to listen on the correct UDP port according to the PGN you want.

Exactly this ⬆ ⬆ ⬆

This is how we are pulling off 64 sections, 4 cards with different Ip’s all staring at the same PORT to receive the same PGN at the same time. Then the individual module knows what 16 sections it is responsible for out of the 64 in the PGN message.

---

<div class="post-metadata">

**Author:** ![Ray\_Jorgensen](https://discourse.agopengps.com/user_avatar/discourse.agopengps.com/ray_jorgensen/32/7635_2.png) [@Ray\_Jorgensen](https://discourse.agopengps.com/u/Ray_Jorgensen)\
**Post date:** [21 December 2022 11:25 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/13 "2022-12-21T11:25:20Z")

</div>

If you are connected by udp you can just put a print statement in the ino plug in your usb cable and see what info is being sent. Just found this out and it is handy!

---

<div class="post-metadata">

**Author:** ![Raycorp](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/r/dec6dc/32.png) [@Raycorp](https://discourse.agopengps.com/u/Raycorp)\
**Post date:** [21 December 2022 11:51 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/14 "2022-12-21T11:51:15Z")

</div>

With alot of help from commonRail i have used pgn\_233 to create a XTE string. Added code in the .ino and send to serial5 and use ttl to rs232 to send out the XTE string.

Works great.

---

<div class="post-metadata">

**Author:** ![Gruni](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/g/cdc98d/32.png) [@Gruni](https://discourse.agopengps.com/u/Gruni)\
**Post date:** [21 December 2022 11:56 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/15 "2022-12-21T11:56:15Z")

</div>

Do you want steer control on your trailer?

---

<div class="post-metadata">

**Author:** ![WHFarms](https://discourse.agopengps.com/letter_avatar_proxy/v4/letter/w/ecae2f/32.png) [@WHFarms](https://discourse.agopengps.com/u/WHFarms)\
**Post date:** [24 January 2023 10:07 UTC](https://discourse.agopengps.com/t/machine-code-udp-send-message/10967/16 "2023-01-24T10:07:10Z")

</div>

I got this to work. The real trick is parsing the hex array from aog to a readable format. By default the uDp socket is expecting a string or “bag of bits” but once I got it to remain native I now can get and send messages.

Now aog can trigger the work switch and my planter monitor turns the planter in and off accordingly plus I can do rate control by speed.

Im working on the pcb now but will share once completed
