Wireless autosteer program, easy to switch between USB and Bluetooth (with HC-05 bluetooth module)

If I understand well you ask if the COM port of USB will be the same than bluetooth COM port?

Of course no, the .ino (so program in the nano) don’t deal with COM port, just windows do it, Bluetooth device when paired create two COM port (input and output but I’m not sure of the translation), it’s output port which must be used.

Example :

  • USB on COM3
  • BT input COM4 (unused)
  • BT output COM5

You select it via AGIO.

Thank you, I was just wondering what the automatic part did, as I already have several Bluetooth com ports.

Ok,
Why don’t you use directly UDP, for me :
Wifi AP : (raspberry run rtkrcv)
Wifi STA : AOG on Surface
Autosteer (arduino nano)
Machine (indication of section status)
Led barr (indication of direction)
francois

The automatic part just select on which serial (hardware via USB or software via Bluetooth) the program will run.
In clear, it detect which serial is active and use it (USB in priority), this allow to upload a sketch despite HC-05 is enable or to remain on USB autosteer in case of bluetooth failure.

1 Like

My main interest was to use bluetooth, as it simply create COM port and is easy to set without other equipment, also BT is a less powerful radio source (I confess it’s purely by safety, BT is just estimated less dangerous but the source is close so it seem important to me).

Hi, I’m trying to get STEER data via COM port. I can see some data but I don’t understand the frame. How to decode this data?
I can`t see modbus settings.

Thanks a lot.

@Polegllass
It should be exactly the same data than over USB!
Are you sure TX from nano is connected to RX of HC-05 and RX to TX?

I must confess that after designing my own pcb box (Tranferable autosteer unit (TASU) by Blaise_fr - Thingiverse) I added a switch to turn off the 5V to the HC-05 that allow to use the USB in case of emergency (however to upload sketch via USB you need to disconnect TX or RX).
So I no more use that sketch which was specifically designed in case you don’t have place for that hardware solution.

Your job looks very good, congratulation.
I need to know what speed is via Machine COM 9600?
Also what type of protocol? Is that a UART or MODBUS?

@Polegllass
“Machine” port that you select in AGIO is dedicated to tools operations like sections ON/OFF or position of the rear hitch if I remember well (I never used it).

This sketch in only about the “Steer” connection, via USB COM port OR via bluetooth COM port (from HC-05).
The baudrate sent to the HC-05 via the virtual serial is the same than for USB “classic” hardware serial connection “SerialBT.begin(38400);”.

I hope I understood well your question.

Yes you exactly understand my question. I need connect relays DC 12V 8 Kanal RS485 Relais Modul Modbus RTU UART Fernbedienung Schalter DIN35 C45 Schiene Box für PLC PTZ Kamera Sicherheit Monito|Relais| - AliExpress in to “Machine” port.
At this video Modbus RTU-Relaisboard als Teilbreitensteuerung für AgOpenGPS - YouTube I see there is MODBUS interface used - not Serial BT bauderate 38400. Maybe you are right, and COM sends AT Commands to HC-05, but whenever I`m connection “Machine” COM Tx in to COM terminal Rx never get decodated data.

Great idea to use the hc05.
I understand that the .ino file is programmed to use agopengps V5.2.2
A question With the available files (Autosteer_USB_v5_0_withBTserial_V2) and agopengps V5.2.2 Does everything work with the kaupoi v4.1 pcb?

Maybe I’m wrong but I don’t believe there is a compatibility problem between any version of v5 and any kaupoi.
Honestly I don’t use anymore this .ino, if you ensure a RELIABLE CONNECTION between hc05 and the nano, bluetooth work fine, you only have to disconnect it to upload a new program on the nano (and you don’t do this often).

I even use bluetooth for everything now (steer/canbus, f9p, imu).

1 Like

So you have a complete wireless aog? With al components?

Yes, as here AOG Transferable hardware!

A question. Could you send the .ino files you use?
I’m still new to Arduino programming.
I bought an HC-05
I configured the hc05 with a ch340 usb converter
What I’m missing is getting the Arduino .ino file right
Using AOG version 5.7.2
I’m having a connection problem, maybe it’s the .ino file
The autosteer works for a few moments and disconnects

Aog can disconnect for many reasons.
First two that come to mind.

If your speed go below the set minimum.
If you have set/use either current or pressure cut off.
Also do you test this in “drive mode”? (expand steering settings window/

My system is operational using a USB cable
Using a usb hub I have an error
And I have it when using in Bluetooth mode
The engine starts for a few minutes and disconnects with the usb hub and with bluetooth

So usb is in use, also when running Bluetooth.
Many different hc-05 outthere, mine needed extra power to function at all. My usb to ttl could not supply enough.
Some Bluetooth devices need a lot of power, so feed it with 5v (3.3v ) from separate power supply.
USB 5v might not be enough.
Feed 3.3 from nano might not be enough.
Is it possible to give USB hub separate 5v in?