This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't access slew settings
#11
I put an image you can try:
http://pypilot.org/images/tinypilot_20200109.img.xz

I did not implement a way to transmit the nmea as a tcp client, but this could be accomplished in a script of maybe 20 lines. It seems both pypilot and your xb8000 act as tcp servers.
Reply
#12
Cool thanks, I'll try it as soon as I have a chance to go ashore and download on WiFi.
Reply
#13
Hi Sean,

Great news, I was able to get on wifi ashore and install the new version. It seems to be working - I set slew settings with the web interface and it has not forgotten them! Now I can actually play with the slew values to find the optimum setting. Testing it while swinging at anchor, 10 seems to be a good value and I'm not getting any over-current errors.

Thanks very much for the quick fix.

To work around the missing port number settings for wifi client connections, I tried putting the following at the bottom of bootlocal.sh to create a netcat pipe but it doesn't seem to do anything:

Code:
sleep 40
nohup sh -c "nc localhost 20220 | nc 192.168.15.1 39150" &

The xb8000 doesn't act as a router (won't let me connect to the pypilot by ssh from another client device) as far as I can tell, it's purely an NMEA server which blocks all other connections, so it seems there is no way to connect to the pypilot to debug it while it is connected to the xb8000 (unless there's a way to connect a terminal by usb?).

When I reboot the pypilot back into AP mode using the LCD menu, it tries to use the SSID of the XB8000. this is a bug - it should have separate SSID and password settings for client and AP modes, otherwise when you switch modes it will try to impersonate the device it was just connected to!

I hacked around to hard code a different SSID in bootlocal.sh to be used in server mode, inserting this seems to work as a temporary fix:
Code:
if [ "$MODE" = "Master" ]; then
    SSID="ohana_pilot_nomap"
    KEY="mypassword"
fi

Unfortunately having rebooted of course all the logs are gone so I have no way to see why it wasn't forwarding NMEA to the XB8000.

Can anyone with a conventional router on board who can connect to the tinypilot by ssh while it is in client mode try the nc bridge example above (with the right port for your wifi server of course) and see why it isn't doing anything please?

Thanks!
Reply
#14
(2020-01-14, 10:26 PM)syohana Wrote: Hi Sean,

Great news, I was able to get on wifi ashore and install the new version. It seems to be working - I set slew settings with the web interface and it has not forgotten them! Now I can actually play with the slew values to find the optimum setting. Testing it while swinging at anchor, 10 seems to be a good value and I'm not getting any over-current errors.

Thanks very much for the quick fix.
Let me know if you have any other problems with servo or slew settings.
Quote:To work around the missing port number settings for wifi client connections, I tried putting the following at the bottom of bootlocal.sh to create a netcat pipe but it doesn't seem to do anything:
There are not missing port numbers... pypilot never supported client connections, it has always only acted as a server. This is definitely something I could support and it can be configured by the web interface.
Quote:
Code:
sleep 40
nohup sh -c "nc localhost 20220 | nc 192.168.15.1 39150" &
This is not very robust ( won't work when connections reset) and won't work in both directions.

At the very least it could be added as a service so it can automatically respawn.
Quote:The xb8000 doesn't act as a router (won't let me connect to the pypilot by ssh from another client device) as far as I can tell, it's purely an NMEA server which blocks all other connections, so it seems there is no way to connect to the pypilot to debug it while it is connected to the xb8000 (unless there's a way to connect a terminal by usb?).
It's possible to get a terminal by usb but this is not standard. The easiest way to debug is probably a monitor and keyboard on the raspberry.

It's unfortunate the xb8000 isn't a router.. In my opinion an ad-hoc wifi network is ideal on a boat because any device can go down and all the others can still communicate. Unfortunately this is a very unpopular wifi network topology.

Quote:When I reboot the pypilot back into AP mode using the LCD menu, it tries to use the SSID of the XB8000. this is a bug - it should have separate SSID and password settings for client and AP modes, otherwise when you switch modes it will try to impersonate the device it was just connected to!
This is interesting! There isn't really an easy way to type the ssid from the keypad. I didn't really worry about it since you can change the ssid from the web interface, and I always used the ssid of pypilot because as a client to another pypilot the lcd/keypad interface provides an additional control head.

Quote:I hacked around to hard code a different SSID in bootlocal.sh to be used in server mode, inserting this seems to work as a temporary fix:
Code:
if [ "$MODE" = "Master" ]; then
    SSID="ohana_pilot_nomap"
    KEY="mypassword"
fi
I'll have to come up with a better fix for the future to have a separate ssid to make switching easier.

It would also be cool to switch from ap and client mode without rebooting.

Quote:Unfortunately having rebooted of course all the logs are gone so I have no way to see why it wasn't forwarding NMEA to the XB8000.

Can anyone with a conventional router on board who can connect to the tinypilot by ssh while it is in client mode try the nc bridge example above (with the right port for your wifi server of course) and see why it isn't doing anything please?

Thanks!

it's difficult to say the reason without an xb8000, but I suggest using a very short simple python script to do what you want, or eventually I will implement it with a web interface to configure for a future pypilot version.
Reply
#15
Thanks Sean, yes I'm sure a python script would work better but I've barely used python and at the moment I don't have the time to learn, nor do I have enough bandwidth to google for the answers! Therefore I stuck to shell commands which are more familiar and should do the job. It was intended as a proof of concept and I could make it more robust by running it as a service if it worked, but no point if it doesn't.

Adhoc wifi would be great but we have to work with the existing wifi NMEA products which are already installed on boats so it isn't really an option.

Quote:There are not missing port numbers... pypilot never supported client connections, it has always only acted as a server.  This is definitely something I could support and it can be configured by the web interface.

If it doesn't support connecting as an NMEA client then it's rather confusing that it offers to connect to wifi as a client at all. If it is connecting as a wifi client then you'd expect it to behave consistently and automatically work as a client for the NMEA connection too. I've never before encountered an NMEA device that connects to wifi as a client but then behaves as a server for serial connections. Every other app and device I use with nmea over wifi has a port number setting together with the wifi settings and doesn't have any option to behave as an nmea server.

Unfortunately I don't have a suitable HDMI monitor on board to connect directly. My only monitor is DVI dual link with two fixed resolutions available 1280x800 or 2560x1600. I have never managed to get anything to connect to it through an HDMI adapter.
Reply
#16
Hi Sean,

We did our first short passage since the update and had a few issues.

The physical buttons mostly stopped working after the update. I was able to configure the left/right 1 degree, menu and auto buttons through the web interface, but the button I programmed for left turns the boat to starboard and vice versa, so I had to swap them!

With the previous version we noticed that the left/right buttons were reversed in wind mode but correct in compass mode.

I can't make the select button work at all -  the button I programmed for "select" just exits the menu without selecting anything, so the LCD menus are unusable.

The update seems to have lost the compass calibration and I can't find any way to set the compass offset or calibrate the compass through the web interface. We had difficulty steering with the uncalibrated compass.

Finally, the compass heading display on the LCD freezes when the autopilot is engaged and only works when it is disengaged, so there is no way to see whether the pilot is actually steering on the set course.

So it seems this new version isn't quite ready. You did warn me!
Reply
#17
(2020-01-25, 04:25 PM)syohana Wrote: [color=#000000][size=small][font=sans-serif]Hi Sean,

We did our first short passage since the update and had a few issues.

The physical buttons mostly stopped working after the update. I was able to configure the left/right 1 degree, menu and auto buttons through the web interface, but the button I programmed for left turns the boat to starboard and vice versa, so I had to swap them!
I believe I swapped the manual controls because they were backwards before. So maybe left is actually starboard?
Quote:With the previous version we noticed that the left/right buttons were reversed in wind mode but correct in compass mode.
They are supposed to be reversed in wind mode because a higher wind angle means going more to port which is the opposite of compass mode.
Quote:I can't make the select button work at all -  the button I programmed for "select" just exits the menu without selecting anything, so the LCD menus are unusable.
The select button is optional, it exits the menu or switches the autopilot mode.

The menu button is what is used in the menu
Quote:The update seems to have lost the compass calibration and I can't find any way to set the compass offset or calibrate the compass through the web interface. We had difficulty steering with the uncalibrated compass.
Upgrading will lose the calibration and other settings if you don't back up the pypilot.conf and restore it. In the future I'm going to try to store the compass calibration and a few other parameters onto eeprom of the pypilot hat, but the current version doesn't have an eeprom.

Yes, this was an unstable release I pushed it quickly so you should set the slew rates without fully testing. I think I found that calibrating the compass didn't work in this image (I since fixed that)

So I suggest for now you go back to the last stable version, and the motor slew speeds should be set at least.
Reply
#18
Hi Sean, the backwards controls in wind mode are a crucial safety issue. The "right" button should always turn the boat to the right (starboard) by one degree, no matter what mode the pilot is in. The helmsman doesn't have time and may not remember to check what mode it is in every time they change course, or they might not be able to see the screen.

The pilot should always calculate which way to adjust the wind angle in order that the function of the buttons consistently turns the boat port (left or down button) and starboard (right or up button).

If the behaviour of the buttons is inconsistent then sooner or later it will cause a collision or a boat to run into rocks due to altering course in the opposite direction to what the user thought it would.

I don't want to lose the ability to adjust slew settings via the web interface it important that I can tune those once we are sailing.

Is there any way to fix the compass calibration in the web interface by patching the version I've got, over SSH? It's a really big job to take everything apart again and get the SSD card out because the pilot is built in next to the helm and I have to take a load of interior trim off to get to it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)