Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect sx1303 #56

Open
shawaj opened this issue Oct 7, 2021 · 11 comments
Open

detect sx1303 #56

shawaj opened this issue Oct 7, 2021 · 11 comments

Comments

@shawaj
Copy link
Member

shawaj commented Oct 7, 2021

we can detect the chip being sx1303 or sx1302, can be useful for some things in the future i guess

sx1302...

root@64709de465a7:/opt/iotloragateway/packet_forwarder# /opt/iotloragateway/packet_forwarder/sx1302/util_chip_id/chip_id -d /dev/spidev0.0
CoreCell reset through GPIO17...
Opening SPI communication interface
Note: chip version is 0x10 (v1.0)
INFO: using legacy timestamp
ARB: dual demodulation disabled for all SF

INFO: concentrator EUI: 0x0016c001ff1a08f0

Closing SPI communication interface
CoreCell reset through GPIO17...
@shawaj
Copy link
Member Author

shawaj commented Oct 8, 2021

sx1303...

root@5e8978d10ca5:/opt/iotloragateway/packet_forwarder# sx1302/util_chip_id/chip_id -d /dev/spidev1.2
CoreCell reset through GPIO22...
Opening SPI communication interface
Note: chip version is 0x12 (v1.2)
INFO: using legacy timestamp
ARB: dual demodulation disabled for all SF

INFO: concentrator EUI: 0x0016c001ff1e8374

Closing SPI communication interface
CoreCell reset through GPIO22...

@shawaj
Copy link
Member Author

shawaj commented Oct 8, 2021

Also it can be done like this... (EDIT: this was the way recommended by Semtech applications engineer so decided to use this)

The function sx1302_get_model_id() in the HAL does this

typedef enum {

CHIP_MODEL_ID_SX1302 = 0x02, /* SX1302 can be 0x00 or 0x02 */

CHIP_MODEL_ID_SX1303 = 0x03,

CHIP_MODEL_ID_UNKNOWN

} sx1302_model_id_t;

@shawaj
Copy link
Member Author

shawaj commented Oct 8, 2021

PR upstream Lora-net/sx1302_hal#60
In our repo ... #57

Gives following output:

sx1302 INFO: concentrator chip model ID: 0x00
sx1303 INFO: concentrator chip model ID: 0x03

@shawaj
Copy link
Member Author

shawaj commented Oct 8, 2021

Added the chip Id detection in #57 but still need to add the python code before this can be closed - see #57 (review) for more info there.

@shawaj
Copy link
Member Author

shawaj commented Oct 8, 2021

FYI @marvinmarnold the RockPi versions will probably use sx1303 predominantly just in case it changes anything for #45

@serbyxp
Copy link

serbyxp commented Dec 21, 2021

In still having an issue with SX1302 its .USB version but connected to the indoor mainboard that came with the maxiiot sx1301,

the reset_lgw.sh

I

if [ -z "$2" ]; then
echo "CONCENTRATOR_RESET_PIN parameter not passed in, using value from the environment (val=${CONCENTRATOR_RESET_PIN})"
else
CONCENTRATOR_RESET_PIN=$2
fi

I need to change the PIN=$2 to PIN=25... and possibly switch the GPIO from pull up / to pull down

I added a line into apps.json :

"RESET_LGW_FILEPATH": "CONCENTRATOR_RESET_PIN=25"

ref

Name of envvar that reset_lgw.sh expects to contain the reset_pin value

RESET_LGW_RESET_PIN_ENV_KEY:= "CONCENTRATOR_RESET_PIN"

I dont know if its syntax, or gpio pull up / down, due to it having the USB stm32 IC it is connected the same way it came in the mPCIe card slot.
not sure if im doing the config variable properly

im not sure if i need to do ...

"RESET_LGW_RESET_PIN_ENV": "CONCENTRATOR_RESET_PIN=25"

Ive emailed support but no response I dont want to reflash this, seeing as It was working and has whatever data for my miner in it...

@serbyxp
Copy link

serbyxp commented Dec 21, 2021

maybe an option in console? or a "VARIANT:" for the type of card one would have similar to the current VARIANT env that you have for the miner type?

@shawaj
Copy link
Member Author

shawaj commented Dec 22, 2021

@serbyxp our hardware does not support USB concentrators only SPI

@serbyxp
Copy link

serbyxp commented Dec 22, 2021 via email

@shawaj
Copy link
Member Author

shawaj commented Dec 22, 2021

We don't support using different concentrators with our hardware I'm afraid and this is completely off topic for this thread as well.

If your concentrator has a different pinout to ours, regardless of the USB situation, you would also need to make a number of modifications including to hm-pyhelper and a variety of other repos. This is not something we support though as I said and you'd need to work it out on your own.

@NebraLtd NebraLtd locked and limited conversation to collaborators Dec 22, 2021
@shawaj
Copy link
Member Author

shawaj commented Aug 19, 2023

See also Lora-net/sx1302_hal#60 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants