[TangerineSDR] TangerineSDR Digest, Vol 52, Issue 4

David Witten wittend at wwrinc.com
Sat Jul 8 12:02:13 EDT 2023


  Bob,

Sorry that you are having difficulty.

The final magnetometers were released quite a long time after the
instructions were written, and there were some differences to what was
discussed along the way.
The magnetometer module itself appears (as you notice) at address 0x23.
The remote temperature sensor appears at address 0x1F.
The chip for the LOCAL temperature sensor is not populated, so it does not
appear on the bus.

It is possible to change the defaults listed in the code and recompile, but
an easier way is just to use the command line.
For testing purposes, This command may be useful (assuming the original
code):

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

The above command tells the Pi to read the PNI Magnetometer module at
address 0x23, the remote temp sensor at 0x1F, and to ignore the local temp
sensor.

Something like this should work for actually running the sensor and
collecting data into log files for uploading:

 ~/rm3100-runMag/runMag  *-M 0x23* *-R 0x1F **-r* -b 1 -j -A 60 -c 400 -Z   -S
*<YOUR CALLSIGN>* -O ~/rm3100-runMag/logs


For production use, I also recommend that you replace the tilde characters
above (~) with the full path of the rm3100-runMag directory.  This may be
more reliable in some contexts.

If you (or anyone) continue to have problems, please contact me directly by
email and we can arrange a phone call, Zoom session, or whatever is
required.
I am committed to helping people get these running for people and I am very
happy to assist.
I will be unavailable for a couple of weeks in mid-August as I will be
traveling, though.

Dave Witten, KD0EAG


On Fri, 7 Jul 2023 at 23:33, <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 (Bob Stricklin)
>
>
>
> ---------- Forwarded message ----------
> From: Bob Stricklin <bstrick at n5brg.com>
> To: TAPR TangerineSDR Modular Software Defined Radio <
> tangerinesdr at lists.tapr.org>
> Cc:
> Bcc:
> Date: Sat, 8 Jul 2023 02:48:17 +0000
> Subject: Re: [TangerineSDR] Magnetometer bring up issues
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/tangerinesdr_lists.tapr.org/attachments/20230708/68819959/attachment-0001.html>


More information about the TangerineSDR mailing list