Bitcoin Forum

Bitcoin => Hardware => Topic started by: MaximeAD on March 14, 2015, 07:37:56 PM



Title: Speaking to Spondoolies Hardware with the serial port
Post by: MaximeAD on March 14, 2015, 07:37:56 PM
Hi everyone,

I wondered if anyone successfully used the serial port on a Spondoolies device? I am trying to get it done with my SP20 and I am not able to make it work! I don't understand what I did wrong and I want to make sure that it is working for someone as I'll try to replicate is setup!

Firstly, we can get the UART settings on SP website http://www.spondoolies-tech.com/blogs/technical-blog/17587524-our-serial-settings-for-uart :
Quote
HW flow control - NO

SOFTWARE flow control - NO

115200

8N1

Secondly, I contacted the SP support to know what was the pinout of the serial port:
Quote
Here is the pinout for our serial cable:

Pin 5 GND
Pin 3 CPU RX (input to miner box CPU)
Pin 2 CPU TX (output from miner box CPU)

Signals logic level is 3.3V

Thirdly, I bought this device (http://www.get-console.com/shop/en/usb-to-serial-cables/57-usb-serial-cable-rj45-180cm.html) and made a RJ45 to RJ12 adapter with the pinout in consideration to be able to plug it in the SP20.

However, all I can get is gibberish on the console.. The bauds rate looked fine to me, but it didn't work... I'm thinking it could be an error in the pinout, but I'm supposed that if I didn't make it right, I would receive nothing on the console...

What are you guys thinking? Did someone have any success with this port?

Thank you!


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: sidehack on March 15, 2015, 05:29:06 AM
From the device page you linked:

Quote
This USB cable has an embedded FTDI 232 and RS232 level shifter to produce true RS232 levels.

RS323 digital signals are typically in the neighborhood of +/-8V or so, which if they're telling you the RX and TX are on 3.3V logic level, you definitely need to not use that cable. Grab something CP2102-based - heck, even a Prisma adapter (or Novak's not-AM Prisma adapter) would do it since those use a 3.3V logic and can operate at that baud rate.


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: MaximeAD on March 15, 2015, 12:06:07 PM
Thank you sidehack!

I'll look into that. Seriously, I was kind of lost with all those protocols and standards. I never used a serial cable before!


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: Prelude on March 15, 2015, 12:08:32 PM
Hi Max,

I'm curious, what will using the serial port allow you to do with the SP20? (once you get it working)


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: MaximeAD on March 15, 2015, 12:15:47 PM
I suppose/hope it will give me access to a root console.

Could be very helpful to debug a machine when it doesn't connect to network or you don't know its IP address.


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: klondike_bar on March 15, 2015, 01:40:25 PM
Which connector are you using on the SP20? Is it the actual 20PIn connector on an individual hashing board, or a smaller connector on the control board?

if on the control board, this is probably useful: https://github.com/Spondoolies-Tech/u-boot
Quote
- Serial Ports:
      CONFIG_PL010_SERIAL

      Define this if you want support for Amba PrimeCell PL010 UARTs.

      CONFIG_PL011_SERIAL

      Define this if you want support for Amba PrimeCell PL011 UARTs.

      CONFIG_PL011_CLOCK

      If you have Amba PrimeCell PL011 UARTs, set this variable to
      the clock speed of the UARTs.

      CONFIG_PL01x_PORTS

      If you have Amba PrimeCell PL010 or PL011 UARTs on your board,
      define this to a list of base addresses for each (supported)
      port. See e.g. include/configs/versatile.h

      CONFIG_PL011_SERIAL_RLCR

      Some vendor versions of PL011 serial ports (e.g. ST-Ericsson U8500)
      have separate receive and transmit line control registers.  Set
      this variable to initialize the extra register.

      CONFIG_PL011_SERIAL_FLUSH_ON_INIT

      On some platforms (e.g. U8500) U-Boot is loaded by a second stage
      boot loader that has already initialized the UART.  Define this
      variable to flush the UART at init time.

- Pre-Console Buffer:
      Prior to the console being initialised (i.e. serial UART
      initialised etc) all console output is silently discarded.
      Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to
      buffer any console messages prior to the console being
      initialised to a buffer of size CONFIG_PRE_CON_BUF_SZ
      bytes located at CONFIG_PRE_CON_BUF_ADDR. The buffer is
      a circular buffer, so if more than CONFIG_PRE_CON_BUF_SZ
      bytes are output before the console is initialised, the
      earlier bytes are discarded.

      'Sane' compilers will generate smaller code if
      CONFIG_PRE_CON_BUF_SZ is a power of 2

It looks like you might need to access UART while a bootSD is in the system.



if you're using the 20pin hashboard connector, youll need to run CGminer on your pc and send a golden nonce at the correct baudrate and listen for a matcing hash.


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: miguelmorales85 on March 21, 2015, 03:59:21 PM
Why would I use the UART serial connection when I have ssh through Ethernet ???


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: MaximeAD on March 21, 2015, 08:58:42 PM
Why would I use the UART serial connection when I have ssh through Ethernet ???
Could be very helpful to debug a machine when it doesn't connect to network or you don't know its IP address.


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: MaximeAD on March 31, 2015, 06:30:28 AM
I was motivated tonight..! The shipping of a CP2102-based device was taking too long so I tried with a Raspberry Pi I have at home. I'm not used to UART and all that, but figured out they had the same voltage level and may work...

The good news is that it worked  ;D! During the booting of the device, I have kernel messages from the SP20 as I would expect.

However... When I try to login with the serial port, it doesn't work... I don't know why. It looks like once the device is booted, I receive maybe 1 character on 2 and I cannot login. Maybe it is the baud rate that slightly changes after boot time? Maybe my Raspberry? Maybe another parameter?

I'll continue to investigate..


Title: Re: Speaking to Spondoolies Hardware with the serial port
Post by: Guy Corem on March 31, 2015, 10:20:54 AM
http://www.spondoolies-tech.com/products/serial-cable-1