#help-with-linux-sbcs
1 messages · Page 4 of 1
For example: https://www.adafruit.com/product/1875
Much appreciated I may only need tx so will start there thank you so much.
The pico uart is 3.3?
It should be possible. Might require bootloader shennanigans
also if your existing pi os partition takes up the entire SD card, you might not be able to reduce the size
I am attempting to use a Raspberry Pi to run a strip of WS2811B LEDs.
I was recommended to use the rpi_ws281x and adafruit-blinka libraries.
When I attempted to pip3 install the rpi_ws281x and adafruit-blinka libraries, I was met with the following error:
Collecting sysv-ipc (from adafruit-blinka)
Downloading https://files.pythonhosted.org/packages/0c/d7/5d2f861155e9749f981e6c58f2a482d3ab458bf8c35ae24d4b4d5899ebf9/sysv_ipc-1.1.0.tar.gz (99kB)
100% |████████████████████████████████| 102kB 1.6MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-o4ihuwxz/sysv-ipc/setup.py", line 11, in <module>
import prober
File "/tmp/pip-build-o4ihuwxz/sysv-ipc/prober.py", line 137
d["SYSV_IPC_VERSION"] = f'"{version}"'
^
SyntaxError: invalid syntax
It seems that the Raspberry Pi's Out-of-box Python version (even after apt update and apt upgrade is still only 3.5.3-1. The syntax that caused the error only works in Python 3.6+.
I have been trying to update Python to 3.11 (or really, any version >=3.6) for the past few days, but it seems that the Raspberry Pi is not allowing me to. Or, when I do manage to do it, it says that the _ssl module fails to install and refuses to allow me to pip install anything else. It seems that newer versions of Python require a newer version of OpenSSL, but even when I try to make install that manually, Python still refuses to use it when I make it.
...Am I missing something? Why does a module intended to run on a Raspberry Pi fail to run on a Raspberry Pi? And why can't I update Python?
While the RP2040 does use some 1.1v signals internally, all of the chip’s inputs and outputs are 3.3v logic. UART is included in that.
Nice well wish me luck 🙂
You can also run it on 1.8V logic
😬
But there are not terribly many useful applications for that
Oh, the chip can. I guess more specifically the Pico runs 3.3v.
can the chip still talk USB if running at 1.8V I/O?
You still apply 3.3V to the usb supply pin
1.8V is if you want to run the chip really fast
Is it faster? I thought the goal of lower voltage was to save power
Well, if you want to run a faster PLL you need a lower voltage
I guess it would reduce rise and fall times, but doesn’t lower voltage affect clock speed?
The max 135MHz from my understanding is only doable if you use 1.8V supply. But perhaps you could get some nice power performance out of 1.8V
Though generally I’d assume you’d draw more current at lower voltage
oh, is the clock speed thermally limited at 3.3V or something?
It might be? I just know all the overclocking is done with lower supply voltages and tuning the internal regulator
Also looks like the ADC supply can only be 3.3V
Looks like it’s set by the core voltage with the programmable internal LDO
My guess is 1.8V to VReg_In would reduce thermal loss of the LDO
So it would definitely help reduce any thermal throttling caused by heat generated from the LDO
Hey guys I have a raspberry PI 3 at work that I have had for several years. I am trying to connect with remote desktop connection and its not working. It will connect, i can see the desktop but I am unable to click anything. I am doing this at my home with my raspberry PI4 with no issues. Any idea whats going on?
hi
Anyone here ever set up the Adafruit Braincraft hat?
I followed the guide Lady Ada wrote on getting it set up and everything went smoothly. All test run just fine and I get the expected output, however, when I tried following the next guide on TensorFlow Lite object recognition I hit a snag at running the graphic labeling demo. Pygame complains that it doesn't have a display to output to, but I configured and set the default display according to the guide and when I test the display only it works just fine. Not sure what Pygame is complaining about or how to troubleshoot it. Any pointers are welcome and appreciated. Thanks in advance!
For reference, here are the two guides I used:
Guys What’s up with this Raspberry Pi shortage? I just burned one out and I’m losing my mind.
the RPI Foundation made an optimistic post in december but I don't know...
there's some green here: https://rpilocator.com/
I totally forgot about that site. Guess i'm going to have to purchase from another country.
Just don't pay scalper prices, it encourages them
Don’t feed the wild animals you say?
availability changes frequently, don't rush it
I would rather suffer in pain than make a scalper happy.
Bears are a great metaphor for buying from scalpers
Same
I’m just going to become an industrial customer for Raspberry Pi so I can get some compute modules
So whats the dif between compute and Standard Model 3-4B or Zero W
I can still run rasbian lite and manipulate the GPIO pins with Python right?
Compute module 4 (CM4) mostly comes down its flexibility and how it connects/integrates into systems with its Hirose 100pin flat mezzanine connectors
So if a 4GB WiFi 32GB MMC doesn’t work, I can very quickly put in an 8GB Wi-Fi 32GB MMC module. No soldering or real hiccups at all
Hey, gotta remind folks sometimes...
We’re fighting human nature unfortunately
Indeed
Ok cool. Can I still follow the basic raspberry pi tutorials found online with this board or will I have to modify them
Should work without much modification
Sweet
Do you guys know of any clone boards with wifi that can run Rasbian
or is that not a thing]
I know Arduino has a bunch of copies that work with the same IDE
Might be difficult to get rasbian on other if you’re not familiar. But Rasbian is based on Debian
So you can install Debian on most A7 or better SOCs
any boards with wireless and a solid amount of GPIO's you would suggest?
BeagleBone are great
0 is 32 bit arm (pretty sure 3 is too?). 4 and zero2 are 64 bit
The beagle bone blue has Wi-Fi, the SoC is an Octavo one with a PRU which allows you to do things that would usually require an additional microcontroller to do
I believe the latter are substantially faster. But I use a lot of plain old zero ws because it’s hard to beat $10 for wifi and Linux.
The only weird thing is the connectors
The beagles are really awesome
Not quite as cheap, but I think it’s probably cheaper than a pi at the moment
I have a Zero W that’s lived in my attic for like 4 years
And it’s probably the second most supported Linux sbc? I think it also runs mainline Linux?
It might run Ubuntu, definitely runs Debian
And is fully open source from the schematics up?
Yup
Only weird thing is the documentation of the Sitara A8/9 but TI gave BeagleBone a lot of leeway on publishing documentation
Especially since TI founded the BB org lol
Sometimes I think the sitara has too much documentation lol
The main issue for me is that i'm just getting into this stuff and rely heavily on the premade libraries for networking type projects
1000s of page manuals
and all of those are written for the pi
Compared to Broadcom it’s like getting the lord of the rings series lol
Yeah haha it’s better than just getting nothing for sure
Broadcom gives you a pamphlet and then says $1m for the full data sheet
And then still holds it back
I kind of wish Raspberry Pi moved away from Broadcom and just rolled their own SOC
The Pi 2W was great but still Broadcom
Ok this might not be super helpful for me to say, but a lot of that stuff shouldnt be pi specific
Idk why people use wiring pi for gpios instead of sysfs, for example
Blinka would be largely preferred if you need cross platform flexibility and ease of use
But I mean, if you want to use a library that depends on wiring pi then it does you no good for me to say that haha
What is blinka?
Blinka is essentially the interface for circuitpython to SBCs
I feel like 95% of pi stuff should be done through Linux interfaces instead of some pi thing
Oh yeah if you want it to be circuitpython then that sounds like a good option
Blinka supports a number of SBCs
It’ll be slower, but if you’re starting out, speed isn’t really a primary objective
Oh true. I see Adafruit has some documentation on setting up their IO platform on
black
BeagleBone Black
Thanks for the info everyone!
Is this the correct place to ask for help with this tutorial? https://learn.adafruit.com/commodore-keyboard-to-usb-hid-with-circuitpython
#help-with-circuitpython would be the best place
is this legitimate? it seems a bit too good to be true
Yes, rak is a very reputable company.
Their shipping is pretty expensive though directly from their store.
I recommend their official aliexpress store if in the Us, as it’s only $9.99 to here.
Basically with there being little to no profits in helium mining anymore, they have a lot of stock to offload.
So I was setting up home assistant and then I clicked more to see what else it could fine now it's a little darker and I can't click anything what should I do
And when I try to click anything I cant
I'm scared to reopen the website
I got it fixed
Background
-I have ledstrips I am controlling via circuitpython/blinka on my raspberry pi
Problem to solve:
-I would like to have a dim level be able to be set by a user physically (at least 5 steps from 100% to 0%), as the rpi is headless
-I'd use a pot, but rpi have no analogue inputs
Identified solutions
- An Analog-Digital Converter (ADC) + analog potentiometer
I do not know which ADC unit is best and don't know how to evaluate differences. - A digital potentiometer
I have never used one nor know whether this would make things harder or easier - Maybe just some 10-button accessory?
Hi, I’m using a PCA9685 board conecte to a raspberry pi, it has the address 0x41. The pi does detect it but when using the python library for the board I get an error saying that no board has been found on address 0x40, I assume it’s the default one.
What line of python code should I add to make it work? Or do I need to chain it with another board with address 0x40?
Thanks
Is this the correct channel or should it go in robotics? Thanks
here's fine for now. sort of question that could be in various places. no biggie.
you'd specify the non-default address when creating the PCA instance
pca = PCA9685(i2c_bus, address=0x41)
the library uses 0x40 as the default
These is my code, so would it work if I change line 6 for the line you told me? And then could I create a second instance line pca2 with the default address? Thanks
do you have two PCA9685's attached?
Hi, wondering what the best strategy is for connecting to the test pads on a Pi Pico. I’m trying to use a different usb port and would like to hand solder if possible. I read you can use a hot plate and stencil to do this but trying to make this more accessible.
This channel is really for RPi Linux computers, not Pico. But if you're talking about the pads on the bottom, the easiest thing to do is to add some solder to those pads, and then tack-solder jumper wires to there (put the wire on the pad, and then put the soldering iron on the wire and melt the solder you added. If the wire is untinned you might need to add a little flux, but maybe not. A stencil and paste is not necessary at all.
#help-with-hw-design is probably a better place to continue this dicussion
Yes, one with default address and another one with 0x41.
I have connected them with the 0x40 Bering the first one and then the mother one like it says on adafruit website. I just could figure out the code, there was only the arduino version 😅
hi , i download the pico-ducky project and do all the steps that are on github and when i put the payload.dd and plug the pico it's works few times then stops and the only way to make it works is to restart the pc and this is not good for someone who change the payload or the script everytime so yeah , any idea ? and sorry for my bad eng <@&356864093652516868>
Servokit(channels=16, address=0x41) is also valid, if you want to save yourself one of the two imports.
And yes, you should be able to declare two separate instances of pca9685 objects if you’d like. I think the ServoKit initialization does this for you too, if that’s what you’re trying to do…
Please do not ping folks for help unless you are in an ongoing conversation with someone. This channel is for Raspberry Pi Linux boards help, not Raspberry Pi Pico. A good place to ask for help for what you are doing is #help-with-circuitpython.
Yes, that was what I was tryign to do. Many thanks 🙂
@dapper dirge ok, in that case, yes, you'll want two lines of code - one for each sensor attached. something like:
pca1 = PCA9685(i2c_bus) # uses default 0x40 address
pca2 = PCA9685(i2c_bus, address=0x41)
if you wanted to code to be more explicit so the addresses are obvious, code also do this:
pca1 = PCA9685(i2c_bus, address=0x40)
pca2 = PCA9685(i2c_bus, address=0x41)
both options are functionally equivalent
Hi all! A while back I purchased the RP2040 Adafruit Macropad. I tinkered with it a bit but since I was under a lot of workload and stress I put it on hold until I had free time after graduating. Unfortunately now that I have the time Ive been trying to figure out why my display has a constant circuitpy logo on the top left. My code has a simple print("Hello") To test it out. I have tried the nuke ufw and tried to reinstall circuitpy and its still there. I don't know if its in a mode that I am unaware of. I have skimmed the docs to find a reference to this but I have found none. I googled a bit and it appears I am the only one experiencing this? Idk if im just dumb or what. Picture is below.
any help is appreciated!❤️
You probably want to ask in #help-with-circuitpython - this channel is more for the Raspberry Pi computers.
ah sorry
no need to apologize, you didn't know. 🙂
thank you for the tip
being an OLED, that freaked me out, there is a display structure thingy that can be poked at
also appreciate the not having time thing, I feel like I've abandoned something awesome there myself
i don't have any sensors attached
"sensor" = PCA. sry, bad choice of word. its not really a sensor.
i mean i don't have a PCA
oops - sorry. tagged the wrong person. please ignore.
bruh . 🙂
you mean you are wrong here ??
someone else above was working with multiple PCA's. somehow got your tag mixed up in the response. sorry.
ahh ok and can you help me ? 🙂
here
hmmm. sorry. not right not at least. that could be various things and may take some time to figure out.
ah ok thank you i'm going to circuitpython channel and ask
I did, I’ll try it later today and see if it works. 🙂
it was! hopefully u saw responses.
I saw it, I’ll try it later today and see if it works 🙂
Hi all
I am trying to add some SK6812-e's to a pcb of mine that uses a pi pico
I'd just like to ask, can I wire the DIN to any of the GPIO/ADC multi purpose pins and still have it function normally?
Its just the onscreen repl i think - your code didn't have a loop so it finished running and it was just letting you know it was done. Its why you'll see that the programs for it have a 'while' loop for the main program.
Yeah I think It was just That I was missing some libraries and the different codes I was trying were exiting. The issue is fixed now. But thank you, you are right.
Have fun with it - I added a trackball to mine and set it up so it could be a 1-handed input device 🙂 It has a mouse mode, T9 text input, and still works as a regular macropad
Thanks! Might I Ask where you got the trackball that you added? Sounds like a cool idea for an Input Device.
https://shop.pimoroni.com/products/trackball-breakout?variant=27672765038675 Its this - out of stock on pimoroni but you can find them elsewhere I believe. I think they came from blackberries or something.
If you do get it - I have a case designed for it. I haven't uploaded it yet but I can add it to my case design files on printables/thingiverse
thats so nice of you! thank you! I will try to look for it in Aliexpress or ebay to see if its in stock.
It looks like Digikey has some in stock
thanks
how many volts can i give to the raspberry pi pico via the pins? the adafruit website says 3.3V but google says 5.5V
You should be able to find the docs on the pi website
thanks!
Should be on this page
I think the rpi rp2040 board has an unusual powr supply and esp. it can be run by a lower voltage than usual.
The datasheet shows it clearly (schematic)
but what's the maximum?
It worked first time, many thanks
can't seem to find anything about the power, could it be in another page?
it's a PDF file
so this means i can use a 4 x AA battery holder with the raspberry pi pico w?
seems okay to me since the batteries will output about 6V
.. or not since thats way more
This is where my knowledge ends
typical alkaline batteries can start out at 1.5V, I wouldn't do it
Yeah I agree with anecdata
what do you mean? isn't the maximum 5.5V?
I mean 6 volts is going to probably hurt it over time
I would derate it to VBUS 5.0 volts. Which is above the sweet spot. 5.5 v is right on the edge of operating range.
so just use 3 x AA batteries? those output 4.5 volts
I mean in my eye that should work
What are you planning on do with the pi that need a battery pack?
making a handheld
didn't consider using a lithium-ion battery because why not batteries
Hmmm interesting
i could also use usb c
seems to output 5v with the resistors on the breakout board
Question so I wanted to make a home assistant tablet display using the pi touchscreen how would I get home assistant showing on the same device that the server is on
something like this should power the pico correctly
Eh, I think I need to put the positive wire into the VSYS pin since that’s the power of the system (VBUS is input of USB)
Yep!
still don't understand this though, i've seen people say that 5V is good enough and seeing it powered by about 4.5-5V
The RP2040 is the uC on the RPi Pico.
If you feed the Pico 5V the on-board dc/dc will step the voltage down to the 1.8/3.3V (not sure rn) the RP2040 needs
so i can give 4.5V via the VSYS and GND pins just fine?
Yes
alright thanks for the help
I'd use Vsys since Vbus is the USB Voltage
maybe add a diode on vsys to prevent the usb backfeeding
Also drew it like that in your picture :^)
seems explainable, is a 1N4001 diode fine?
can go up to 50V
I think the RPi Pico datasheet actually mentions a example diode you could use, let me check
that will be fine
i'd also want the pico to be powered by an usb C, should i use a resistor and a diode for clamping the voltage at 4.5V and preventing backfeeding?
USB C or the onboard micro-usb?
USB C
this one im gonna use
I suggest you read pages 18-20 in the Pico datasheet, that might already answer all the questions you have
what happens when a backfeed happens?
will the pico short?
If you connect a power source to the USB input aswell as the the Vsys-pin the source with the higher voltage powers the Pico. This also means that if the usb input is at e.g. 5.5V and your other power input is at 5V, the usb will start to feed power into the 5V input which may or may not damage that power input.
The Pico already has a internal diode that "or"s the supplies and prevents backfeeding into the USB port
ooh i thought you meant if the pico also sends power to the battery source
by backfeeding
so what you're saying is if both the battery and usb is connected to the pico, the usb will give power to the battery and damage the pin?
The pin probably wont be bothered by it but the battery most likely will
take a look at this picture from the Pico datasheet
alright, the battery holder im buying has a on/off switch so if im careful i won't need to solder in a diode
If you disconnect the battery when you plug the usb in you will be fine
oh wait that would still damage it
yes
for a more permanent approach you should add that second diode
cant seem to find any schottky diode in the adafruit store
but i can also use a p-channel mosfet, right?
if you'd prefer a solution with a lower voltage drop but added complexity, sure.
In your case most diodes will do, doesnt have to be a schottky
but it would also work with 1N4001 diode right
alright
about the USB-C breakout board, how can i limit it to only giving about 4.5 to 5 volts?
it's something to do with the CC1 pin i think
usb c is not that trivial but I think slapping 5.1k resistors on cc1 & cc2 to gnd will get you 5V and up to 3A?
there's already two 5.1K resistors on cc1
good to go then
so just connecting the gnd and vbus pins of the breakout board to the pico is just fine?
like vbus > vsys (with diode of course) and gnd > gnd?
Yup, its shown in the RPi Pico datasheet as I mentioned.
what do you mean by gnd > gnd?
connecting the gnd of the usb c board to the gnd of the pico
same for vbus > sys
vsys*
ah. You have to do that, yes
does ground need a diode too?
it does not, no
okay, that should be it
thank you!
it should be this
allowing usb and battery to be used at the same time
and this for usb c
forgot to change 4.5V to 5V on the breakout board
i'll use a digital multimeter to make sure the battery and usb c outputs about 5v
is the diode backwards?
if the diode's backwards it will have the exact opposite effect from what you want
or is that just the image?
Isn’t it suppose to be like that?
Oh I thought the white needs to face away from the pin
To only allow the battery giving power to the pin
The stripe is the cathode side and the opposite side is the anode and the power will only flow from anode to cathode so from not stripe to stripe
oooh, i'll update the images
this right?
only allowing the battery to give power to the pico and preventing usb backfeeding
better off recognizing polarity than 'direction'. ;)
the cathode band is 'closer' to the negative terminal of the battery or power supply.
a digital meter has the black lead as the negative terminal of the meter. That's the solid reference for polarity.
The manufactured battery itself is the other solid reference for polarity.
So when the black test lead from the meter is touched to the - (negative) terminal of the battery, and likewise red test lead to the '+' terminal of the battery, the measured voltage (DC volts) is positive - no minus sign on the front panel of the (digital) multimeter.
Then just construct a test circuit for any diode and see what's what. (always use a series resistor of about 470 ohms or more before doing any tests with voltages)
o------resistor-----diode-------o
So my current concept is actually giving negative voltage to VSYS?
Also why use resistors when testing with digital meters?
I don't think about 'negative voltage' I think about polarity.
There's no way in a short conversation to ascertain what the other person knows, quickly.
Series resistors are used everywhere (pretty much) if you don't know enough to either reduce their resistance, or omit, entirely.
Just a simple heuristic.
They are not used at line levels, only at hobbyist voltages.
I = E / R
Just like with a simple transistor, the lower the exhibited 'resistance' the better, when passing current.
Same with a long wire to your appliance, on a temporary extension cord. Goal is no voltage drop across the resistance of that long wire.
I'm looking to develop a Unity based app to run on a Raspberry Pi Zero 2 W, what would be the best OS to run it on? I'm looking for one that can boot quickly, run efficiently, and use GPIO controls and a TFT instead of just USB and HDMI.
What’s the app for
I'm hoping to make a 3D Pokedex
I figured that he understood what I meant
Oooo maybe you could open source it when you’re done so i can make it?
If you’re down to build the os from source, buildroot is pretty useful for this
A lot of work though
what if i used rechargable batteries? that would charge the batteries instead of damaging it right?
Yeah i probably will, I'm still working on getting the models in batch though
Kinda. It will charge them but not stop charging so it will overcharge the battery causing a lot of damage
Also the charge current would be unregulated again causing problems
It may charge but also possibly damage them. As Crudefern already said the charging profile has to be carefully controlled when charging batteries
What about lithium-ion batteries? I’ve heard they have it’s own circuit to prevent overcharging and they can store lots of energy inside
Due to the high energy-density and thus the tendency to burst into flames li-ion cells have to be protected against overcharge, short-circuit, overcurrent and undervoltage. The cells itself are not protected by themselves but have to be protected by a bms.
It’s common to have a protection circuit on the cell and a dedicated charging circuit. Raw cells have no protection
Always check your datasheets
Have anyone tried using adafruit Optiga Trust-M breakout with Pico ? Any hints on where to start or check if the part works ? (Can see the LED on the Optiga)
how does everyone solder to gpio on pi4 model b or any other with preset headers?
and can't be on reverse side due to screen being screwed there with small .5 standoffs
i generally avoid any direct soldering to a pi's headers
so where do u solder to? breakout board or terminals?
the raspberry pi has headers so you use an IDE connector pressed onto a ribbon cable, or you can use individual Dupont jumpers.
The point was don't 'damage' the Pi by soldering to its headers. If it doesn't have them, solder them in all at once.
And generally don't just solder wires there - use headers.
The only Pi I’ve ever soldered to was the Zero/Zero W — otherwise I usually use individual jumpers
there are lots of options, so it depends on your setup.
i used headers but it's still going onto a pin, maybe rephrasing it beyond. how do you deal with header pins which are too long?
is there any boards i can use that limits the voltage and prevents backfeeding?
You can buy cells or packs that already have the protection boards inside.
To prevent backfeeding you need the diode we already talked about
or you go for the more complex (more efficient) mosfet solution
diodes convert the voltage to ground though so connecting it with the battery's positive to the vsys wouldn't work
not ground but to negative
or does it just.. work?
The diode does not invert the voltage, no.
As I told you, the Raspberry Pi Pico datasheet shows the exact arrangement you want
Take a look at pages 18-20
@velvet rampart Sometimes bend them over but they are vertically challenged and were not designed for compact builds at all. You can sometimes do a 90 degree this or that, especially pre-formed pin headers - they come in 90 degree mounts, or straight.
i was bending every other one so this totally works
They're there for providing uniform and fairly frequent disconnects.
yeh i just didn't want duponts but maybe there's a way to make a more solid dupont fit
oh wait tht's mad max' dog
there we go.
I have a press-fit pic I always post on this subject:
oh doggy
grab that pic before I delete it if you want it
saves the dog
(Just so you know the mad max story line is that there was never any danger depicted, but the passenger did not know that - gyro captain)
More recently I use the same extra long header pins to 'pin' the target board to a breadboard. Unclear experiment as I haven't tested the results much.
that's interesting
In the above one pin is folded over up top, on each row, to keep it from getting loose again. I press really hard with my thumb to put a lot of tension on everything.
I try to fold over pins I won't use but sometimes that's impractical.
I do the same setup with RP2040 and several other boards.
😅
The mess of wires nooooo
Nah you should see my desk it’s is covered in wires for a project I’m working on lmao
yes it happens. however on subject of the gpio a custom pcb is really better
and then a simple bridge between both
imo
that's a pi4 model b
I'm thinking about buying USD $35 crimpers and blank Dupont pins to crimp onto silicone insulated wires, for flexibility. Or even hook up wire. Jumper wire will not hold a shape when bent, from the source I'm using.
and i've cut proto board with a rotary tool and then through hole mounted the push buttons
have u seen the terminal blocks @faint sparrow they look nice
I also use 'clipboards' from office supply store as a substrate - nice and thin and easy to work.
Ohhhhh I see it now the base through me off me
tbh i like this a lot
alright so this isn't raspberry pi and I don't like being found way off topic. ;)
well the terminal block conforms to 40 pin gpio which is rpi
Ohhh, that’s nice
I asked this question a few days ago but I didn’t seem to get a answer so
I was wondering if any could shed some light on how to do that
mmmm
sending video over wifi? must be some sort of streaming library available
i don't know what a home assistant is sorry
Amazon Alexa, Google Home would be examples of home assistants
I meant for stendle not knowing what they are at all, those are popular examples
are you just exposing data and events from the home assistant server? maybe they've got an API you can expose things to another screen via the network
The issue is I want home assistant server and the dashboard running at the same time
Ohhhh sorry my bad
It’s cool
I’m not familiar with that platform tho, so I won’t be much help
maybe there's a way you can set the dashboard to run on any authorised device (just speculating here)
like i use some ruby scripts on a server but i can tell them as daemons to run in the foreground accesssible via an IP
If it’s a web page you can just have the Pi open that page on boot
Good idea I thought about that but when you boot it up it takes you straight to the terminal
It’s not pi os with the server running on top of it
It’s the server itself
You know what I mean
Ah… so you want the server to display the dashboard on itself
Correct
(only joking here) use your phone to live stream the tablet to the internet
Lmao 😂
Thats tricky then, you’d need to add a GUI desktop environment to be able to show graphics
🙂
[ leaves the conversation ]
I’m out of helpful info too XD others know more than I
u could use obs commands and a robot with silicon gloves to push the buttons on the tablet via twitch bitties
[ really leaves the conversation ]
Hey, folks! The previous name of this channel has led to a significant amount of confusion regarding what the intended topic of the channel is meant to be. This channel is for questions and support about Raspberry Pi Linux single board computers, and other Linux single board computers. (It is NOT for support of the Raspberry Pi Pico or Pico W.) To that end, we've renamed the channel to #help-with-linux-sbcs to be clearer and more applicable. We hope this helps folks find the right channel for their questions moving forward. Thanks!
I thought she was talking about us I got scared 😂
😄 Nope! That was meant for everyone.
could you clarify whether that includes non-RPi Linux SBCs like BeagleBone? i suspect that's the intent…
(and would be a definite expansion in scope, but probably a welcome one)
It includes other Linux single board computers. 🙂
yes that's what i'm wondering because the shortage has really got me down. is there a specific chanel for all other sbc? i'm new here
Nope, this covers all of them!
That's why we named it "linux-sbcs".
Instead of including RPi in the name.
that's v clear i see it now
Amusingly, I needed something to pretend to be a PLC for a project and my Pi Zero died. I found an Orange Pi and was trying to find all the pieces to make it work when I tripped over a cache of Pi Zeros I had saved, so I grabbed one, along with a WiFi adapter plugged into an OTG adapter and had it going fairly quickly.
stoked
I had been asked to "have the fake PLC send real data from something", so I had it respond to requests with the CPU temperature
Curious if anyone has used this: https://libre.computer/products/aml-s905x-cc/
i've been asking my one rl tech friend each time we speak on the phone "so, how many rpi boards are you sitting on rn?" he always says limited, and already taken in clusters
Ok note to self people in the home assistant discord are kinda rude
I asked the same question their
And they basically shot me down
I'm sorry to hear that. Honestly, you'll be hard pressed to find other communities like ours. They exist, obviously, but they are not common. We are spoiled here. I'm so grateful to and proud of our community for being what it is.
i tried a server dedicated to another sbc and well all they were posting was "i took 6 hours to compile a kernel and it has limited functionality" or "this emmc writer is preferred but it didn't work"
and "doesn't boot"
It fine but I’m glad that I found a community that when you ask a question they actually answer
Heh, I just got email from Elektor magazine, they have Raspberry Pi Zero 2 WH in stock https://www.elektor.com/raspberry-pi-zero-2-wh-with-pre-soldered-40-pin-color-coded-gpio-header
i want one but not got paid yet *cry more
Never thought I would hear pi and in stock in the same sentence but that’s sick
RPi announced there would be 100k+ units stocked at distributors but I honestly didn’t even notice a change in stock
I miss seeing pis for sale
You can use OpenWRT on it. But then you’d have to compile all your stuff against that tool chain. I have a small setup script that could turn your build of OpenWRT into an SDK and you don’t even have to install the SDK and cross compile with just cmake.
I’d still prefer this against ubuntu as this is much more controllable and less memory and cpu intensive
rpi is frustrating with its wifi and when it decides to come online
some times it never happens, most of the time it does
.16 is not .161
not sure who typed that
these new mini sticks have a bad deadzone
My problem wasn't the OS (Ubuntu, Debian, or Armbian would be fine for my use case), but I realized belatedly the Orange Pi wants a power supply with a barrel plug, not a USB supply.
and the switch doesn't seem to work at all
Yep that Orange PI PC. I have the Zero. It requires the micro USB. I do not like to power via a barrel jack unless that hardware goes to production.
I have the Orange Pi Lite, which appears to only accept power via the barrel jack.
okay adjustments for low and high in adc script so that's nice
now for that switch
Wait you can't power it over gpio?
Recommended power is 5v 3a
I just read someone attempted to re route everything to a battery but had over voltage protection .
Is the orange pi any good
It does look good but I don't like the limited power source options on many of the SBCs
I'm looking at odroid more and more but quite pricey
Shame Odroid don't use USB... Unless that's changed at some point.
yeh i haven't seen any odroids that aint barrel jack either
the new rockpi has lots of problems
I'm still waiting for people to fix up the Linux process for the Ox64.
Hello! I'm working on a project for controlling ws2812b LEDs from a raspberry pi 4. I'm wondering what the pros and cons are of using various driver libraries:
- https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel
- https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI
- https://github.com/rpi-ws281x/rpi-ws281x-python
In case it's relevant, I'll be controlling approximately 600 ws2812b LEDs with a desired frame rate of 30 FPS. I will want the pi to have audio output simultaneously. I will be using python.
Thanks for any insight you can provide!
I don't know yet, I still have to round up a 5V 3A supply with a 4x1.77 barrel plug
just build a small sample and check if it can go up from there
Oooo this place is new
Well, this channel was renamed. See the pinned message.
I'm just going to wait for rpi 5
Not happening this year.
Every OPi ai used in the past (pre-corona though) could also be powered via the pinheader.
Waiting for PI 5 is to mainstream, I'm gonna wait for PI 6
well let's all wait for pi 7 to be sure
oh yeah this was #help-with-raspberrypi
Clearly I can't wait for the pi 9 model C+
i want the pi 11 just like the playstation 8
my pi4 model b has gone to heaven. careless with power supplies. 3d rendering in emulators is borked.
yep even raspberry pi os the desktop has the pixelation now. fried chips
however
looks like it's just my power slot
ok no. it's got 'issues'
tried over in next hdmi slot also, same issues
sadness, was very close to printing the case.
looks like this rpi becomes a web server of some sort
it does actually solve a logistics problem i had so not all is lost
this pi will never see gaming, but it can still be beautiful ^^
😐
At least you found all the issues before you had everything assembled...
i think in the build i broke it, i've been swapping between 4 power sources
Oof... I haven't had an issue like that
and get this one of them is usb from a dc wall socket - super careless
and i overclocked it with only a passive heat sink. i totally deserved it
To which PI 2+/B GPIO pins would you suggest to connect FDD pins 18 and 20?
What exactly is careless about that?
I have no idea what volts it's putting out
Alright, mini routine, help me make floppy music happen.
Hardware
Raspberry PI B (new header)
3.5" floppy drive (SDF-321B)
Female DuPont jumpers
Process:
Kingdread/floppymusic- Done (compiled withmake MODEL=PI2)
Pi GPIO software configuration - Assistance needed
Wiring FDD to Pi - Assistance needed
With the pixelation, have you tried a different hdmi cable? I had display issues and thought after 5+ years that it was failing, but the adafruit mini hdmi worked. It was actually the official cable that just aged from over use. The version from adafruit is heavier/sturdier by comparison.
I'm assuming 18 & 20 are direction and step control? The repo say you can use any gpio I'd probably grab 20 & 21 personally since they're in the corner and both numerically and physically next to each other
Unfortunately yes. I have.
my final check was to use a dsi monitor, and yes that also has the pixelation now. so both interfaces via hdmi and dsi plus all other checks. funny thing is it's only with games that have 3d
Alright, I would try. Any suggestions on powering?
G’day and G’evening. I’m debugging a U-Blox R412m board connected to my Pi-3 over USB and ’dmesg’ and ’lsusb’ are both showing absolutely nada when I plug/unplug the board; but the boards power led comes on (so that’s something). Being the board has a usb-c connector on it, im using a cheap usb-c/usb-a adapter and that’s my prime suspect (from previous experience of cellular boards and cheap usb cables)
But throwing it out to the brains trust in case I’ve overlooked something obvious and if you agree and reckon it’s the cable can someone let me know if they reckon this would fix the problem (being Adafruit I have faith of course but you gotta ask - esp. As it would be an international purchase for me!) https://www.adafruit.com/product/5045 (cos. Believe it or not I can not find anyone in my local retailers that stock anything other than cheap unreliable brand cables)
As dumb as it sounds have you tried the usb C both ways up. in case one of the data sides is broken
also, do you have any other USB hosts you can try to connect the board to?
Maybe by accident but worth testing 👍
I have my Mac hanging around, I just got a ping back from the manufacturer “we only support windows” - but regardless it should enumerate… ill steal, sorry borrow one of my kids windows machines
yeah, would be good to know if it even enumerates on the Mac (check System Information, lsusb if you have it installed, etc)
Thanks! Good tips of turning the cable around works I’ll have something to say when people say “usb-c is superior since it works both way”☺️
yeah, the D+/D- wires are only supposed to be hooked up on one side of the USB-C plug; the receptacles (or the device/host they're attached to) are responsible for electrically handling the cable flipping
That can't be true for a A to C adapter though
Unless there's a chip in the A shell and it's not just a cable
there has to be a CC resistor on the C side of such an adapter, in any case. but there's still supposed to be only one D+/D- pair; the device with the C receptacle has to sort it out
Hi
I am emberrassed to make this post but here it goes.
I have used RPis and python for a few years, but never really understood the difference between different python versions, the difference between pip and pip3 or most of the errors I get when I fail to install stuff.
I really want to get OpenCV installed, and I have tried a few times and read instructions on many forums. I have no doubt that OpenCV is great, as well as many of the instructions that I have read, and that the fault lies in me. It is so frustrating knowing that if a knowledgable person would sit at my computer for 2 minutes, everything would work!
So please help me to get OpenCV installed. I understand that to be able to help me, you need to know a few different things. Can we start out by someone telling me what you need to know and how I can get that info?
Hey Andymator, i believe this one will be the quickest among all the other opencv installation. Please follow the tutorial and let me know if anything goes bad.
https://raspberrypi-guide.github.io/programming/install-opencv
A collection of tutorials to help set up and work with your Raspberry Pi
Thanks, will try that now
the difference between pip and pip3 is that they install stuff for python(python 2.x) or python3(python 3.x), python went under big changes from 2 to 3, so a lot of code isn't backwards compatible, that's why you use different commands
PS: on some distros, you may not have python2, and python would be used for version 3, you could use python -V to see the actual version it runs
and as someone else already said, 99% of the times, official docs for a given library/program goes into great details on how to install
thank you for clearifying that 🙂
All Raspbian system comes with both python2.7 and python3.5 pre installed so you will have both available on your OS.
i just meant that the "python == 2.x" part doesn't always hold
eg arch-based distros don't have 2.x iirc
or, installing python 3.x on windows, you use it as python
I think I managed to install openCV with apt-get, but when I try to import cv2, I get the error that no such module exists. Could it have something to do with the fact that I seem to be running Python 3.5.3?
Can you post the screenshot?
Is that helpful?
/usr/bin/python is most likely python2
and imma guess you installed the lib for python3
aha, what should I do?
try running python3 /home/pi/faceRecog.py
ie: use the correct interpreter, where the lib is actually installed
I get this now:
I still get the same thing:
no, that's not an error, just a QoL change for your
the error seems like it's trying to import some C code that it can't find
have you installed doing pip3 install cv2 or how?
no idea how apt-get goes for installing python libs
let me test my Ubuntu WSL, should be somewhat similar to raspbian
thanks!
pip3 install opencv-python and then >> import cv2 worked
all i've done is googling for "install opencv" and go into PyPI (python's package index, which was also the 1st link) to see what the package is actually named: https://pypi.org/project/opencv-python/
I tried the same thing now. This is what I get:
sorry, are you saying that I should do something else?
Again, I really appreciate you helping me.
i just did that pip3 install and it worked
but, WSL Ubuntu is not the same as raspbian
I installed the extra stuff that was mentioned in that link, at now it seems to work! I no longer get any error when I import cv2. Thanks!!
google and its stackoverflow results, are our best friends when coding :p
hehe, I know 🙂 But when you are bad at speaking the language (linux-stuff), it is difficult to undestand where to look and what everyone is saying. A channel like this really helps. I wish I knew about it earlier 🙂
my 1st approach when i face an error/warning i don't understand is to google it, many times it solves the issue in a moment
if not, i proceed asking somewhere
So, suggestions on powering the floppy drive? What would happen if I were to power it directly? What's the worst case scenario?
also much thanks to @humble nova , he helped you a lot.
A very brief bit of research says a 3.5" floppy drive takes up to 1A at 5V So depends where you mean by "directly" Your power supply needs to be large enough to power both devices or use seperate supplys but tie the grounds together
I'll probably use two 2A USB power supplies
Sounds wise. Do tie the grounds together 🙂
I don't know if this is an error or what, but if somebody can tell me where something similar to pulseout in pulseio is i would really appreciate it. the python script is not there in the github so im just a little confused
Not very familiar with blinka, but would pwmout work?
im not sure, i just got a code sample from the adafruit docs
Update: after failing to power the drive from the USB, I've decided to take out an old PSU. It's all fits together, just you know, when connecting any drive pins to ground, it doesn't light up the LED.
There are a few links in this chain that can be missing:
PSU
The PSU does not have power on the FDD pins
The FDD doesn't have ground pins all the way trough
The FDD light is dead
The FDD itself is dead
FDD
Third times the charm, it's working!
Everything is silent
Have I messed up with pin select?
The software works fine, or at least to some extent
pi@raspberrypi:~/c/FDD/floppymusic $ sudo ./floppymusic ~/c/FDD/midi/e1m1.mid
[floppymusic 1d68a51f]
Reading drive configuration drives.cfg
Setting up GPIO
Setting up drives
Reading MIDI file
Merging 1 tracks
Ready, steady, go!
Cleaning up
Bye bye!
pi@raspberrypi:~/c/FDD/floppymusic $
I've changed out the midi, no sound
but at least it was worth transferring the collection
Any other pin configurations?
I might tell some truth, I don't know much about GPIO. Only that it stands for General Purpose Input Output
So, update till the next time:
Drive select indicator - working ☑️ (pin 12)
Drive power supply - working ☑️ (both USB and PSU)
Software - working without showing any issues ❓
Connection - unsure ❌ (used pins bcm21 -> fdd18 & bcm20 -> fdd20)
Motor - not in motion ❌
hey @twin helm / @fresh patrol had to take some time away, but have been back at the grind today. I dug through my cable box and found a good USBA/C cable and the board came up, enumerated beautifully and we were off to the races; PDP context works like a champ and data is flowing; so bad cable (which is painful, but not uncommon in my experience)
however, I am having issues getting it to work with serial on my Pi 3, and so, once again - i ask if anyone can point me to what I may have overlooked; for memory, I am working with a UBlox R412m on the IoT 6 Click from Mikroe (https://www.mikroe.com/lte-iot-6-click) - my Pi 3 is freshly imaged from the latest Raspbian 32 bit lite; I've run raspi-config to disable console over serial and enable hardware uart
I have done a loopback test by shorting RX/TX and running minicom - with echo off, I am seeing my typed characters back on the screen, so it appears serial is ok
- Mikroe Pi 3 click adapter: https://www.mikroe.com/pi-3-click-shield
- slot 1: the modem doesn't power up properly; slot 2 it looks ok (not sure why this is)
- i ran the loopback test on slot 2
- this should be ttyS0, but the modem doesn't respond to AT commands
- Mikroe USB Click adapater: https://www.mikroe.com/click-usb-adapter
- enumerates and I see two ttyUSB ports
- loopback test fails, so not expecting much and indeed nothing happens!
- adafruit Debug Console (https://www.adafruit.com/product/954)
- on Pi3, it enumerates and i see ttyUSB0, but hooking up the IoT Click, no response from the click
- on Mac with Silabs driver installed, the port is in Arduino IDE, but when hooked up to the click, no response
I can see anything ive missed... but wouldn't be the first time!
$ cat /boot/config.txt | grep -i uart
enable_uart=1
$ cat /boot/cmdline.txt
console=tty1 root=PARTUUID=342cd3a6-02 rootfstype=ext4 fsck.repair=yes rootwait
with the USB Click adapter attached
$ sudo dmesg | grep -i tty
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=Composite-1:720x480@60i vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=PARTUUID=342cd3a6-02 rootfstype=ext4 fsck.repair=yes rootwait
[ 0.001189] printk: console [tty1] enabled
[ 3.170649] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[ 3.181690] 3f215040.serial: ttyS0 at MMIO 0x3f215040 (irq = 86, base_baud = 50000000) is a 16550
[ 9.908074] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0
[ 9.909199] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB1
On a side note, I'm also curious as to what solutions people use (and prefer) when hooking cellular modems up to Linux for data...
ok, RTFM: - buried in the datasheet
and the schematic; VUSB_DET is held high (by default) by the (already populated) J4 0-ohm resistor
(I might recommend they look at their font kerning - 'c' and 'l' is a perhaps a little close with that font 'l')
in anycase, by the looks of things I need to desolder J4 to get the UART enabled... which I'm loathe to do as I use it mostly with USB; (cases like this I much prefer pin jumpers... might have to swap J4 for a SMD pin header instead)
but, what annoys me most is the documentation that says (for the IoT 6 Click) - which (at least to me) reads: "this device should communicate via UART by default; the USB port is only for diagnostics, not data"... no mention of j4... also
also, interfaces GPIO and UART!
hrmm... ok no, I think i've misread the schematic here; since when I use Serial, VBUS from the USB port is not connected, in which case VUSB_Det is floating....
ok! progress 🙂 (i realise I am probably talking to myself, but rubber duckying can be useful!)
using the Adafruit USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi I was finally able to get the modem to come up in the Arduino IDE under Mac - turns out, the cable provides 2 serial ports and of course i was choosing the wrong one
i had assumed it was the USBtoUART, but its actually the usbserial that works
dmesg -w and plug the USB to TTL Serial Cable into the Pi
interesting, on Mac i see 2 usb-to-serial ports, but on Pi I only see 1.... 🤔 does anyone know how many ports there should be under Linux with this cable?
connections (which worked on Mac)
a loopback fails though...
I think they are the same port, but /dev/cu.SLAB_blabla is the equivalent of: /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_01426E16-if00-port0
@tired marsh cheers, interesting as one works, but not the other!
I know that the wch driver creates a second port (that works while the default one doesn't) so maybe it's the same situation
yeah, that is what im leaning to as well
im told that its plug n' play on raspian... but perhaps thats changed
... ok, that's where Im gonna have to leave it for today; if anyone can think of any reason for this, id be greatful! I might need to pop over to the Raspberry Pi forums
uninstall modemmanager
sudo apt purge modemmanager
@steady rose thanks - I saw that in my log but chose to ignore it 😂
The reason being though…. ModemManager is part of what I’m testing… so if I have to remove it we might be in trouble!
Sorry for the rudeness of my question, but do you know of an issue between modem manager and serial?
the general issue is modemmanager takes the com port, so other access gets blocked
didn't read all of the scroll back on this issue though, so possible im not understanding general issue.
how were you doing the loop back test?
with the adafruit USB cable?
Respect you didn’t read my ramblings 😜 here is the loop back #help-with-linux-sbcs message
that's wiring. what commands were run on the pi for the loopback test?
Just shorted rx/tx and used minicom with no echo
When I do that with the onboard uart (pin 8/10) it works but not the Adafruit
And by work it echos back what type
what specific OS are you running on the pi?
Latest raspbian 32 bit lite
did you change COM port to dev/ttyUSB0 in minicom? the UART on pins 8/10 would've been differnet.
Yep, ttyS0 for pins 8/10 (or /dev/serial0) and ttyUSB0 for the Adafruit cable
115200 baud 8N1 on both
But I’ll take a look without modem manager and see how it goes 👍
that'd still be my guess. i'm not familiar with minicom and how it might use modemmanager.
but there's no modem involved here, so it generally is not needed
the same general issue comes up with CircuitPython users:
https://learn.adafruit.com/welcome-to-circuitpython/kattni-connecting-to-the-serial-console#serial-console-issues-or-delays-on-linux-3105120
Cheers @steady rose it’s been a journey of discovery this one…
But can’t say I mind falling down a rabbit hole every now and again
@steady rose finally managed to put some time aside and take a look - removed (and purged) modem manager - but no difference, sadly
on the other end of the serial cable though is a modem - specifically the U-Blox r412m
dmesg
syslog
sudo minicom -b 115200 -D /dev/ttyUSB0
ctrl+a : e (echo on)
$ sudo cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=9f28df8b-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
(bare in mind, im using a USB-serial, so the console on serial0 shouldn't be an issue - when I want to use /dev/ttyS0 then console on serial is disabled)
for the same reason, uart is not enabled in the config.txt - however in previous testing, i have enabled uart in config.txt and also removed the serial console
... but just unplugging the USB and moving it across to my Mac gets me this! 🤷♂️
ill reverse the cable - take the USB on the Mac and then see if i can get a serial console from the Pi working; if that works then we can try and just send data between the Mac and the Pi over serial; ill have a dig around see if i can find something else that talks serial that I can plug in as well - maybe see if i can grab my scope from work and see whats coming out the serial port
It could be as simple as line ending characters, or something more complex and subtle involving format or (virtual) control signals
@gentle briar - interesting; i can certainly try that; from the arduino IDE above im using both NL and CR - I can even put a full Pi OS and install arduino on it so it's like-for-like! and test that; though if it were then at least a loopback echo test should work (which it does on ttyS0.. hrmm)
I have a few other Pi's here as well so i can give those a test - maybe the add-ons are getting in the way (never had an issue before, but theres a first time for everything)
It looks like a weird and subtle issue, so I'm casting around for things I've seen in the past in similar situations
yes, agree its a very subtle issue! its got me stumped completely; as the onboard serial works with loopback, but nothing else; the usb serial cable and modem works on Mac but not on Pi
i am very confident that the serial lines are not conflicting (as I have been using this setup for years and this is the first time this issue has come up) but if the serial lines were causing an issue, then the ttyUSB should be fine still
You did mention the Silabs driver but it appeared to be an FTDI cable in dmesg, but it doesn't look like a driver problem, so I didn't comment on that earlier.
and i have used the ttyUSB for talking to Arduino's in the past
I agree that it's likely not a conflict.
according to everything i can see its a Silicon Labs CP2102
dmesg here says the same #help-with-linux-sbcs message
I had been looking at your original post where you had ```
[ 9.908074] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0
yup. sorry for the confusion - the board i am using is a Mikroe Click - i have an adapter with a Mikrobus <-> USB adapter on it, and that one is FTDI (but it doesn't work either) -> so three different Serial interfaces (onboard, FTDI and Silabs) and none work
Since there's only one control line (DTR?), it should be easy enough to measure it and see if there's a difference
Amusingly, I have a Mikroe Click GSM board, but I think it's an earlier one.
yeah, i have a GSM board around here somewhere actually... bottom of a draw, if i can find it, ill test that (the Quectel M95 iirc)
Having three serial interfaces available could be useful, you could hook up a third one (RX only, so it doesn't conflict with anything) to monitor the communications
Heh, I think mine's the same Quectel one
its a good little module; shame about the 2G sunset but 🤷♂️
and if i can get my scope, i can probe the lines as well, see whats going on ... so a few tests to do still
A scope is invaluable for seeing details like stop and parity bits (I don't know if minicom has much facility for adjusting those, on the Mac end, I usually use CoolTerm)
my scope is not high end (Analog Discovery 2) but it does do serial decoding, and is a brilliant low cost tool - an arduino can be great for this too actually
I had one weird problem (with a SCSI bus in that case) where I had the company rent an expensive SCSI analyzer that ended up hiding what was really going on, and an old fashioned oscilloscope finally pointed up the real issue.
An Analog Discovery 2 is a dandy tool for exactly such situations. Even this ancient 75-year-old PocketScope, which is the opposite of high end, is sufficient for serial debugging
right! my hacking time is over, kids are calling - ill run some more debugging and see where we get to! i have no idea what the root cause will be, but will be fascinating to find out... and im sure ill learn something new along the way
Let us know, I'm curious
digging out the GSM module is a good excuse to clean and tidy the parts drawers
Heh, I know all about side quests like that!
Have you tried using minicom from the Mac?
Rather than the arduino serial console?
@torn trench no, not yet; grabbed the first serial application I had; I’ll add it to the test list - are you thinking something in minicom? Certainly possible - but never had an issue before
But I’ll try minicom on the Mac and Arduino ide on the pi 👍
A bug in minicom seems unlikely, but maybe either tool has some weird default option that makes it work/not work
A long shot for sure though
When you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Either way I'm really enjoying this series. I can't wait for the plot twist finale!
I assure you there is a better than 99% chance of user error … 😜
that's usually my twist. It was working the whole time, I just didn't notice.
I had that on a recent project, but I didn't notice because the middleware had a bug where it said the connection was inactive, so I didn't bother to query the database. When I did, I found out my system had been working for days and logging to the database all along!
hah. yeah, I really hate that. So much time spent spinning wheels.
anyone know what RPi4 firmware version (or rough date) included the automatic over_voltage scaling feature? I can't seem to locate the specific version.
@gentle briar @edgy oar (she/her): it would appear the problem was hw flow control - so the prize goes to @gentle briar I think (#help-with-linux-sbcs message)
but also @torn trench @steady rose, @tired marsh thanks
I came in this morning, put a full version of Raspbian + Desktop on, and VNC'd in; Checking Arduino IDE, the Adafruit debug cable worked as expected - but failed in minicom still
checked all the different line endings, but no luck
installed pyserial, and ran a simple check, which didn't work as expected; tried ATCOM from SixFab though (which builds on pyserial) and that works with ttyUSB0
so at this stage, the adafruit cable works in python and arduino, but not minicom; ttyS0 is still dead - also pyserial-monitor doesn't see ttyS0
installed CoolTerm, it sees the ttyUSB0 (which works out of the box), ttyS0 doesn't even get detected
hooked the IoT 6 Click up to using just 5V, RX, TX and GND with ttyS0 - and that works in CoolTerm, minicom
back in minicom disabled hardware control and the adafruit cable now works
now, im not 100% sure what is going under the hood
- something in the way the Mikrobus is implemented is not playing nice with HW Flow control; not sure what right now (but there is also another strange issue with my Mikrbus adapter's socket #1 - maybe pin conflicts)
- minicom's HW flow control and the adafruit cable have some issue somewhere (or Adafruit, CoolTerm, Pyserial just ignore HW flow control by default)
the Adafruit cable being CP2102 based, I suspect my ESP32-DevKit C will have the same requirement (device is in use though, so can't test)
need to look at the FTDI device again and see what that looks like... but honestly right now, i will have to stop, as now it's working i have to get on with the main topic which is to get the modem over uart to come up in ModemManager
This is AdaFruit's 4-pin cable (product ID 954)? I'll admit, I had misremembered the pinout, I thought it was RX, TX, ground, and DTR, but you're right: it's RX, TX, ground, and +5V. No flow control at all. Many of the other USB-serial adapters are 6 pins, and add CTS and RTS (or DTR) for HW flow control.
yes its : https://www.adafruit.com/product/954
In the bad old days, we'd open a port with tip or somesuch, then use stty to manually call ioctl() to fine tune the flow control settings. I think CoolTerm shows you the signals using simulated LEDs. Now I'm curious as to what that 4-pin cable does with RTS/CTS/DTR, and the fastest way to find out may be CoolTerm.
However, as you stated, your ultimate goal is to have the serial port work properly with ModemManager, and it seems there are settings (like MM_FLOW_CONTROL_NONE) available for it: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/38
I had originally guessed that the Mikrobus board was not answering because it wasn't seeing a flow control signal it wanted, but with a 4-pin cable, that's not an option, so now I'm thinking it's essentially the same problem, but on the other end: the receiving apparatus isn't accepting data because it isn't seeing the flow control signal it wants.
thanks 🙂
i am not 100% sure, you would think that the Mikrobus Click HAT (made by Mikroe) and the IoT 6 Click (made by Mikroe) would play nice together - maybe they do and im just missing something - I never found my GSM Click, but here it is (from 2019) plugged in an working on the same Pi Click hat
i am curious as to what lies beneath, but yep - sadly have to shelve that for now; if i can get MM working quickly, ill come back 🙂
but the funny thing is using ttyS0 from the Pi Click Hat always failed. even if i disabled the flow control in the terminal software... but its also behaving strangely with both click adapters
I suspect the HATs just use an onboard UART on the Pi that may be RX/TX only, but I haven't played with those (I normally just plugged the Mikrobus boards into a breadboard and ran signals to them with jumper wires).
The Click HAT looks like it's just a passthrough as I had guessed https://download.mikroe.com/documents/add-on-boards/click/pi_4_click_shield/pi-4-click-shield-click-schematic-v101.pdf
It does include an ADC chip, attached to the I2C bus, but the RX/TX signals are just passed through, and the RTS pin just goes to CS0 and CTS to INT, so they would only be switched/monitored if the software chose to do so.
indeed - and actually my next project will do the same (breadboarding the modem and running wires), i spoke with Mikroe and they just shrugged and said "we never said it was compatible with raspberry pi" which seemed odd.... sure you never said it, but you sell two products that allow it so...!
my suspect is the pi hat, as slot 1 is misbehaving (though the symptoms dont make sense either!)
the IoT 6 Click has a power button for powering on/off the modem; in slot 1 of the click hat, the button doesn't work... but slot two it does. but using rx/tx/5v/gnd from either slot works... so, go figure!
That kind of board draws some serious power spikes, so I always powered them with a beefy separate supply
I don't think it's a compatibility issue per se, but some communication software making some assumptions
the modem clicks? yes, esp. the 2g versions (this is LTEm)
to be discovered 🙂
.... and ill report back!
@crystal jewel Thanks for the update!
I have that adapter too and haven't had issues with tio or termius
Did have a weird issue at first though -- had cmdline.txt and config.txt set up for uart and serial console. Despite having same 115200 baud and 8n1, I would just get strange characters on the screen as if the baud rate was wrong.
Eventually gave up and reinstalled raspian and it worked fine. No idea what was goofy with that.
$ mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [u-blox] SARA-R412M-02B
Boo yeah... thats a GOOD end to monday... took me less time to debug the udev rules to get MM to recognise the serial port than to fix the ttyS0 (this is running on ttyS0)
Is the Pi Zero 2 W is beefy enough to benefit from a "nicer" (faster) SD card? Or is there no point in bothering?
At the very least, a nice SD card would make me feel better on a personal level.
Hah!
I believe it supports faster SD peripheral speeds so it might be worth the investment
Rad ok. Thanks.
If it was just the Pi Zero W I’d say save the money, but being a Pi Zero 2W definitely should have at least marginal benefits
Excellent.
Ok, so, I'm using the RPi Imager. I have a display set up, but no keyboard options at the moment. I have a Bluetooth keyboard, but it looks like I need the OS up and running, and some other kind of HID input to connect it. I'm missing the dongle on my RPi-setup keyboard because someone was using it for something else. 😖
Need USB Micro to A-socket adapter, and while I know I have a number of them, none of them are to be found.
Schrödinger’s USB dongle
@lost wolf you looking for a work around?
Kind of? I really eventually need access to the OS GUI. I'm setting this thing up with SSH enabled and WiFi, so I might at least be able to get to it from command line, but that only gets me so far with the project.
I "think" you can use ssh to conect then run "raspi-config" --and set the "headless" display size and enable VNC.
you'll need OS GUI for getting the BLE keeb working? or just eventually?
Maybe both, but mostly eventually. So I need a keyboard that works so I can navigate the OS.
Hmm that sounds familiar.
if you can get things working via CLI, then SSHing should work
if you do need GUI - then, VNC
Ok so, wait. Can I connect a Bluetooth device via command line through SSH?
Because I have a display....
So in theory I can hook up the display, log it into the GUI, then SSH in, connect the keeb, and have it work?
I have no clue how to command line connect a BT device though.
yes. in theory.
i've never gone thru that though
i'd think possible using bluetoothctl
Fair enough. Display does not seem to be working and pinging it isn't working either for SSH. Wait, I did not plug USB cable into "pwr in" plug. Trying that. Nope, still nothing. By "nothing" I mean no ping and no display. (Display might be a display issue, not a Pi issue.) The green power LED comes on and blinks a bit, but eventually turns off.
I did confirm that you can set the VNC resolution via ssh in rasp-config
Thanks @ruby night
Power USB cable is plugged into a wall thing with multiple USB ports.
so you should be able to set it then enable VNC and be able to bring up the GUI.
you enabled WIFI and ssh in the imager, correct? then you are trying to ssh to pi@raspberrypi.local?
I renamed it, but yes. I'm reimaging it in case I typoed something the first time.
Took screenshots of the setup to verify
"should" work 😉
Sorry, I have to go, but it "should" work... I have done it many times. Good luck.
Thanks Jerry!
This looks correct. Hopefully I can connect to it this time.
also note you can do a lot of settings when burning the image
Yes, I did them all. Heh.
Wondering if it's not successfully connecting to the WiFi.
that's all new-ish:
https://learn.adafruit.com/raspberry-pi-zero-creation/using-rpi-imager
I renamed it, enabled SSH with a password, gave it a new username, enabled WiFi.
oh...they also turned off the default account
And did localisation.
So I'm trying to log into newname.local
or ping it even
I used my 2.4GHz WiFi because that's what micros need. Should I have used my 5GHz?
Or could I have used it?
2.4 should be fine
🤷🏻♀️ Worth asking I guess.
you're doing all the config setup via rpi-imager?
yes
I’m not sure whether the zeros even work with 5GHz?
Doesn’t this rely on zeroconf/avahi?
I plugged in another display that I know doesn't need drivers, and it's not getting any signal either
Hm. How’s the LED on the board?
Checked our WiFi, it's not connected to it.
Off at the moment, was super blinky when I powered it up.
if you have a serial cable handy, you might be able to see some stuff on the console
I believe the light should stay on. So it kinda seems like it must be failing to boot
I don’t believe simply having the wrong wifi connection info should cause that. Could be worth trying a different SD card
What image are you writing with rpi imager?
This is the first time using this Pi. Maybe it's bad.
32-bit Raspbian
what model pi?
Zero 2 W
That might be a problem
What should I be using?
if you put the SD card back in your PC, do you get a boot folder to show up?
It should work with 32b
I'm happy to try 64
Yes.
32b should be fine
Takes like 5 minutes to redo. 🤷🏻♀️
Hmm.
it's something else
I get a splash screen on this display. Then nothing.
Light is blinky for a bit then shuts off
It is not connected to my WiFi.
how long did you wait after initial power with the fresh SD card inserted into the pi?
To what, ping it?
yep
It was plugged in for 5-7 minutes or something when I asked for a list of things connected to the WiFi. From the router.
I've tried pinging sooner, but realised I should wait. So I tried pinging later, and still.
hmm. that should be enough. the initial boot can be a bit long-ish.
how are you powering it?
USB to wall. Apparently the LED is a boot activity LED, not specifically power on the Zero 2 W?
yep
ah ok, I was looking at my 0w (not 2) to see what it did
and it was on the whole time. But sounds like maybe it's different on the 2
if you can get boot folder to show up with SD card back in your PC, could try this:
https://learn.adafruit.com/raspberry-pi-zero-creation/text-file-editing#configure-wifi-2827362
Ok I'll try it.
I think that's the same thing rpi-imager does
I recall it not playing nice with MacOS, but maybe it's better now.
So create the wpa file on the boot drive. It's full of .dtb files. Am I seeing the right part of it?
That was the issue before is that MacOS would boot part of it but not all of it
or something
that sounds about right to me
is there a file cmdline.txt?
there are two partitions, one is /boot and the other is the root filesystem
you should be able to mount /boot on a mac because it's FAT formatted, which is pretty universal
Oh right ok
root is ext4 formatted and you would probably need a special program to mount it on a mac iirc
but you should be able to add the files to /boot, and on first boot they'll be copied over
yep. several .dtb files.
should def see cmdline.txt and config.txt as well
Yeah I went from that.
I think wpa_supplicant.conf and if you want ssh you can just add an empty file named "ssh" or something?
wpa_supplicant.conf
and the boiler plate example should work
just change SSID and PASSWORD
Now put it back in the Pi?
Why won't it show booting up on the display though?
I thought that was a thing.
it may be trying to do something else after that, and getting wrapped around axle
How long do I wait after powering it.
It's not showing up in the client list on my network.
Which it wasn't before either.
minutes-ish
esp. with the mdns stuff. can be quirky.
just in case we need to get there, do you have one of these?
https://www.adafruit.com/product/954
and headers on the pi to attach to?
yes but I really don't want to do that.
I wanted this to be super compact.
Project doesn't need the headers. sigh.
I'm going to grab another Pi and see if it boots.
i'll run thru a setup real quick also just to see if there's anything obvious
i'll change hostname, etc.
Same behavior. I'm trying a different SD card now.
Uff.
If it was the card all along I'm going to feel rather defeated.
do you have other pi's on your network with hostname raspberrypi?
nope
have you connected to pi's before with the hostname.local approach?
this was just with SD card change?
It at least mentioned generating SSH keys and some other thing
Also 64 bit.
Now it is again not doing anything.
Hmm.
So we got 1 mm further.
Apparently.
Sigh.
Now it's back to splash screen and then nothing on display.
I guess it probably did the other thing the first time and I didn't have a working display hooked up at the time.
So I don't think we actually gained anything.
The other Pi did the same thing though
So I am thoroughly confused.
interesting, so you're seeing the systemd boot logs on the screen?
and then it goes blank?
do you know what the last thing you see is? An FTDI usb-serial cable could be pretty useful if you have one
OK, so the FIRST time it started up, it showed screens about generating SSH keys and some other thing. Not command line scrollback, but ASCII outlined little windows.
Then it goes blank.
Reboot, splash screen shows on the display, and then nothing.
hm, interesting... I almost exclusively do headless stuff with them so I don't know much about how the displays work
Well display or not, it should be doing something, shouldn't it?
It's clearly not booting properly.
I think that's likely, but hard to be 100% certain. I'm not sure it's entirely ruled out that it's booting up, but there's some kind of wifi issue and display driver issue.
it's certainly true that there's not much evidence that it's booting up correctly seeing as it's not connected to wifi and the display goes blank
Why not start with a bare configuration?
I think there are like, different display modes or something. At some point your window manager is gonna take over the display, and that's a possible point where things are breaking down
The giant 🤯 for me is that it does the same thing on the big Pi now.
Just SSH, no Wi-Fi, no display
ssh with no wifi?
How do I SSH into a Pi with no WiFi.
would be hard on a zero w 2 🙂
Serial ssh
can try hdmi_safe=1 as possible fix for disp:
https://learn.adafruit.com/raspberry-pi-care-and-troubleshooting/do-this-first#attaching-a-monitor-3110355
that's just serial, no ssh, isn't it?
There aren't headers on it and I'm not putting any on.
I have a regular Pi here too tho
The USB ports allow you to ssh over serial
Just use putty or screen on a Mac terminal
in ethernet gadget mode?
Nope, Serial SSH
And connect to what?
Does it mount?
Yeah I understand
from putty just change the serial port and speed to 115200 at least
I'm very confused by the term serial SSH. You can definitely do serial over USB though. It would require a bit of tinkering with the config.txt I believe
I'll try and dig up the changes needed to use the USB port for serial...
you shouldn't need to do any changes
I'm not seeing it anywhere.
Ah wait
Follow this
You need to change like a few small things in the config
My brain was defaulting to Debian on a beagle bone 🙂
It has SSH over USB enabled by default
Very convenient
Eh, names don’t matter here; it’s the mental concepts that matter 😆
TIL, thank you andy
I'm curious though, how it's gonna get an IP address
hm looks like it's using zeroconf. Maybe a link-local address
Same way you get an IP on an unconnected network? Self assigned local Ip 169. Something
I followed the steps. It shows up in my USB Device Tree for a short time and then goes away.
The steps did not work, there is no response.
Why this time. Why is it all buggered this time. I've never had so much trouble with a Pi. Ever.
Do you have any other SD cards to try?
how about this one: https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/serial-gadget
I believe these instructions should enable a serial console over the USB connection on the pi, rather than over the UART (which you'd need headers and an FTDI cable to use)
This is a new SD card.
From the initial one.
it's also, I suppose, a possibility that the board is damaged or something. But personally I'm optimistic that a serial console (whether USB based or UART based) could get some more information
@lost wolf the rpi-imager route did not work for me either. not sure why, although it did leave out the country code in wpa_supplicant.conf for some reason. however - i got it working by moving SD card back to PC and manually making a new wpa_supplicant.conf and then rebooting with that in the pi.
Immediately following imaging?
I had issues with the example wpa_supplicant once. I will try and find the one that worked for me
sort of - i had made attempts immediately after using rpi-imager
OK let me try that set of things.
i attached a console cable to be able to get in and check things outs
then did the manual file edit trick
card not mounting now. Trying a new new one. 🙄
Already clicked go with the config stuff still in there.
I'll try this once
and then do it without if this still fails again
ok, before moving SD card over, can sanity check what's in the firstrun.sh script it'll generate
check these lines:
cat >/etc/wpa_supplicant/wpa_supplicant.conf <<'WPAEOF'
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
ap_scan=1
update_config=1
network={
ssid="mynetwork"
psk=69e49214ef4e7e23d0ece077c2faf3c73f7522ad52a26b33527fa78d9033ff35
}
WPAEOF
chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf
before moving to pi
just open on mac
Imager unmounts when done
so I need to remount it first
but will do
@steady rose So run cat >/etc/wpa_supplicant/wpa_supplicant.conf <<'WPAEOF' from the boot directory?
just checking file contents. open in text editor. make sure it nominally looks like above.
it'll have more. but those are the lines creating the wpa_sup file
There is no /etc
doesn't matter - it's there after boot
/boot/firstrun.sh
has a country line?
country=US
yes. but now you have firstrun that will interfere and try to do the same thing
guess could just delete it
hmm
and go other route
rpi-image also doesn't add a scan_ssid=1 line
i'm trying to work backwards and break it now
to find out why the rpi-imager route did not work
hmm. yah. if i remove that one line. it's back to not working - not connecting to my wifi
hmm
add it back. reboot. it works.
Interesting.
the psk being hash vs. plain text doesn't seem to matter. works either way.
I have an idea, trying it one more time.
ok, but you tried a manual wpa_sup file and that didn't work either
I'm going to edit the firstrun.sh file