as the connection to the web app is working, I am trying to debug my local server solution.
Therefore I am missing information on how to get onto the Arduino in order to debug.
If I am right, there are only two ways:
- ssh or telnet
- connect a display
The last thing does not work for me, so my question is how to activate SSH? I saw that one only needs
to create a ssh file on the SD card (before flashing???) and then it would active the ssh access with user pi
and pw raspberry but that did not work for whatever reason. Is that still valid? How to debug the thingi…
You will be best off to use the Arduino development tools (aka IDE) and associated debugger.
Uuuuh that is a hard slap…
There should be a possibility to connect via SSH an read logfiles in order to see where the bot is stuck?!!
I know that it connect to the WLAN but then does not connect to the server…
Sorry, didn’t mean to offend. Was just offering advice. I’ve seen elsewhere on the forum and on the development site that “serial” debug tot he Arduino is the only way to go. At one time, they had SSH open to the Pi, but that is not enabled any more as it is a security risk. To access the Pi, you’d have to build the farmbot OS with SSH functionality, which again is quite doable.
I’m not affiliated with FarmBot in anyway, however I’ve pulled their code and had a look and am quite familiar with both the Pi and Arduino.
That was meant more the ironic way than I would be offended
But there must be a good debug solution?! If not now in this stage when else???
That is really the hardest thing at the moment, to debug this thing. Even if I follow the paths of the official
farmbot server application I would need this kind of log information etc… -.-
The easiest way to debug at the Arduino level for published releases is to use the Arduino IDE Serial Monitor.
You can view messages the firmware is sending by opening the Serial Monitor (in the Tools menu of the Arduino IDE software) after plugging the Arduino into your computer. See the response section of the Farmbot Arduino Firmware readme for more information about the log messages.
Sorry @Gabriel & @bgmoon I just saw that I was asking about the Arduino but meant the Rasp!
Is there no way currently to get into it and read log files etc.?
Is the only information source intended to be the web app?
Yes, FarmBot OS logs from the Raspberry Pi are sent to the web app. You can insert a USB flash drive into the Raspberry Pi and logs will download to it, but those are the same logs as the messages in the web app.
it seems that the message log in the web api only stores a pre defined number of lines, right?
Even if I expand it I cannot see all logs…
What a possible way of knowing in which the state the Farmbot is during connection etc.?
I get some cryptic messages in the console after it rebooted itself if I try to connect to my local
server installation and I need to debug the Raspi side more. Is there any way to get onto the bot
without having a display connected to it?
P.S.: I tried to put a file named ssh onto the SD card after flashing but even that did not work…
In which File System does the USB needs to be formatted?
Is there a USB capacity limit?
The USB file system needs to be fat32. I don’t think there’s a limit, but I haven’t tried anything very large.
just tried it, nothing is on the USB Stick. Formated it in FAT32, is there anything else that I can check?
Is the Name of the USB Stick important? I had the USB stick in from booting until I clicked on shutdown to
shut the raspi down, then powered the bot off and removed the USB stick…
It is really anoying that there is no possibility to ssh into the raspi and read normal log files!
especially when the logging system inside the web app isn´t working properly… that should be the most
normal thing ever…
Actually, ssh into the Pi is a security risk. To make that work, you need to have some “well know” user name/password and that would provide a “front door” into any farmBot.
What I’d suggest the farmBot team do is to allow a “development mode” to be set from the start web interface (where you normally give your WiFi and farmbot cloud info.) When you select development mode, then it could enable a SSH account where you specify account particulars and perhaps using port knocking to lock it down further. When done, simply turn the development mode back off and SSH goes away.
I believe your best choice “right now” is to build the farmbotOS image yourself, including whatever features you want.
@bgmoon: I fully agree with the security risk to have it opened per default.
I read that the raspi foundation disabled ssh per default which is good but if you have local access to the raspi you could
insert a USB stick with an empty file called ssh on it. This would enable ssh with the standard username an pw.
If you are only in the intranet which is normally the case when you have physical access to the raspi, you can directly change the pw and you´re good again.
Disabling all sorts of debugging features is fine if the product works. But for product development purposes which we
are constantly doing here, you need to have all the debugging possibilities or an excellent support which helps out as fast
as possible, that the “end” user does not need to debug it by himself
Building the image yourself is quite a high coding burden because you need to be deeply involved in the matter. That is
something I cannot achieve…
They don’t run the standard raspberry Pi os, so farmbot team would have had to enabled the same sort of “feature” for their Pi OS – farmbotOS.
If it were a standard Pi os, you don’t put the SSH file on a USB stick, you have to put that file in the “boot” partition --> to do that you mount the flash card (the you you put in the flash slot) on your computer, look for a “boot” partition and make the file there. Have you tried that? I have NO idea if farmbot implemented the same way or not.
Yes you are right, sry I was wrong, its not via USB stick. I was confused with the logging option that @Gabriel described in antoher thread, sry!
I tried to put that ssh file in the root directory of the SD card after flashing it.
That did not work…
Ok, understood. As I said, farmbotOS is not the same as raspberian and so someone would need to implement some kind of “debug” support into the OS. Right now, the primary debug interface is the web interface, which, as you’ve noted, is quite limited.
A post was split to a new topic: Firmware upload
So there is “development mode” releases, but we don’t support enabling debugging features in a production release.
I haven’t been actually publishing development releases lately since all images are built and uploaded from my personal machine, and it takes time away from actual development time.
Building FBOS is pretty well documented in the repository, although it does take a bit of time on each compile if you don’t have a decently quick machine.
As for the actual Debug Interface, almost all Embedded Systems use what is known as serial to connect to the board in question. This is also how Farmbot OS is built and developed. serial is still enabled in production releases, but it displays the same information that is displayed to the Frontend. I used to bundle a small SSH client into the OS, but have since depreciated it because it is not only a security risk, there is almost no use for it to a normal user. This means things that you would normally expect (filesystem access, package managers, network configuration, init management etc) do not exist.