Express XL Error 30. No connection between raspi and farmduino

Hi,

In the final stages of setting up an Express XL. Went through configuration fine. But shows the farmduino as being disconnected. I checked the pins of the raspi and they look good. I would clean them with alcohol but no store has any right now. Raspi shows steady green and the farmduino shows steady red,green and blue. Suggestions?

Hi @Shuza

I have remotely repaired some data issues on your account. I cannot verify that it worked because it appears that your device is unplugged.

Also, I looked for other issues with your account. Your device has a defective camera. We can replace this free of charge. Please see our free camera replacement ordering page.

Additionally, if you find that the device is still giving you a code 30 error, please notify me when your device is online and I can take a deeper look.

Sorry for the inconvenience,

Rick

1 Like

Hi @RickCarlino

Thanks for looking into this and thank you for the link, i have ordered the camera replacement. The farmbot works! thank you so much for working your magic.

1 Like

@RickCarlino

I replaced the camera, and made sure i connected the camera thumbscrews as per the video recommendation. Updated the farmware to 10.1.2. But still am getting no usb camera detected. Suggestions?

@Shuza I am back in the office and will take a look shortly.

1 Like

Let me know if there is anything i can do to help

@Shuza Taking a look now. Sorry for the delay, there was a large backlog of support requests over the weekend.

No problem, i understand.

@Shuza I remoted in to your device right now. The camera does not show up at all. Since we’ve already replaced the camera once the next possible issues are:

  • USB or intermediate cable are not tightly connected (surprisingly common)
  • Bad USB driver in RPi0 (extremely uncommon)

Can you please push the USB connector a bit deeper? Can you also push the intermediate cable in tightly also. We’ve seen a surprisingly high number of cases where this was the problem. If this does not resolve the issue, we may need to send you a new RPi0 (burnt out USB module) but this is extremely rare.

I am leaving the office now but can continue assisting you tomorrow. Could you please leave your device online until we fix the problem so that I can remotely inspect the bot?

Thanks and sorry for the inconvenience.

2 Likes

Well, i disconnected and reconnected everything again as tight as i could and lo and behold it worked!! Sorry for the confusion. The connection seems quite delicate. The initial camera may also be good since clearly i can’t be trusted in connecting these pieces T_T I could send it back to you guys if you want.

Thanks again for your patience and efforts in this matter.

2 Likes

So i did manage to take a photo. But i noticed it the camera was not square, so i adjusted the camera position and in the process lost the connection. Spent the next 40 minutes screwing and unscrewing the connectors and checking the bot but still can’t detect the camera. I’m sure eventually i will stumble on the position that worked… :sob: I’ll tackle it again tomorrow

Is there a way that i can check the connection? it would be helpful if i could just see if it registered the camera or not as soon as i plug it in.

Was this issue noticed on the first camera, or the replacement camera? We did notice this problem on a percentage of cameras that came with the kit. It’s important to note that the replacement camera is not the same model as the camera that came with the kit. You may have better luck using the replacement camera.

We don’t have this feature in the UI yet unfortunately. If you are knowledgable with SSH, it is possible via

use Toolshed
lsusb     # You should see a camera in the list. 
ls "/dev" # You should see `/dev/video0`

If you are unfamiliar with SSH, this might not be a good option.

I am going to forward this issue to @Gabriel and @roryaronson as they have been handling most of the camera the camera issues. Sorry for the inconvenience!

1 Like

@Shuza Can you try your original camera again? You don’t need to install it, but you should be able to check if it works by unplugging the new camera and plugging in the old camera.

1 Like

It looks like FarmBot folks are giving you great support help, but I thought I’d add a few things I’ve seen. I have the Genesis XL 1.5 camera. Before using it on the FarmBot Raspberry Pi, I tried it on my x86 Debian Buster (10) workstation. I wasn’t able to get it to work at first, but eventually did get it going.

  • On the “regular” USB ports on my workstation, I was able to see the camera in dmesg and lsusb, but wasn’t able to use it. When I plugged it into the blue USB ports, I was able to use it.

  • On my workstation I added this module option, but I’m not sure if that is what fixed it or not. This file: /etc/modprobe.d/uvcvideo.conf with this line: options uvcvideo quirks=0x100

  • In general, when unplugging/plugging in USB to cycle it, wait 5 seconds at least to make sure the USB system “settles down”. Plugging it out and in quickly sometimes it won’t be detected.

  • To test the camera on my workstation, I ran this command:

mplayer \
	-vo xv \
	-tv device=/dev/video2:driver=v4l2:width=640:height=480 \
	tv://

Note, my workstation has another camera, so you probably have to change /dev/video2 to /dev/video0 or /dev/video1 if you test on a workstation without another camera.


I then connected up the camera to my FarmBot here on my desk. I have a serial cable connected so I can do debugging of the raspberry Pi. Here is excerpts of what I get when I do a fresh power on of the system, then do “Take Photo” in Farmware in the web, then power off:

[    0.000000] Booting Linux on physical CPU 0x0
...
[    8.006596] media: Linux media interface: v0.10
[    8.037998] videodev: Linux video capture interface: v2.00
[    8.075670] uvcvideo: Unable to create debugfs directory
[    8.083787] uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (1908:2311)
[    8.092884] uvcvideo: Failed to query (GET_INFO) UVC control 2 on unit 2: -71 (exp. 1).
[    8.106254] uvcvideo: Failed to query (GET_INFO) UVC control 8 on unit 2: -71 (exp. 1).
[    8.119055] uvcvideo: Failed to query (GET_INFO) UVC control 1 on unit 2: -71 (exp. 1).
[    8.131944] uvcvideo: Failed to query (GET_INFO) UVC control 5 on unit 2: -71 (exp. 1).
[    8.145661] uvcvideo 1-1.4:1.0: Entity type for entity Processing 2 was not initialized!
[    8.158690] uvcvideo 1-1.4:1.0: Entity type for entity Camera 1 was not initialized!
[    8.171853] input: USB2.0 PC CAMERA: USB2.0 PC CAM as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/input/input0
[    8.189137] usbcore: registered new interface driver uvcvideo
[    8.197787] USB Video Class driver (1.1.1)
[    8.707131] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    8.724018] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    8.733166] [vc_sm_connected_init]: start
[    8.740385] [vc_sm_connected_init]: installed successfully
[    8.813488] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    8.831546] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    9.936056] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    9.956384] bcm2835_audio soc:audio: card created with 8 channels
[   10.699155] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   10.732638] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   10.781744] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   10.981148] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   11.003576] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: May  2 2019 02:39:18 version 7.45.98.83 (r714225 CY) FWID 01-e539531f
[   11.171256] rpi-ft5406 rpi_ft5406: Probing device
[   11.177986] input: FT5406 memory based driver as /devices/virtual/input/input1
LED STATUS: yellow off
LED STATUS: red slow_blink
LED STATUS: yellow slow_blink
LED STATUS: red slow_blink
LED STATUS: yellow slow_blink
LED STATUS: yellow off
LED STATUS: red solid
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.pcm.dmix.channels'
ALSA lib conf.c:4660:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5137:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM dmix
[   29.274218] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   30.750031] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
LED STATUS: blue off
LED STATUS: green really_fast_blink
LED STATUS: blue solid
LED STATUS: green solid
warning: deprecated time unit: :microseconds. A time unit should be :second, :millisecond, :microsecond, :nanosecond, or a positive integer
...
LED STATUS: blue solid
LED STATUS: green really_fast_blink
LED STATUS: green solid
LED STATUS: green really_fast_blink
LED STATUS: green solid
/usr/lib/python3.8/site-packages/numpy/ma/core.py:4466: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.shape is ():
[ WARN:0] VIDEOIO(cvCreateCameraCapture_V4L(index)): trying ...

[  118.877079] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
[  118.887755] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
[  118.898397] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
[  118.912965] uvcvideo: Failed to query (GET_CUR) UVC control 3 on unit 2: -71 (exp. 2).
[  118.927159] uvcvideo: Failed to query (GET_DEF) UVC control 7 on unit 2: -71 (exp. 2).
[  118.942705] uvcvideo: Failed to query (GET_DEF) UVC control 8 on unit 2: -71 (exp. 2).
[  118.956326] uvcvideo: Failed to query (GET_DEF) UVC control 1 on unit 2: -71 (exp. 2).
[ WARN:0] VIDEOIO(cvCreateCameraCapture_V4L(index)): result=0x1c62f08 ...

[  119.110834] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
[  119.124686] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
[  119.135674] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
[  119.146879] uvcvideo: Failed to query (GET_CUR) UVC control 3 on unit 2: -71 (exp. 2).
[  119.157921] uvcvideo: Failed to query (GET_DEF) UVC control 7 on unit 2: -71 (exp. 2).
[  119.169127] uvcvideo: Failed to query (GET_DEF) UVC control 8 on unit 2: -71 (exp. 2).
[  119.180138] uvcvideo: Failed to query (GET_DEF) UVC control 1 on unit 2: -71 (exp. 2).
libv4l2: error turning on stream: Protocol error
VIDIOC_STREAMON: Protocol error
[  0.1674] Importing farmware_tools...
[  0.1676] Import complete.
[  0.1677] Importing opencv...
[  0.5205] Import complete.
[  0.5208] Found /dev/video0
[  0.5279] Unable to check if busy.
[  0.5282] Opening camera...
[   0.756] using backend: V4L2
[  0.8566] Camera opened successfully.

[  0.8568] Adjusting image with test captures...
[  0.9657] No image.
LED STATUS: yellow slow_blink
[  179.772922] erlinit: Timed out while waiting for Erlang VM to exit.
[  179.780732] erlinit: Sending SIGTERM to all processes
[nbtty: t[  179.787699] watchdog: watchdog0: watchdog did not stop!
erminating via signal]
[  180.810867] erlinit: Sending SIGKILL to all processes
[  181.428342] reboot: Power down

Simultaneously, I ssh into the FarmBot Raspberry Pi and enable logs:

$ ssh farmpi

Interactive Elixir (1.9.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(farmbot@farmbot-0000000016df09e9.local)1> RingLogger.attach()
:ok
                                              
18:02:34.906 [info]  Installed Farmware: historical-plant-detection
                                              
18:02:34.941 [info]  Installed Farmware: take-photo
                                              
18:02:34.975 [info]  Installed Farmware: historical-camera-calibration
                                              
18:02:35.000 [info]  Installed Farmware: camera-calibration
                                              
18:02:35.028 [info]  Installed Farmware: plant-detection
iex(farmbot@farmbot-0000000016df09e9.local)2> 
nil
                                              
18:03:23.897 [info]  Executing Farmware: take-photo
                                              
18:03:24.044 [debug] opening pipe: /tmp/farmware_runtime/take-photo-908212f3-farmware-request-pipe
                                              
18:03:24.063 [debug] opening pipe: /tmp/farmware_runtime/take-photo-908212f3-farmware-response-pipe
                                              
18:03:24.084 [debug] spawning farmware: /usr/bin/python Take-Photo-master/take_photo.py
                                              
18:03:24.164 [debug] in requesting: 10 bytes
                                              
18:03:33.115 [error] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
                                              
18:03:33.116 [error] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
                                              
18:03:33.129 [error] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
                                              
18:03:33.144 [error] uvcvideo: Failed to query (GET_CUR) UVC control 3 on unit 2: -71 (exp. 2).
                                              
18:03:33.159 [error] uvcvideo: Failed to query (GET_DEF) UVC control 7 on unit 2: -71 (exp. 2).
                                              
18:03:33.173 [error] uvcvideo: Failed to query (GET_DEF) UVC control 8 on unit 2: -71 (exp. 2).
                                              
18:03:33.187 [error] uvcvideo: Failed to query (GET_DEF) UVC control 1 on unit 2: -71 (exp. 2).
                                              
18:03:33.353 [error] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
                                              
18:03:33.353 [error] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
                                              
18:03:33.363 [error] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -71 (exp. 2).
                                              
18:03:33.375 [error] uvcvideo: Failed to query (GET_CUR) UVC control 3 on unit 2: -71 (exp. 2).
                                              
18:03:33.386 [error] uvcvideo: Failed to query (GET_DEF) UVC control 7 on unit 2: -71 (exp. 2).
                                              
18:03:33.397 [error] uvcvideo: Failed to query (GET_DEF) UVC control 8 on unit 2: -71 (exp. 2).
                                              
18:03:33.408 [error] uvcvideo: Failed to query (GET_DEF) UVC control 1 on unit 2: -71 (exp. 2).
                                              
18:03:33.436 [debug] in buffering 213 bytes
                                              
18:03:33.537 [debug] in pipe worker read 10 bytes successfully 203 bytes remaining in buffer.
                                              
18:03:33.638 [debug] in requesting: 203 bytes
                                              
18:03:33.739 [debug] in pipe worker read 203 bytes successfully 0 bytes remaining in buffer.
                                              
18:03:33.741 [debug] executing rpc from farmware: %FarmbotCeleryScript.AST{args: %{label: "fa55514b-b050-4b19-9c9a-d3b45bf5bff9"}, body: [%FarmbotCeleryScript.AST{args: %{message: "[take-photo] Problem getting image.", message_type: "error"}, body: [], comment: nil, kind: :send_message, meta: nil}], comment: nil, kind: :rpc_request, meta: nil}
                                              
18:03:33.897 [info]  [take-photo] Problem getting image.
                                              
18:03:33.897 [debug] out writing 120 bytes
                                              
18:03:33.941 [debug] in requesting: 10 bytes
                                              
18:03:34.200 [debug] Farmware exit
                                              
18:03:34.200 [info]  CeleryScript ok [#Reference<0.2921139114.805830658.51941>]: 
                                              
18:04:23.560 [info]  Emergency locking and powering down
                                              
18:04:23.575 [info]  Emergency lock
                                              
18:04:23.604 [info]  power down event: "Shut down requested by Sequence or frontend"
                                              
18:04:23.649 [info]  Elixir.Nerves.Runtime : device told to poweroff
...

It fails to take a photo. In the web browser Farmware tab/logs it says “[take-photo] Problem getting image.

I can send you the full dumps if you want them.

Thanks for any suggestions. :slight_smile:

1 Like

Thanks for all the responses.
@Gabriel I couldn’t get the original camera to work. But the connection is so flakey with the other camera that i can’t say for certain that it is defective.
@RickCarlino I am familiar with ssh but how do i find the farmbot ip address?

Also i was able to take another picture while fiddling with it. but by the time i noticed that the picture had worked, the camera was non functional again. It might be the usb to thumbscrew connector that is so flakey. Given that even when the connection is made and i can take pictures, if i move the camera the connection is quickly lost. seems like there is a super fragile connection somewhere in the line.

Additionally the watering trigger no longer works.

Everything is crumbling! :slight_smile:

edit:
When i said the camera was not square i just meant the orientation was off and thats why i rotated the camera.

Hey @Shuza,

Sorry things aren’t going so great with your hardware :grimacing: Can you email support@farm.bot with your original order number and request a replacement camera and solenoid valve cable? While the new parts are on their way, the team and I will discuss adding some additional indicators in the app to help diagnose camera connectivity issues.

@roryaronson

You guys are great. I support your mission and I don’t want to keep getting replacement parts if i can help it. I’m thinking i would be better suited towards getting some hardware debugging tools instead. I think that would really help me because i have a feeling its actually the usb -> thumbscrew connector that is crazy and not the camera(s). Do you have suggestions for what i would need to test that connection? And test the cameras with the computer? i’m not sure what the 4 prong plug is that the thumbscrew connections use.

In terms of the solenoid i’m not sure why it suddenly stopped working.

1 Like

You should be able to plug the camera into a desktop computer or laptop and it should show up and be usable like any other USB webcam. On my Macbook I can use the photobooth app and then select the FarmBot camera from the Camera dropdown in the top bar, and that allows me to see the stream. I’ve done this on Windows too, but can’t remember the name of the app or exactly where the camera selector is located within that app.

Have you reviewed this video showing how to fully connect the thumbscrew connectors together?

After we started getting reports of camera issues I made that video and added it to the docs, but that may have been after you assembled your bot and you may have missed it.

1 Like

Oh, and for the solenoid valve, you could try plugging it into a different peripheral connector on the Farmduino board, to rule out the possibility that there is a problem with the electronics board. After that, most likely, it is an issue with the cable, and you may be able to fix it yourself. We’ve found that some percentage of the latest solenoid valve cables have had continuity problems. Yours might be one of them, so you may try inspecting the crimp connections.

1 Like