[TangerineSDR] TangerineSDR Digest, Vol 52, Issue 7

David Witten wittend at wwrinc.com
Sat Jul 8 17:25:21 EDT 2023


To the List,

For anyone else working with the TAPR-supplied magnetometer boards, this is
*not* the recommended way of making things work.

As the original developer of the hardware design and the author of the
runMag code, there are standard ways to make this work that do not involve
editing the source code.
I cannot maintain non-standard changes.
If something really needs changing, please let me know and I will address
it.

For unknown reasons, Scottie chose to use non-default values for the sensor
addresses on the I2C bus.
At one point he indicated that he was going to change this in the final
product, but that did not happen.

However, the software was written to allow the use of any of these
addresses using command line arguments.

A good starting point for testing is to use:

./runMag *-M 0x23* *-R 0x1F **-r* -b 1 -j -A 60 -c 400 -Z


On the other question:

I see the MEMORY chip is on a different i2c bus and don’t think I have this
> one function yet.  I figured the idea was to put calibration info in that
> chip.
> I plane to look a little more into that issue and get it working before I
> put the remote sensor in the ground.
>

I can't tell you much.
I do not know whether Scottie loaded any information into these chips or
not.
I offered to work with Scottie on the HAT I2C flashing and though he
agreed, he never communicated with me about it.
I do not believe that it matters at this point.
It is not used by runMag and I am not aware that it is used elsewhere in
the project.
This is a rarely implemented feature of Pi HATs.
It is not difficult to implement if needed.

If you continue to have difficulties with this or other aspects of the
magnetometer setup, please contact me.
I am committed to making sure that the magnetometers work well for everyone.

Dave Witten, KD0EAG
wittend at wwrinc.com


On Sat, 8 Jul 2023 at 13:38, <tangerinesdr-request at lists.tapr.org> wrote:

> Send TangerineSDR mailing list submissions to
>         tangerinesdr at lists.tapr.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org
> or, via email, send a message with subject or body 'help' to
>         tangerinesdr-request at lists.tapr.org
>
> You can reach the person managing the list at
>         tangerinesdr-owner at lists.tapr.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of TangerineSDR digest..."
> Today's Topics:
>
>    1. Re: Magnetometer bring up issues (Jonathan)
>
>
>
> ---------- Forwarded message ----------
> From: Jonathan <emuman100 at gmail.com>
> To: TAPR TangerineSDR Modular Software Defined Radio <
> tangerinesdr at lists.tapr.org>
> Cc:
> Bcc:
> Date: Sat, 8 Jul 2023 13:05:39 -0400
> Subject: Re: [TangerineSDR] Magnetometer bring up issues
> Hi Bob,
>
> I'm glad to see you got this working. I didn't get a chance to email last
> night, but the new batch of magnetometer boards do not have the local
> temperature sensor populated.
>
> When Nathaniel and I installed the magnetometer at his QTH, we also ran
> into the same issue that the documented I2C addresses were not correct for
> the board version we had, so we had to poll the bus and guess which values
> were which.
>
> The magnetometer can be used on any Pi because the runMag utility simply
> polls the i2c addresses for data.
>
> Jonathan
> KC3EEY
>
> On Sat, Jul 8, 2023 at 12:33 AM Bob Stricklin via TangerineSDR <
> tangerinesdr at lists.tapr.org> wrote:
>
>> I managed to get this working by forcing the proper address in the header
>> files as shown below.  My guess is the developers had HAT pcbs and remote
>> pcbs that had all the parts populated. The TAPR boards only have parts on
>> the remote boards. The code is not dealing with this properly or I did not
>> set some flag I was supposed to set.
>>
>> This is what makes it function:
>>
>> *device_defs.h*
>>
>> //-------------------------------------------
>> // Address of the device changed N5BRG  7/7/2023
>> //-------------------------------------------
>> // #define RM3100_I2C_ADDRESS              0x20
>> // #define RM3100_I2C_ADDRESS_7bit         0x20
>> // #define RM3100_I2C_ADDRESS_8bit         0x20 << 1 // MBED uses 8 bit
>> address
>> #define RM3100_I2C_ADDRESS              0x23
>> #define RM3100_I2C_ADDRESS_7bit         0x23
>> #define RM3100_I2C_ADDRESS_8bit         0x23 << 1 // MBED uses 8 bit
>> address
>>
>> *MCP9808.h*
>>
>> // MCP9808 Bus Address.
>> //-----------------------------------
>> //#define MCP9808_LCL_I2CADDR_DEFAULT         0x18       // alt:
>> (selected by chip hardware 0x18 - 0x1F
>> //#define MCP9808_RMT_I2CADDR_DEFAULT         0x19       // alt:
>> (selected by chip hardware 0x18 - 0x1F
>> // Changed N5BRG  7/7/2023
>> #define MCP9808_LCL_I2CADDR_DEFAULT         0x1F       // alt: (selected
>> by chip hardware 0x18 - 0x1F
>> #define MCP9808_RMT_I2CADDR_DEFAULT         0x1F       // alt: (selected
>> by chip hardware 0x18 - 0x1F
>>
>>
>> I see the MEMORY chip is on a different i2c bus and don’t think I have
>> this one function yet.  I figured the idea was to put calibration info in
>> that chip.
>> I plane to look a little more into that issue and get it working before I
>> put the remote sensor in the ground.
>>
>>
>> Bob N5BRG
>>
>>
>> On Jul 7, 2023, at 4:29 PM, Bob Stricklin via TangerineSDR <
>> tangerinesdr at lists.tapr.org> wrote:
>>
>> I am trying to get the TAPR supplied magnetometer working and having some
>> problems.
>>
>> After cloning Dave's GitHub and running make I see this output:
>>
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ls
>> CHANGES.txt  cmdmgr.h  device_defs.h  i2c.c  i2c.o    *logs*    main.h
>>   MCP9808.h      README.md  runMag.c  runMag.o       *runrun.sh*
>> cmdmgr.c     cmdmgr.o  *docs*           i2c.h  LICENSE  main.c
>> Makefile  metadata.json  *runMag*     runMag.h  *run-nopipe.sh*
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* cat runrun.sh
>> ./runMag -b 1 -j -M 23 -A 10 -c 400 -U 140 -Z >
>> /home/web/wsroot/pipein.fifo
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* mkdir test/
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -b 1 -j -M 23 -A 10 -c
>> 400 -U 140 -Z > ./test/pipein.fifo
>> ./runMag: invalid option -- 'U'
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -b 1 -j -M 23 -A 10 -c
>> 400 -Z > ./test/pipein.fifo
>> Error : I/O error reading temp sensor at address: [0x19].
>> Error : I/O error reading temp sensor at address: [0x18].
>> Error : I/O error reading temp sensor at address: [0x19].
>> Error : I/O error reading temp sensor at address: [0x18].
>>
>>
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -M 23 -m
>> "time", "rtemp", "ltemp", "x", "y", "z", "rx", "ry", "rz", "total"
>> "07 Jul 2023 21:04:38", 15.1029, -19.0455, 45.8655, 134, -169, 407
>> "07 Jul 2023 21:04:38", 15.0998, -19.0481, 45.8631, 134, -169, 407
>> "07 Jul 2023 21:04:39", 15.0984, -19.0519, 45.8628, 134, -169, 407
>> "07 Jul 2023 21:04:40", 15.0972, -19.0479, 45.8633, 134, -169, 407
>> "07 Jul 2023 21:04:41", 15.0957, -19.0515, 45.8711, 134, -169, 407
>> ^C
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -L 1f -l
>> i2c_writebuf(): write(): Remote I/O error
>> i2c_read read value.: Remote I/O error
>>
>> RM3100 REVID NOT CORRECT: RM3100 REVID: 0x0 <> EXPECTED: 0x22.
>>
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -L 0x1f -l
>> i2c_writebuf(): write(): Remote I/O error
>> i2c_read read value.: Remote I/O error
>>
>> RM3100 REVID NOT CORRECT: RM3100 REVID: 0x0 <> EXPECTED: 0x22.
>>
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -L 0x1F -l
>> i2c_writebuf(): write(): Remote I/O error
>> i2c_read read value.: Remote I/O error
>>
>> RM3100 REVID NOT CORRECT: RM3100 REVID: 0x0 <> EXPECTED: 0x22.
>>
>>
>> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* sudo ./runMag -L 0x1f -l
>> i2c_writebuf(): write(): Remote I/O error
>> i2c_read read value.: Remote I/O error
>>
>> RM3100 REVID NOT CORRECT: RM3100 REVID: 0x0 <> EXPECTED: 0x22.
>>
>>
>>
>> Raspberry Pi 3B:  (Also tried a few other Raspberry Pi units.)
>>
>> used sudo raspi-config to activate I2C
>>
>> Then I edited /boot/config.txt to add:
>>
>>
>> dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=28,i2c_gpio_scl=27
>>
>>
>>
>> *pi at Fox-in-box-v3*:*~ $* i2cdetect -l
>> i2c-3 i2c       3.i2c                           I2C adapter
>> i2c-1 i2c       bcm2835 (i2c at 7e804000)          I2C adapter
>> *pi at Fox-in-box-v3*:*~ $* i2cdetect -y 1
>>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
>> 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
>> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1f
>> 20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --
>> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 70: -- -- -- -- -- -- -- --
>> *pi at Fox-in-box-v3*:*~ $* i2cdetect -y 3
>>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
>> 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
>> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> 70: -- -- -- -- -- -- -- --
>> *pi at Fox-in-box-v3*:*~ $* i2cdetect -y 2
>> Error: Could not open file `/dev/i2c-2' or `/dev/i2c/2': No such file or
>> directory
>> *pi at Fox-in-box-v3*:*~ $* i2cdetect -y 4
>> Error: Could not open file `/dev/i2c-4' or `/dev/i2c/4': No such file or
>> directory
>> *pi at Fox-in-box-v3*:*~ $*
>>
>>
>>
>> Results:
>>
>> Looks like the magnetic sensors may be responding but the temp sensor is
>> not responding to reads. The temp sensor does show up as a valid i2c
>> address though.
>>
>> I noticed the memory chip on local and on remote is not responding with
>> address A0 and this device in on the same i2c bus it seems. According to
>> the data sheet
>> without the jumper installed on WP it should be working in read mode. I
>> put the jumper on and still do not see the device with i2cdetect -y 1. If
>> this is not being used for
>> anything else I would prefer to put the jumper on WP and allow it to be
>> used in the ground after being buried. With WP pulled high the chip is
>> still pulling 1 - 2 ma anyway.
>>
>> I would appreciate any comments on what else should be done to get this
>> working so I can put the unit in the ground and get providing data.
>>
>>
>> Bob N5BRG
>>
>>
>> --
>> TangerineSDR mailing list
>> TangerineSDR at lists.tapr.org
>> http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org
>>
>>
>> --
>> TangerineSDR mailing list
>> TangerineSDR at lists.tapr.org
>> http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org
>>
> TangerineSDR mailing list
> TangerineSDR at lists.tapr.org
> http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/tangerinesdr_lists.tapr.org/attachments/20230708/5ce5804d/attachment-0001.html>


More information about the TangerineSDR mailing list