BBB tnc-black i2c question


Basil Gunn
 

I purchased a tnc-black for my BBB and have it working with a serial
port interface. I've been unsuccessful in using the RPi programs to get
the i2c interface to work on the BBB. I don't think there BBB versions
of John G8BPQ's programs.


Using pitnc_getparams:
i2c address 3 failed
i2c address 10 appears OK


I believe i2ckiss is not creating any slave
devices /dev/pts/2 /dev/pts/3 etc


After a reboot I have to do a symlink /dev/ttyO2 to /dev/ttyAMA0 in
order to get the i2c -> 'pitnc_getparams 0 a' to work.


Any help is appreciated.
Also any one know if the source code to
pitnc_get/setparams & i2ckiss is available?


Details:
--------
Have enabled UART 2 on the tnc-black


# pitnc_getparams -v
0.0.0.1
# pitnc_setparams -v
0.0.0.2
# i2ckiss -v
i2ckiss Version 0.1.0
i2ckiss: 0.1.0
# uname -a
Linux beaglebone 3.8.13-bone60 #1 SMP Mon Jul 7 20:34:48 UTC 2014
armv7l GNU/Linux


Both of the following commands respond OK.
i2cdetect -F 0
i2cdetect -F 1
Functionalities implemented by /dev/i2c-0:
I2C yes
SMBus Quick Command no
SMBus Send Byte yes
SMBus Receive Byte yes
SMBus Write Byte yes
SMBus Read Byte yes
SMBus Write Word yes
SMBus Read Word yes
SMBus Process Call yes
SMBus Block Write yes
SMBus Block Read no
SMBus Block Process Call no
SMBus PEC yes
I2C Block Write yes
I2C Block Read yes


# cd /dev
# ls ttyA* ttyO* i2*
i2c-0 i2c-1 ttyAMA0 ttyO0 ttyO1 ttyO2


- symlink /dev/ttyO2 to /dev/ttyAMA0 (ln -s /dev/ttyO2 /dev/ttyAMA0)
- change the parameter for address 07 from 00 to 03


- dump the parameters using the serial port: pitnc_getparams 0 0
# pitnc_getparams 0 0


01 TXDelay - Zero means use ADC 30
02 Persistance 32
03 Slottime (in 10 mS) 2
04 TXTail 0
05 Full Duplex - Not used 0
06 Our Channel (Hex) 00
07 I2C Address (0 = async) Hex 03
ADC Value 29
8 1 1e 20 2 0 0 0 3 1d 2b c0 sum 0


- Fail to dump the parameters using i2c interface:
# pitnc_getparams 1 3
poll failed: Remote I/O error


- change the parameter for address 07 from 03 to 10
- dump the parameters using the serial port: pitnc_getparams 0 0
# pitnc_getparams 0 0


01 TXDelay - Zero means use ADC 30
02 Persistance 32
03 Slottime (in 10 mS) 2
04 TXTail 0
05 Full Duplex - Not used 0
06 Our Channel (Hex) 00
07 I2C Address (0 = async) Hex 0a
ADC Value 29
8 1 1e 20 2 0 0 0 a 1d 22 c0 sum 0


- Successfully dump the parameters using i2c interface:
# pitnc_getparams 1 a


01 TXDelay - Zero means use ADC 30
02 Persistance 32
03 Slottime (in 10 mS) 2
04 TXTail 0
05 Full Duplex - Not used 0
06 Our Channel (Hex) 00
07 I2C Address (0 = async) Hex 0a
ADC Value 29
8 1 1e 20 2 0 0 0 a 1d 22 c0 sum 0




=== i2ckiss failure ===


# i2ckiss 0 a 1 44.128.1.1
i2ckiss Version 0.1.0
slave device is: /dev/pts/2
Resetting TNC...
AX.25 port 1 bound to device ax0
# i2ckiss: poll failed in packet loop: Remote I/O error


# i2ckiss 0 10 1 44.128.1.1
i2ckiss Version 0.1.0
slave device is: /dev/pts/3
Resetting TNC...
AX.25 port 1 bound to device ax0
# i2ckiss: poll failed in packet loop: Remote I/O error


# i2ckiss 1 10 1 44.128.1.1
i2ckiss Version 0.1.0
slave device is: /dev/pts/4
Resetting TNC...
AX.25 port 1 bound to device ax0
i2ckiss: poll failed in packet loop: Remote I/O error


#i2ckiss 1 a 1 44.128.1.1
i2ckiss Version 0.1.0
slave device is: /dev/pts/5
Resetting TNC...
AX.25 port 1 bound to device ax0
# i2ckiss: poll failed in packet loop: Remote I/O error


# ls -salt /dev/pts*
total 0
0 crw------- 1 root tty 136, 1 Sep 24 2014 1
0 crw--w---- 1 gunn tty 136, 0 Sep 24 16:38 0
0 drwxr-xr-x 14 root root 3700 Sep 24 15:36 ..
0 drwxr-xr-x 2 root root 0 Jan 1 1970 .


/Basil Gunn n7nix

Join RaspberryPi-4-HamRadio@groups.io to automatically receive all group messages.