-
Notifications
You must be signed in to change notification settings - Fork 23
SW-19. BLE TX feature #17
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
base: develop
Are you sure you want to change the base?
Conversation
[ll] Adding temperature sensor Python code (plotting, taking readings)
5bd9869
to
6ef0d71
Compare
@tryuan99 here are two questions:
|
|
@tryuan99 great! what's the app on the phone I should install for the test? |
I use https://github.com/tryuan99/android-ble-scum, which is an Android app I wrote that specifically filters for SCuM's BLE packets and displays all of its contents. For general BLE packets, I use nRF Connect to sniff the BLE packets. |
@tryuan99 could you generate an apk file and attach/release it in your repo? So the other can just download it. |
@tryuan99 I have reviewed your PR. Usually you are not suppose to touch the bsp/driver code, such as the optical/radio, unless your are sure the changes won't break the other projects. For the PR, the changes in optical will break all the existing projects. To fulfill what this PR is trying to do I would propose a way to do so. Re-write the BLE tx app based on the frequency tx.
Try to send packet as short as you can, including the device name, frequency setting and any required field. So you can sweep the frequency setting range quickly to see packet show up in BLE app. I think this will make the app simple and every time you run the code, you will always see packet in BLE app, even the frequency settings may various, but still in the range. Does this sounds good for you? |
@changtengfei My changes in I see that there is a change in |
I still need to test that this merge did not break my BLE code. |
LC_FREQCHANGE(optical_vars.cal_LC_coarse, optical_vars.cal_LC_mid, optical_vars.cal_LC_fine); | ||
} | ||
|
||
bool optical_getCalibrationFinished(void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see there is a typo of this function that you fixed, I guess all other projects are using the wrong old name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed this in c5d0f48.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
@tryuan99 there should be a conflict to the develop branch, as indicated in the jenkins builder but somehow the Github is not complaining. |
set_PA_supply(63); | ||
set_LO_supply(127,0); | ||
set_PA_supply(127); | ||
set_LO_supply(63,0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you confirm this will not effect the project using IEEE802.15.4 radio? such freq_sweep_tx/rx/lc_count?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified that freq_sweep_rx
works, but I couldn't get freq_sweep_tx
working, even if I check out the current version from the develop
branch. After two fine code iterations, SCuM starts printing to UART.
|
||
} | ||
|
||
void radio_init_divider(unsigned int div_value){ | ||
|
||
// Set divider LDO value to max | ||
set_DIV_supply(63,0); | ||
set_DIV_supply(127,0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here?
Hi @tryuan99 as the builder test still failed. I reviewed your code again, there are only few comments left which I am not sure it is reason that test failed. Other than the few comments, the code looks fine for me. Could you take a look? |
@tryuan99 I found the optical interrupts stopped at 24 times (expected 25), which is because of the large size of image takes long for CRC check. I have reported this in the mailinglist and the fix is in my quickCal PR: https://github.com/PisterLab/scum-test-code/pull/15/files, maybe we could try this PR again after merge mine? |
# Conflicts: # scm_v3c/scm3c_hw_interface.c
This code contains the
ble.h
header file, which allows SCuM to transmit BLE. It also contains code for the LC calibration using the optical programmer.The application file
ble_tx_154_rx
allows SCuM to receive 15.4 packets from OpenMote and broadcast the data as BLE packets.The code was refactored into the current structure and works with the
ble_tx.c
andble_tx_154_rx.c
application.ble_init_tx()
afterinitialize_mote()
.ble_gen_test_packet()
before callingble_transmit()
. Make sure to set the frequency withLC_FREQCHANGE
before transmitting.[field]_tx_en(true)
to include them in the packet. Finally callble_gen_packet()
to generate the BLE packet and then callble_transmit()
to transmit the packet.