tarpn i2c-assign 3 assigns I2C address 3 to an async TNC-PI
tarpn i2c-assign will not affect TNC-PIs already running with i2c-addresses.
tarpn i2c-assign with more than one unconfigured TNC-PI will have unpredictable results -- don't do this.
tarpn i2c-assign with no unconfigured TNC-PI will not hurt anything, but will give you confusing error messages.
This command is not normally operable on a Raspberry PI 3 due to incompatibilities caused by the new BlueTooth feature.
There is a work-around but that is out-of-scope for this article.
Now you are ready to assign an address to the TNC-PI.
Use the command tarpn i2c to read the I2C bus.
Since there is only one TNC on the bus and it set for async operation, no i2C addresses should show up.
Use the command tarpn i2c-assign to give the TNC-PI an i2c address.
The legal range for an I2C address is 3 through 119.
I suggest starting with address 3 for your first TNC and then move up to 4 for the next TNC etcetera.
So, use the command as so:
tarpn i2c-assign 3
This will result in output that looks like this:
pi@nathan ~ $ tarpn i2c-assign 3 #### =TARPN v117 = Assigning I2C address 3 decimal to the ASYNC TNC-PI. Unfortunately there isn't much error checking on this. If you see retrying messages, then this isn't working. Perhaps in that case your TNC is not in ASYNC mode? Do control-C now if this assigning an I2c Address is not your intent. 3 2 1 3 0 dc c a 0 0 0 8 1d c7 c0 sum 0 01 TXDelay - Zero means use ADC 00 02 Persistance 220 03 Slottime (in 10 mS) 10 04 TXTail 0 05 Full Duplex - Not used 0 06 Our Channel (Hex) 00 07 I2C Address (0 = async) Hex 03 ADC Value 29 done now sending a RESET command to the TNC. This may result in the command getting stuck in a RETRY sequence. That's ok. Just do control-C followed by sending a tarpn i2c command to see what is on the i2c bus. Your TNC-PI should have been re-assigned. retrying... retrying... retrying... retrying... retrying... ^C pi@nathan ~ $ tarpn i2c #### =TARPN v117 = Scanning for attached TNC-PIs note: Addresses found are shown in HEXADECIMAL. 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 03 -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- |
See Configure TNC-PI