Page 1 of 1
Configure Revpi DIO without pictory??
Posted: 12 Oct 2020, 18:19
by amod1
I have a revolutionpi connect+ and I have built a custom image with yocto. I used the kernel from
https://github.com/RevolutionPi/linux and have also installed picontrol and pitest. Uptill now, everything is working fine.
When I enter the command
Code: Select all
> piTest -d
Found 1 devices:
Address: 0 module type: 105 (0x69) RevPi Connect V1.0
Module is present
input offset: 0 length: 6
output offset: 6 length: 5
Since I do not have pictory in the custom image, I installed the stretch image to get the config.rsc
With stretch image, I get
Code: Select all
> piTest -d
Found 2 devices:
Address: 0 module type: 105 (0x69) RevPi Connect V1.0
Module is present
input offset: 113 length: 6
output offset: 119 length: 5
Address: 31 module type: 96 (0x60) RevPi DIO V1.4
Module is present
input offset: 0 length: 70
output offset: 70 length: 18
Seems like the connection is correct, so I copied the same config.rsc to /etc/revpi/ in my custom image but when I run piTest -d, I get
Code: Select all
> piTest -d
Found 2 devices:
Address: 0 module type: 105 (0x69) RevPi Connect V1.0
Module is present
input offset: 113 length: 6
output offset: 119 length: 5
Address: 31 module type: 32864 (0x8060) RevPi DIO V0.0
Module is NOT present, data is NOT available!!!
input offset: 0 length: 70
output offset: 70 length: 18
The DIO module does not seem to be present. Is there any config that I need to setup to make this work?
Re: Configure Revpi DIO without pictory??
Posted: 13 Oct 2020, 15:35
by dirk
Hi amod1, thank you for your detailled desciption of the error.
Your idea to generate a "config.rsc" by using a "stretch" image and to copy it to your own image at "/etc/revpi/config.rsc" is perfect.
In case "piTest -d" shows 0x8... here 0x8060
Code: Select all
Address: 31 module type: 32864 (0x8060) RevPi DIO V0.0
Module is NOT present, data is NOT available!
input offset: 0 length: 70
output offset: 70 length: 18
this indicates that the module was not found or is not physically present.
1) Please check the PiBridge connector
2) After copying the "config.rsc" please perform a driver reset "piTest -x" or a reboot "sudo reboot"
3) Verify that after 2) the power LEDs of all modules are lighting green
In case the error still exists open two terminals.
On the 1st terminal type
On the 2nd terminal type
Please have a look at the output on terminal 1 and post it.
You can also post the "/var/log/kern.log" here for further troubleshooting.
Re: Configure Revpi DIO without pictory??
Posted: 13 Oct 2020, 16:08
by amod1
Hello Dirk,
Thank you for the response. I double-checked the PiBridge connector and seems like the connection is fine. I can tell this because with stretch image, I have no problem in recognizing DIO module or even playing with the i/p o/p.
Also, I did perform piTest -x and when that did not work, I rebooted but still DIO not recognized.
Maybe, because its a custom image, I do not have the kern.log inside /var/log/ . So, I created the kern.log file and ran piTest -x, but no o/p there.
I can show you the dmesg log after running piTest -x (this is after I copied the config.rsc generated from stretch image to /etc/revpi)
Code: Select all
>dmesg | grep piControl
[ 182.412414] piControl: Reset: BridgeState=2
[ 182.427715] piControl: stop data exchange
[ 182.431284] piControl: kernel_read returned 0: f4ec3000, 21494
[ 182.431812] piControl: write error -5
[ 182.441296] piControl: dev all: send ioprotocol send error -1
[ 182.441454] piControl: 2 devices found
[ 182.447094] piControl: piIoComm_gotoGateProtocol returned 0
[ 182.450842] piControl: 95 entries in total
[ 182.460930] piControl: cl-comp: 0 addr 70 bit ff len 8
[ 182.466548] piControl: cl-comp: 1 addr 71 bit ff len 8
[ 182.472199] piControl: cl-comp: 2 addr 119 bit ff len 8
[ 182.478801] piControl: RevPiDevice_init()
[ 182.482884] piControl: Enter Init State
[ 182.483044] piControl: PADS 0 = 0x1b slew=1 hyst=1 drive=3
[ 182.483052] piControl: PADS 1 = 0x18 slew=1 hyst=1 drive=0
[ 182.487292] piControl: Enter PresentSignalling1 State
[ 182.492629] piControl: PADS 2 = 0x1b slew=1 hyst=1 drive=3
[ 182.542271] piControl: Enter InitialSlaveDetectionLeft State
[ 182.554388] piControl: Enter ConfigLeftStart State
[ 182.570625] piControl: Enter ConfigDialogueLeft State
[ 182.575721] piControl: write error -5
[ 182.583636] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 1
[ 182.590584] piControl: write error -5
[ 182.599636] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 1
[ 182.606571] piControl: write error -5
[ 182.615641] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 1
[ 182.622573] piControl: write error -5
[ 182.631635] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 1
[ 182.638588] piControl: Enter EndOfConfig State
[ 182.645457] piControl: Device 0: Addr 0 Type 105 Act 1 In 6 Out 5
[ 182.652314] piControl: input offset 0 len 6
[ 182.658204] piControl: output offset 6 len 5
[ 182.664095] piControl: serial number 1 version 1.0
[ 182.670027] piControl:
[ 182.672562] piControl: Adjust: base 113 in 113 out 119 conf 0
[ 182.678416] piControl: After Adjustment
[ 182.682397] piControl: Device 0: Addr 0 Type 105 Act 1 In 6 Out 5
[ 182.689256] piControl: input offset 113 len 6
[ 182.695143] piControl: output offset 119 len 5
[ 182.701087] piControl: Device 1: Addr 31 Type 32864 Act 0 In 70 Out 18
[ 182.708122] piControl: input offset 0 len 70
[ 182.714022] piControl: output offset 70 len 18
[ 182.719941] piControl:
[ 182.826661] piControl: start data exchange
[ 182.830887] piControl: write error -5
[ 182.930647] piControl: piIoComm_sendRS485Tel(PiIoStartDataExchange) failed 1
[ 183.050657] piControl: initialization of module not finished (1,0,4) -> retry
[ 183.058489] piControl: Enter Initialization Retry
[ 185.542066] piControl: RevPiDevice_init()
[ 185.546670] piControl: Enter Init State
[ 185.551999] piControl: Enter PresentSignalling1 State
[ 185.596383] piControl: Enter InitialSlaveDetectionLeft State
[ 185.602627] piControl: Enter EndOfConfig State
[ 185.609557] piControl: Device 0: Addr 0 Type 105 Act 1 In 6 Out 5
[ 185.616387] piControl: input offset 0 len 6
[ 185.622293] piControl: output offset 6 len 5
[ 185.628182] piControl: serial number 1 version 1.0
[ 185.634079] piControl:
[ 185.636629] piControl: Adjust: base 113 in 113 out 119 conf 0
[ 185.642486] piControl: After Adjustment
[ 185.646427] piControl: Device 0: Addr 0 Type 105 Act 1 In 6 Out 5
[ 185.653347] piControl: input offset 113 len 6
[ 185.659249] piControl: output offset 119 len 5
[ 185.665149] piControl: Device 1: Addr 31 Type 32864 Act 0 In 70 Out 18
[ 185.672255] piControl: input offset 0 len 70
[ 185.678206] piControl: output offset 70 len 18
[ 185.684142] piControl:
[ 185.794710] piControl: start data exchange
[ 185.798905] piControl: write error -5
[ 185.898678] piControl: piIoComm_sendRS485Tel(PiIoStartDataExchange) failed 1
[ 186.018697] piControl: set BridgeState to running
Log before copying config.rsc to /etc/revpi/
Code: Select all
[ 3.735513] piControl: loading out-of-tree module taints kernel.
[ 3.759241] piControl: built: Tue Oct 13 13:41:47 UTC 2020
[ 3.764889] piControl: RevPi Connect
[ 3.768521] piControl: MAJOR-No. : 244
[ 3.772806] piControl: MAJOR-No. : 244 MINOR-No. : 0
[ 3.779949] piControl: error: cannot open file /etc/revpi/config.rsc
[ 3.801288] piControl: error: cannot open file /opt/KUNBUS/config.rsc
[ 3.808124] piControl: filp_open -127027968
[ 3.814243] piControl: set priority of spi0 to 54
[ 3.821395] piControl: piIO thread started
[ 3.821432] piControl: PADS 0 = 0x1b slew=1 hyst=1 drive=3
[ 3.821440] piControl: PADS 1 = 0x18 slew=1 hyst=1 drive=0
[ 3.826039] piControl: RevPiDevice_init()
[ 3.832549] piControl: PADS 2 = 0x1b slew=1 hyst=1 drive=3
[ 3.832576] piControl: piControlInit done
[ 3.838950] piControl: Enter Init State
[ 3.839630] piControl: Enter PresentSignalling1 State
[ 3.904077] piControl: Enter InitialSlaveDetectionLeft State
[ 3.911920] piControl: Enter ConfigLeftStart State
[ 3.928162] piControl: Enter ConfigDialogueLeft State
[ 3.963135] piControl: wrong cmd code in response
[ 3.973220] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 5
[ 3.997169] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 2
[ 4.021174] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 2
[ 4.045158] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 2
[ 4.052995] piControl: Enter EndOfConfig State
[ 4.059626] piControl: Device 0: Addr 0 Type 105 Act 1 In 6 Out 5
[ 4.067226] piControl: input offset 0 len 6
[ 4.073703] piControl: output offset 6 len 5
[ 4.080198] piControl: serial number 1 version 1.0
[ 4.086672] piControl:
[ 4.089419] piControl: After Adjustment
[ 4.093796] piControl: Device 0: Addr 0 Type 105 Act 1 In 6 Out 5
[ 4.101432] piControl: input offset 0 len 6
[ 4.107906] piControl: output offset 6 len 5
[ 4.114461] piControl:
[ 4.226143] piControl: start data exchange
[ 4.434165] piControl: initialization of module not finished (1,0,0) -> retry
[ 4.442686] piControl: Enter Initialization Retry
[ 6.903506] piControl: RevPiDevice_init()
[ 6.908527] piControl: Enter Init State
[ 6.913412] piControl: Enter PresentSignalling1 State
[ 6.959048] piControl: Enter InitialSlaveDetectionLeft State
[ 6.965953] piControl: Enter ConfigLeftStart State
[ 6.981776] piControl: Enter ConfigDialogueLeft State
[ 6.988375] piControl: wrong cmd code in response
[ 6.998138] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 5
[ 7.021142] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 2
[ 7.046139] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 2
[ 7.070158] piControl: piIoComm_sendRS485Tel(GetDeviceInfo) failed 2
[ 7.077772] piControl: Enter EndOfConfig State
[ 7.084360] piControl: Device 0: Addr 0 Type 105 Act 1 In 6 Out 5
[ 7.091921] piControl: input offset 0 len 6
[ 7.098404] piControl: output offset 6 len 5
[ 7.104909] piControl: serial number 1 version 1.0
[ 7.111390] piControl:
[ 7.114172] piControl: After Adjustment
[ 7.118487] piControl: Device 0: Addr 0 Type 105 Act 1 In 6 Out 5
[ 7.126038] piControl: input offset 0 len 6
[ 7.132540] piControl: output offset 6 len 5
[ 7.139013] piControl:
[ 7.251158] piControl: start data exchange
[ 7.475153] piControl: set BridgeState to running
Looks like I have to enable RS485 to get the device info as I do not see such errors with stretch image
Re: Configure Revpi DIO without pictory??
Posted: 16 Oct 2020, 12:41
by amod1
Hello Dirk,
I resolved the issue, I matched the /boot/config.txt contents as it was in stretch image and then copied the config.rsc to /etc/revpi. It is working now.
Re: Configure Revpi DIO without pictory??
Posted: 16 Oct 2020, 15:17
by dirk
Dear amod1, this is good news. Thank you for your positive reply and good success for the future with our products.