Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Does anyone have experience with the Papilio one? https://www.sparkfun.com/products/11158

Seems like a very arduino-ish design, with support for extension boards and all that. I don't have any experience with FPGAs, so is this a good first choice? Is there anything else out there that you would recommend instead for a similar or lower price point? I don't have a specific application in mind, just interested in experimenting and learning about them.

I've seen a couple articles about emulating specific processors with FPGAs, for example some video game systems. Is there any kind of online library of various virtual cpu designs like this? Are FPGA designs generally very portable across makes and models?

Adbot
ADBOT LOVES YOU

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

I meant to post this here originally, but did the wrong thread on accident, so quoting myself

peepsalot posted:

I had a hell of a time figuring out how to get started with MSP430 Launchpad, but after a couple hours of trying various outdated guides, I finally compiled and loaded a LED blink demo using msp430-gcc. So in case anyone else wants to know how to get from 0 to blinkenlights

Ubuntu has all the msp430 gcc, debug, etc. packages available in repository

Then use this example project:
https://github.com/zacwheeler/had_launchpad-blink
There are other variations of the same blink code that I tried before that which were just outdated i guess because the compile kept failing.

The readme for that github has very straightforward steps to make it work.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

OK, so my idea for now is to play around with audio on this msp430 and see how nice of a song i can cram into 16KB. I know i could implement some external storage, but I'm just more interested in testing the limits of what i can do with this chip and not wanting to order more ICs at the moment.

I'd like to be able to mix a few channels to play multiple simultaneous notes. I'm just wondering if anyone has suggestions/tip/tricks to do mixing and sequencing on limited cpu like this. This is maybe getting more into general programming and algorithms, but I'm wondering if there are resources for simple models of common instruments, like procedurally generated waveforms that might sound like a guitar string, etc.

Also does any kind of demoscene exist for microcontroller stuff like this?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Base Emitter posted:

I'm not super familiar with the msp430, but it does have some nice stuff on it for audio, depending on which variation you've got.

Pretty much any microcontroller can do chiptune style stuff.

With a 16-bit CPU and a 12-bit DAC (or a delta-sigma DAC) you can do basic sample (looped or one-shot) playback pretty easily, though your sample sizes are limited by available memory.

Beyond that there's tons of DSP type techniques, particularly if you are using a CPU with a hardware multiplier on it. That's rather a broad subject, but if you're going to do sample playback, you can add envelopes and modulation. There's lots more you can do...

I currently have a half-finished project to do some digital string simulation (a very basic physical model) in an mbed (an ARM board).
Yeah i've just got the two chips that came with my Launchpad which are MSP430G2553 and MSP430G2452. Unfortunately as far as I can tell they don't have hardware multipliers. I think mostly just the MSP430F... versions have them. Man, I really had no idea how many freaking variations of this chip there were until I looked at the product selector. 380! I thought it was just a few different in flash and RAM capacities and packages.

So yeah without hardware multiplier I think i'll have to be pretty careful about minimizing calculations. I found a PDF from TI explaining a couple efficient mult/div algorithms which can be implemented on MSP430, so that's nice.
http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=slaa329&docCategoryId=1&familyId=911

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Silver Alicorn posted:

How about write a polyphonic waveform generator using PWM. Square waves are easy, and you can approximate triangle, sawtooth and sine pretty efficiently using Bresenham line/circle algorithms. I've been planning to do something like this for a while but you could probably beat me to it!
Yeah i was thinking maybe storing a hardcoded lookup table of a quarter of a sine wave and flipping it around the different ways to get the full wave. I'm still looking into how all the PWM stuff works at the moment. I don't anticipate square, triangle, and saw would be very difficult to generate on the fly. I was wondering if there is maybe some other things that would be done to make it sound like a guitar pluck though.

Also bass kick, hi-hat, etc.

peepsalot fucked around with this message at 22:03 on Nov 24, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

PDP-1 posted:

The CORDIC algorithm might be helpful for generating sine waves without a hardware multiplier.

One way I can think of offhand to do instrument sounds would be to record a short (0.1 second-ish) snippet of that instrument playing a sustained note, and then play that snippet back at a faster or slower rate. Digitize the sound, then FFT and un-FFT it to get a symmetric sample that won't blip when it repeats.

A less satisfactory way may be to try to figure out a harmonic profile for the instrument you want to replicate - i.e. a piano might have a fundamental tone with amplitude 1.0, a second harmonic with amplitude 0.5, third harmonic at amplitude 0.1, etc., and so you generate those harmonics and blend them together with appropriate relative weighting. Then you'd change the harmonic weightings to get 'flute' or 'tuba' sounds.
I never could really wrap my head around FFT and iFFT, but assuming I ever understood it do you really think a 16bit mcu with no hardware multiplier could even manage anything like that?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Regarding general PWM audio generation, I'm trying to work out what sample rate and bit depth I should use. If my clock rate is 16Mhz and I have a 16bit timer to work with, say for example I wanted to try 16bit audio, i would have to use the full length of the timer for my PWM to get the full 65536 possible values out of it. So I would only be capable of 16000000/65536 ~= 244 samples/sec which is not fast enough for audio. So the best compromise I think would be 10bit audio, which would get me 15625 samples/sec and give me up to 1024 cycles to calculate my next sample. Does this make sense?
Or is there some other weird old trick i'm not realizing that would let me get higher resolution than that at the same sample rate? This is assuming no external DACs or other ICs.

Also, I guess I need to put a low pass filter this to smooth the PWM pulses. I have a small 16 ohm speaker that I plan on using. I don't know what the inductance is, so is it reasonable to model this as just RC filter for a ballpark figure? Using RC equation for cutoff freq Fc = 1/(2piRC), say i want to set it at 10Khz, then the C conveniently comes out to nearly exactly 1uF. Is adding inductance of the coil going to throw this off a ton?
Edit: on second thought i'm not sure this makes any sense at all to use the load resistance as the filter resistor.


My speaker looks a lot like this guys:
https://www.youtube.com/watch?v=5A3bBXRpYCI

I think he's using PWM to generate the audio square wave directly, whereas I want to use a much higher PWM to generate individual samples. Anyways, he has no limiting resistor or anything, is this possibly bad for the pins to provide this much current? Do they have some internal protection against shorts?

peepsalot fucked around with this message at 03:11 on Nov 25, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

YO MAMA HEAD posted:

Does anyone here have any advice for working with PWM audio on the Arduino Uno? I'm trying to make an algorithmic synthesizer (a la http://countercomplex.blogspot.com/2011/10/some-deep-analysis-of-one-line-music.html) and have gotten past the ugly problems of on-the-fly string evaluation and getting sound to come out of the dang thing. I'm having two main problems:

—What values should I be throwing this thing? The details of the ugly register construction is well beyond my experience level. Pages like http://arduino.cc/playground/Code/PCMAudio seem to suggest it's an unsigned byte, but I only get low rumbly squelches unless I shift my values left a few times.

—Is there any reason the speed would be wobbling from its supposed 8000hz clock? I don't know enough to tell if this is a consequence of the affordable hardware or my laughably bad attempts at memory management.

I will pastebin code if necessary, but I imagine these questions can be answered more generally. Thanks!
I'm trying to do a similar thing on msp430. I think the big thing is to filter and amp your output, which i'm still trying to figure out.

I just followed this guy's schematic (using different RC components for higher cutoff) using dual OPA376 opamps (OPA2376 for dual package), stupidly assuming they could power a speaker without looking at the datasheet, but now that i've built, i realized i still need an amp. So I guess I'm ordering lm386 to attach to that output. And then hopefully it will drive this dumb 16 ohm speaker i have.

edit: here's my ridiculous opamp filter circuit thing. couldn't get 2376 in dip package.

peepsalot fucked around with this message at 08:02 on Nov 30, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Martytoof posted:

Can anyone point to a good tutorial that will help me to understand why/how chaining shift registers together works?

I totally understand how a single shift register works.

I totally FAIL to understand why you can just chain them together and have control over the entire chain with just three pins.

I want to try driving a handful of 7 segment displays without multiplexing, and if I can dedicate just three GPIO pins to that task then I'm actually pretty excited. I know it WILL work, but I'm not quite sure WHY it will work.

Sorry if I'm using the wrong terminology, etc.




I'm using the 74HC595 in this case, I think. I'm not sure if that makes a difference.
Imagine four bits at the edge of a cliff...

It's pretty simple though. You shift in a bit by setting the input line high or low, and then sending a clock pulse. That bit goes into the first place, and the bit that was there gets moved into the next place and so on. The last bit gets discarded if you don't do anything with it. But if you have multiple shift registers, and your chip provides an output for this last bit, then you can just hook that to the input of your next register. You feed all the chips the same clock signal and that lets the data just overflow into as many registers as you like.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

what's my best bet for some dead simple data storage to interface with msp430, on the order of a couple mega bytes of data?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Man, that teensy 3 looks really nice after messing with msp430 launchpad these past few weeks. It has as much RAM as I have flash memory on this stupid thing. 512B RAM makes it the biggest pain in the rear end to try to read from SD card, especially since I can't find a non-SDHC card, and you can't do a partial read on a SDHC card. You have to read 512B at a time, and throw away half or more of the data since it won't fit.

I think I might have to try playing with that next after I wrap up my current project.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Martytoof posted:

If I wanted to have my uC produce a lifelike sound instead of a harsh "BEEP" through a standard piezo speaker, what would be the best/simplest/cheapest way to implement something like that?

I just mean like a lifelike bell "*ding*" sound, not an mp3 or ringtone or anything like that so I think a full on SD card MP3 player circuit would be way overkill.
Maybe just a simple waveform like sawtooth with a taper on the volume level over time?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Did anyone here get in on the FreeSoC Kickstarter? It was funded a few months ago but I missed it. Actually I think I saw a link to it during the campaign, but didn't actually understand what it was at that point and just groaned about there being another arduino clone.

This thing looks pretty drat cool though. Basically this Cypress PSoC chip that it's based around has a bunch of super configurable peripherals where you can chain together all these things like analog mux, opamp buffers, DACs, etc, just from their snazzy free(of cost) dev tools. So you can customize the chip for whatever purpose you want.



I think I'm gonna have to pre-order one from their store even though the kickstarter rewards aren't scheduled to ship till Jan.

Tech Specs posted:

CPU
32-bit Arm Cortex M3
The Cortex M3 MCU in freeSoC offers DC to 67MHz Operation, 256KB Flash Memory, and 64KB SRAM, more than enough for your most complex projects. Hardware multiply and divide operations ensure you'll never be limited by your microcontroller's capabilities.

A graphically configurable external memory interface allows you to expand the storage of your device with up to 1GB of external memory, directly mapped in the 4GB address space of the Cortex M3.
Analog

Dual SAR ADCs
Dual 12-bit, 700ksps SAR ADCs offer unparalleled speed in conversion, even for the most demanding applications

Delta Sigma ADC
The onboard Delta Sigma ADC can be used at any resolution from 20 bits to 8 bits. At 20 bits of resolution, it offers 180 sps, useful for thermocouples or strain gauges. At 16 bits, it will convert at 48000 sps, perfect for audio applications. At 8 bits, it will convert at 384ksps, almost equaling the SAR ADC in conversion speed.

Quad 8-bit DACs
Quad 5.5Msps IDACs allow for extremely fast, extremely precise digital to analog conversion. IDACs can be configured as current sources or current sinks. Alternatively, you can configure them as voltage DACs, for a speed of 1Msps on each DAC.

Quad Comparators
Four built in comparators can be routed to any analog component.

Quad Rail-to-Rail OpAmps
Four OpAmps, spec'd at 3MHz GBW and 10mA drive, can be used to buffer any incoming analog signal, or you can directly connect them to external components in your design. OpAmp outputs can be used through dedicated pins for full current capability, or routed to any internal signal or external pin on the freeSoC.

CapSense
Capacitive Sensing on all GPIO, Sliders, Buttons, and more. Cypress in a leader in capacitive sensing technology, and provides a built in auto-configuration utility, so you can easily implement your capacitive sensing design without the headache of manually configuring the sensitivity.

Quad Multifunction Analog Blocks
These multifunction analog blocks can be configured as programmable gain amplifier, transimpedance amplifier, or for sample and hold. Need a precision current measurement from your photodiode? Just plug it straight into freeSoC, run it through a transimpedance amplifier, pump up the gain with a PGA, and use your delta-sigma ADC for a 20-bit conversion.

Advanced I/O Routing Network
Route any analog peripheral to any GPIO pin on freeSoC. Use your freeSoC as a 32 channel analog multiplexer. Or a 16-channel differential mux. Inputs and outputs both can be routed to any GPIO on the PSoC.

All GPIO can be configured as high-impedance analog, high-impedance digital, open drain (both source and sink configurations), resistive pull up, resistive pull down, or strong drive.
Digital

24 PLD based Universal Digital Blocks (UDBs)
These are the heart of freeSoC's digital flexibility. Can be configured graphically with built in components like PWM, SPI, I2C, LIN, CAN, SPDIF, I2S, Quadrature Decoders, Counters, CRC, and standard digital logic gates.

OR, roll your own components with verilog, tie them into your block diagram like any other component, and get hardware-accelerated speed for your custom digital application. It's like having a built-in FPGA without all the hassle of having an FPGA.

Full Speed USB
A full speed USB transceiver is built in to freeSoC. Graphically configure your USB endpoint and device descriptors. PSoC Creator has built in support for Audio Descriptors, HID, MIDI, UART, and more. Don't waste your time reading the USB spec, just drag and drop and you're done. freeSoC has a built in 24MHz oscillator for full USB compliance.

Built-in Timer, PWM, and Counter Components
In addition to the flexible UDBs, freeSoC has four dedicated 16-bit counter/timer blocks, and four dedicated 16-bit PWM blocks. These can be used without using any of the UDB blocks, and can also be routed to any pin on the freeSoC.

Real-time Clock
The freeSoC includes a real-time clock crystal running at 32.768kHz. Use this with the built-in RTC component in PSoC Creator to instantly create a digital clock, with built-in methods for generating year/month/day/hour/minute/second data.

DMA
PSoC Creator lets you configure DMA channels graphically. You can use any digital signal as a trigger for a DMA request, and totally bypass the CPU bottleneck for ultra-high bandwidth applications.

Special I/O
Each board has 8 special I/O pins that can be used for high-current drive applications.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

movax posted:

Totally missed it, but it does look pretty slick, and I think it'll be fine for hobbyist/etc use. The configurable blocks are pretty slick; need a ton of PWM for motor control? No problem! gently caress ton of SPI/I2C for weird reasons? Still good!

Paging Otto to this thread to rant about how the PSoC has screwed him over repeatedly (though I think he was having problems with a specific version).

I'm kinda dreaming right now of turning one of these into a automotive engine controller.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Martytoof posted:

Mine did too, I just don't like having a ton of different cables lying around. All my other dev boards use mini usb (aside from the Arduino obviously) and I like just having one cable I need plugged in for development :(

Of course once my Bus Blaster JTAG thing shows up this'll be a moot point :)

I've got the opposite problem. All my phones for the past few years have been micro usb so I've collected a bunch of those cables, and the mini usb cables are the odd ones i can never find. So I got a bunch of mini to micro adapters to plug on the ends of all my micro cables. Saves having an extra cable in my geek bag when traveling, etc.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Somethin weird goin on, where my User CP is showing that there is one new post in this thread by Martyoof, but no matter how many times I click the thread it never shows the new post. Maybe this post will fix it?

e: Yeah it made it show up, weird.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

The MSP430 assembly instruction set definitely has opcodes for byte operations. I'm pretty sure the byte and word variations of these instructions all take the same number of clock cycles. You can check out the instruction set in the MSP430X2XX Family user guide (the chip family that comes with the launchpad).

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Anyone used the TI capsense library for msp430? http://www.ti.com/tool/capsenselibrary

Every time I try to read the documentation for this thing I just end up more confused than when I started. I'm trying to mash together one of the examples included with the capsense library with this hardwrae uart example, but they are designed for different clock rates. And I'm thoroughly confused about how any of these clocks are being used.

For now I'm just trying to limit to pinOsc, since that requires no extra components.

The explanation of the fastRO vs RO in the docs didn't make any sense to me. I can't tell what are the practical applications, pros/cons of any of these thousands of different ways to set up this capsense poo poo.

In structure.h there are some constants that you are supposed to comment/uncomment I guess, and then CTS_Layer and CTS_HAL check if they are defined, and sets up things differently depending on what is there:
#define RO_PINOSC_TA0_WDTp 65
//#define RO_PINOSC_TA0 66

So the first one uses TA0 and the watchdog timer for something, but the second one only needs TA0? Why?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Arcsech posted:

At 0V-5V, 8-bit, and 10Hz, your easiest cheap solution is probably to just buy an Arduino and have it send the ADC reading over serial 10 times per second.
You could also get a purpose built logger like this for $29 no programming required.
https://www.dataq.com/products/startkit/di145.html

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Rocko Bonaparte posted:

My wife was thinking of making a googly-eyed wreath for Halloween. I was wondering if there was something I could to make the eyes move and track something. This would be a lot of eyes on a wreath, so I don't think I could really control each one individually--unless we're talking like 10 servos for a buck or something. Can anybody think of any tricks?

Use a ferrous material for the pupils, have a ring of high powered electromagnets around the perimeter to control their gaze

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Stick a diode on the solar cell so it can only charge and not discharge your battery.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

I'm also working on a USB related project and had not heard of Microsoft message analyzer before, so I thought I would give it a shot.

I'm trying to follow the first video on this page:
https://msdn.microsoft.com/en-us/library/windows/hardware/dn741264%28v=vs.85%29.aspx

I'm on windows 7, and the interface looks a little different from the video. There is no "Capture / Trace" "tab" as mentioned in the video so that's where I'm currently stuck.

Am I losing my mind or is this the most incomprehensible UI produced by microsoft to date?

e: Well I eventually was able to start a USB trace, but none of the devices I try plugging in show up in the log :confused:
Is there something special I need to do to capture enumeration events?

I only see these two devices VID/PID (I'm grouping by UsbDevice in the Analysis grid view to try to see them)
VID:8087 PID:8008
VID:8087 PID:8000
Which I think are intel hubs that are built into the motherboard.

peepsalot fucked around with this message at 21:45 on May 8, 2015

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

TI's MSP430 series has a lot of low power options.
http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/msp/products.page

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

I've got a wackass embedded linux system that is logging all kinds of stuff with syslogd, which is provided through busybox. It has a line limit of 256 characters which I'm running up against.

I am wondering if that limit is configurable in some way.

This is the most information I've been able to get out of busybox:
code:
>syslogd -h
syslogd: invalid option -- 'h'
BusyBox v1.19.4 (2012-12-16 13:54:20 CST) multi-call binary.

Usage: syslogd [OPTIONS]
Is there any trick to make it tell you what [OPTIONS] there are?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

I frequently ssh into an arm system which is on my LAN, and between giving command "ssh user@ip" and seeing the password prompt is about 30s. Once logged in, the connection feels reasonably responsive, its just really annoying to wait that long for a password prompt.

/proc/cpuinfo for reference

quote:

Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 719.25
Features : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2

Hardware : ti8148evm
Revision : 0000
Serial : 0000000000000000

On the other hand, I have another arm system (beaglebone black) that I also sometimes ssh into, on the same LAN, from the same client, and I see the password prompt in 1s or less.

Here is it's cpuinfo

quote:

processor : 0
model name : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 298.24
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2

Hardware : Generic AM33XX (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000

Why would these two perform vaslty differently for that initial ssh connection? Any ideas if there is some config I can change to make this not take ages to initiate ssh connections?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

ok I ran ssh -v on the slow system, and this is what it output:
code:
$ ssh -v root@192.168.1.15
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.1.15 [192.168.1.15] port 22.
debug1: Connection established.
debug1: identity file /home/peeps/.ssh/id_rsa type 1
debug1: identity file /home/peeps/.ssh/id_rsa-cert type -1
debug1: identity file /home/peeps/.ssh/id_dsa type -1
debug1: identity file /home/peeps/.ssh/id_dsa-cert type -1
debug1: identity file /home/peeps/.ssh/id_ecdsa type -1
debug1: identity file /home/peeps/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/peeps/.ssh/id_ed25519 type -1
debug1: identity file /home/peeps/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: Remote protocol version 2.0, remote software version dropbear_2012.55
debug1: no match: dropbear_2012.55
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received     
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 90:75:3d:ca:f1:42:65:92:71:97:48:d7:6b:ff:d7:8b
debug1: Host '192.168.1.15' is known and matches the RSA host key.
debug1: Found key in /home/peeps/.ssh/known_hosts:23
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/peeps/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/peeps/.ssh/id_dsa
debug1: Trying private key: /home/peeps/.ssh/id_ecdsa
debug1: Trying private key: /home/peeps/.ssh/id_ed25519
debug1: Next authentication method: password
root@192.168.1.15's password:
It waits about 20s after outputting the line that says "Local version string ..."
And another 10s on the line "expecting SSH2_MSG_KEXDH_REPLY"

I mean, these messages are coming from the ssh client, and the problem is presumably with the server, so I'm not sure how useful that is. Seems like its just waiting for dropbear to do things and its taking forever. I don't know if I can get any verbose logging from dropbear. It logs a minimum of messages to syslog but nothing that indicates the reason for the pause.

In comparison, the beaglebone uses openssh server, not dropbear, and I also noticed it does ECDSA while the slow system does the RSA key.

peepsalot fucked around with this message at 01:03 on Oct 10, 2016

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

ShoulderDaemon posted:

This is almost certainly slow or broken DNS on the server.


Might be a very slow implementation of ECDH on the server and a large key. Could also be DNS again.

Test on the server how long it takes to find the hostname for your client's IP address. You might have something like mdns enabled and causing a long wait while it probes the local network to try to discover a hostname.
Sorry, I had copied and pasted that "10s" line from the beaglebone log which is not the slow one. So its not "ECDH", I corrected my post above.
Its "expecting SSH2_MSG_KEXDH_REPLY"

Also I don't know how to test the reverse DNS lookup from the ssh server. There are no dig or host commands.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

ShoulderDaemon posted:

DNS still plausible. Might also still be keysize related. I'd probably attack the DNS angle first before bothering with further investigation.


See if ping is noticeably slower than ping -n or something? It's hard to answer without knowing what you do have.

Check that resolv.conf has the right nameserver. Check nsswitch.conf for something like mdns. Break out Wireshark and see what traffic is coming from the server during one of these delays.

What I have is a lovely 4 yr old busybox multi call binary and no man pages for it
code:
$ ping -n 192.168.1.16
ping: invalid option -- 'n'
BusyBox v1.19.4 (2012-12-16 13:54:20 CST) multi-call binary.

Usage: ping [OPTIONS] HOST
$ 
Of course enumerating what those options are would take up precious bytes and we can't have that sort of bloat in busybox.

e: I guess dropbear is only configurable at compile time?

peepsalot fucked around with this message at 17:42 on Oct 13, 2016

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Whats an embedded data structure?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Why do you think you want to program directly in assembly?

e: play TIS-100 instead

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Le0 posted:

What do you guys usually build for learning purpose on a new architecture?
Just write an emulator.

Adbot
ADBOT LOVES YOU

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

ante posted:

ST is the rising star, gently caress Atmel
Actually Espressif is the rising star

  • Locked thread