Help! Naked Stereo pi with cm3+ 32G; Impossible to setup?

StereoPi hardware discussion
Post Reply
3DStereoPhoto
Posts: 3
Joined: Thu Feb 25, 2021 4:44 pm

Help! Naked Stereo pi with cm3+ 32G; Impossible to setup?

Post by 3DStereoPhoto »

So I think I made two mistakes which are making my life difficult:
Mistake 1: getting the naked stereopi
Mistake 2: getting the 32Gig cm3+ (ie not getting the "Lite" version)

My GOAL: Two stereopi's with 4 of the V2 camera's and I want them setup per the blog about synchronous 4 camera shots.
I would prefer it to use the usb connection that gives "ethernet over usb". But no way to set that up w/o being able to ssh in.
OR I soldered on a EDImax wifi dongle, so using that to get on my network or phone hotspot.

Main issue: With the "naked" version there is no possible way(for me) to SSH to the pi in order to setup the "ethernet over usb" magic or compile the C program etc.( I realize it is probably possible for someone...)

Question1: With the OpenCV image - is there anything I can do from windows in the boot partition to "activate/setup" the "ethernet over usb" (or get my EdiMax to work) ?
Question2: Does anyone have the OpenCV image with the ethernet over usb already setup?

So I have been trying very hard to get this working all this week. I am a bit defeated.

What works:
0) I can connect the jumper, connect the micro-usb and successfully flash the CM3+ [using the raspberry pi foundation flasher seemed to work best]
1) I can connect the jumper, connect the micro-usb, run the script "rpiboot.exe" and see the boot partition and other partition as mapped drives on my windows10 laptop.
2) I can connect the HDMI; With SLS image I can see the video from the cameras

So eventually I was able to get the Flash the SLS image and get it to work by:
1) updating to the stereopi.conf to activate wifi and connect to my home network.
2) soldering an EdiMax wifi dongle directly to the extra USB pins

Then it gets onto the network; the app on android effortlessly finds it, and seems fine, can ssh in. all is good from a hardware/testing perspective.

However, I need the "OpenCV" image... when I image that to the cm3+/stereopi I can't figure out how to get the EDIMax dongle to work. And I have no other way to be able to SSH and setup anything... totally thwarted. I was using the image from the wiki - the buster one: OpenCV Buster Google Drive Image

I also do have 4 other raspberrypi's I can use. A RPi3B V1.2 ; A model B+V1.2; A RPi4 Model B; A RPi2 Model B V1.1;

My thought right now, is to image the OpenCV to the RPi3B V1.2; SSH in. Setup per https://stereopi.com/blog/synchronizing ... opi-boards (compile the script, set it up in the scheduler, test it with the one camera on that pi. Try to setup the usb-ethernet gadget.

Then I hope to copy the SD card and image it back to the CM3+.

If anyone has another better, easier, smarter, faster way of achieving my goal, please let me know. Or if my plan is stupid and won't work, let me know.

Lincoln

User avatar
Realizator
Site Admin
Posts: 680
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Help! Naked Stereo pi with cm3+ 32G; Impossible to setup?

Post by Realizator »

Hi Lincoln,
As I understand, when you are turning on your USB Gadget mode, you have no access to Raspberry OS to make changes.
As described in the article, if you switch this secret USB mode, our onboard Ethernet and USB are turned off. I.e. your Edimax dongle won’t work in this case.

Here are some additional tricks you can use:
1. If your USB mode successfully enabled, you can connect StereoPi by USB to the desktop computer. After that it is available by SSH by IP address.
2. You can turn on eMMC upload mode, and connect StereoPi to Ubuntu computer. Run rpiboot, and all disks will be visible in Ubuntu, and you can edit all files you need.
3. For debugging embedded systems, you can always use external console trick. You can use USB-UART adaptor, connect it to appropriate GPIO pins and to your computer. In this case you have access to the console, even if there are no USB, Ethernet, or other communications. Please note, that enabling UART on SLP is tricky, but for OpenCV (or stock RaspiOS) it is easy.
Eugene a.k.a. Realizator

3DStereoPhoto
Posts: 3
Joined: Thu Feb 25, 2021 4:44 pm

Re: Help! Naked Stereo pi with cm3+ 32G; Impossible to setup?

Post by 3DStereoPhoto »

Thanks for the reply.

The bare minimum I need:
1) OpenCV working with stereopi_sync.c compiled and configured to start on boot.
2) Access to the photos

After thinking about it, I don't think I really need wifi or the usb-ethernet gadget at all because booting with the jumper allows access to the photos.
=====
help from: https://www.raspberrypi.org/documentati ... eadless.md
====

ok so looking up more on just simple "headless" installation I now realize I made two idiot mistakes:
1) I had incorrectly named the file wpa-supplicant.conf instead of wpa_supplicant.conf
2) Windows had incorrectly tacked on CR-LF to each line of the above file. Used notepad++ to convert EOL to just LF

Fixed that and my hard-wired EdiMax woke up and connected just fine. I put the .c file in, compiled it, ran it.
modified the /etc/rc.local and added:
cd /home/pi && tail -f /dev/null | ./stereopi_sync &

I am so relieved that to get this far... basically now I know I can get it to work... one board is working right now.

In any case, I also ordered your brand-spanking new V2 board. That will solve all my ills(from the in-built bluetooth/usb) and it seems like it will be super flexible. Can't wait for it to come!

Lincoln
---------- Detailed steps that worked just fine to get my hard-wired Edimax working on my network directly on the CM3+ -----
1) raspberry pi foundation's to write image to sd-card "OpenCV"
2) on "boot" partition put file named "ssh"
3) on "boot" partition put file named "wpa_supplicant.conf"
with contents(in notepad++ be sure linefeed at end of each line is linux-- "LF" menu: edit -> EOL conversion -> Linux) :
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
ssid="wifi name here"
psk="wifi password here"
}
4) start up raspberry pi.

5) Log onto router to find IP address of new raspberry pi.

6) on windows use puTTY to SSH to the new raspberry pi.
pi/raspberry

smerrett79
Posts: 4
Joined: Wed Feb 24, 2021 11:47 pm

Re: Help! Naked Stereo pi with cm3+ 32G; Impossible to setup?

Post by smerrett79 »

@Lincoln, sorry that I can't offer help but would you mind explaining why you think it was a mistake not to get the lite version of the CM? I have just backed the Stereopi V2 and was planning to buy a 32GB EMMC CM4 to go along with it. I would be very interested in your take on the onboard memory.
Thanks,
Simon

User avatar
Realizator
Site Admin
Posts: 680
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Help! Naked Stereo pi with cm3+ 32G; Impossible to setup?

Post by Realizator »

smerrett79 actually eMMC is better for industrial solutions. It's fast and reliable (and fewer connectors in the solution). But micro SD is easier to work with.
For example, if you need to change one file in a BOOT partition, you eject micro SD and insert into your computer. But for the eMMC, you should turn on StereoPi to the special mode (insert 1 jumper for v1 or 2 jumpers for v2, and run rpiboot on the host machine).
Also, for the v2 it is more comfortable with the eMMC, as you have WiFi and Ethernet, which always working, in spite of the board mode. But at the v1 both Ethernet and WiFi are sitting on the single CM3 USB.
Eugene a.k.a. Realizator

3DStereoPhoto
Posts: 3
Joined: Thu Feb 25, 2021 4:44 pm

Re: Help! Naked Stereo pi with cm3+ 32G; Impossible to setup?

Post by 3DStereoPhoto »

smerrett79 - The downside of V1+Naked+(cm w/ onboard ram) is for V1 I was stuck without any way to set it up because I did Naked (no ethernet or usb) AND CM+ (onboard memory) so no sd-card. Plus I don't really have a linux machine unless I usb-boot my windows laptop to linux. So I was in a conundrum. Even with ability to see root (windows) I was still stuck. There seemed to me two ways out: 1) with a linux machine I would be able to see the other partitions and change it such that the usb-ethernet gadget could potentially work. Or 2) my solution of soldering on the EdiMax dongle to get wifi. As is probably evident I am not much of a unix guru. [ another option would be to solder on the ethernet connector.]

So bottom line is that with V2 there would be no issue at all BECAUSE the cm board(lite and w/emmc) has bluetooth and wifi. And V2 naked is no problem either for the same reason. I also just ordered a pair.

My goals is to simply make this into a 4-camera stereogram that I can take on photo-shoots or just vacation and simply use.

Lincoln

smerrett79
Posts: 4
Joined: Wed Feb 24, 2021 11:47 pm

Re: Help! Naked Stereo pi with cm3+ 32G; Impossible to setup?

Post by smerrett79 »

Lincoln and Realizator, thank you so much for the explanations and especially for advising me how my V2 situation will differ! Very helpful.

Post Reply