0

Need a Simblee replacement
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Need a Simblee replacement

by oldpapa2003 on Wed Feb 13, 2019 2:02 pm

Since AMS has killed the Simblee, I need a replacement as to not to go and rewrite code for a product that we have developed.
So any suggestions for a replacement that I can use that has similar coding.
One important fact is I use I/O's for inputs and outputs and I pair by pressing a button on the receive end and pressing a function button on the sender. It then pairs.
Also I might have 2 different senders but always 1 receiver.,

The Simblee was pretty straight forward.
I have a few Lairds, but they use smartBasic and even tho I know basic, just trying out how to pair like the Simblee has be lost..
Maybe too much info.

Wayne

oldpapa2003
 
Posts: 15
Joined: Fri Jun 12, 2015 9:56 am

Re: Need a Simblee replacement

by adafruit_support_mike on Fri Feb 15, 2019 6:57 am

There are any number of boards that use BLE, so I'd imagine the hardest part to replace will be the code that generates the BLE messages that communicate with the cellphone app.

If you can find documentation for those, or if the code in the Simblee board support package for the Arduino IDE contains the low-level BLE code for profiles, services, and characteristics, you'll have a shot at porting the protocol to a new hardware platform. You might also want to check around for Simblee-compatible code online.. someone else may have already done the reverse engineering for you.

If you can't find anything, you'll have to look at porting your existing code to a new platform. The job will be slightly less painful if you create a hardware abstraction layer for any code that uses BLE: instead of calling Simblee functions directly, create wrapper functions with your own names, and start by having each such function simply call the Simblee function.

Once the code works that way, you can work on re-implementing the Simblee functions so your wrapper functions do the same thing, but don't use any Simblee-specific code. At that point, porting the code to a new platform will mostly involve writing the low-level code for your hardware abstraction layer on the new device.

adafruit_support_mike
 
Posts: 55956
Joined: Thu Feb 11, 2010 2:51 pm

Re: Need a Simblee replacement

by oldpapa2003 on Fri Feb 15, 2019 4:23 pm

I was hoping for something like the simblee. I have 3 feathers here, I have to using the rssi script, will look it over.
Where can I find list of command and their meaning..

oldpapa2003
 
Posts: 15
Joined: Fri Jun 12, 2015 9:56 am

Re: Need a Simblee replacement

by adafruit_support_mike on Sat Feb 16, 2019 2:44 am

The nRF51822 library is here:

https://github.com/adafruit/Adafruit_BluefruitLE_nRF51

Our firmware uses Hayes AT-style commands, and documentation is included in the tutorials for our BLE devices:

https://learn.adafruit.com/introducing- ... and-mode-1

adafruit_support_mike
 
Posts: 55956
Joined: Thu Feb 11, 2010 2:51 pm

Re: Need a Simblee replacement

by oldpapa2003 on Mon Feb 18, 2019 10:52 am

Actually, after the post, I started to see some light using 2 of the nRF52832's Bluefruit Feathers that I have. Using bleuart and central_bleuart showed me what I needed to see and understand.

This is a start.. I need to store that mac's and ignore everyone else. But I have to learn to send to central and use I/O pins instead of characters.
Also to be able to go to low power when no button press, so pins need to do a Wake Up.

oldpapa2003
 
Posts: 15
Joined: Fri Jun 12, 2015 9:56 am

Re: Need a Simblee replacement

by adafruit_support_mike on Tue Feb 19, 2019 1:35 am

BLE peripherals don't actually send anything to a central. They're passive.

The central controls all connections and data transfers. It's the central's job to say, "give me this information", and then the peripheral makes the appropriate reply.

adafruit_support_mike
 
Posts: 55956
Joined: Thu Feb 11, 2010 2:51 pm

Re: Need a Simblee replacement

by oldpapa2003 on Tue Feb 19, 2019 11:29 am

Hmm, I'm using the examples of central bleuart and bleuart and I have the bleuart sending an 'N' when I ground a pin on the device and having the central lighting the red led right now.
I know the 2 units can talk back and forth, but I'm only interested in 1 direction. I have also added the routine in the central to drop the lit led if I disconnect power.

I'm planning in adding 1 more feather as a sender (I can have 2) and see if I can prioritize one over the other.

I need to make sure nothing else can connect..
I can be so confused on what to use.. Like I said, I need something to replace the Simblee and the Feather nRF52832 so far is working.. But maybe wrong.
I will need to get these in quantities.. since the product has been introduce and we have just under 300 Simblees left.
If you look at this product, I use 1 unit for receiver and up to 2 as senders. These are for wireless foot switches for medical X-ray systems.
A Handset and Foot Switch to 1 receiver.
But probably the important thing is I'm learning how these units are used in the Arduino IDE. Simblee had pinWakes and all when I placed the Handset or Foot Switch to sleep trying to achieve low battery when not in use. And the reconnect was fast.
Back to quantity, we will need a min of 300 (100 systems) and no one knows the amount for the future.
We have burned through 200 Simblees since late last year.
I know of other engineers that can use these too. And they are hurting more than me.
I will need to learn how-to program blank the units too.

Wayne

oldpapa2003
 
Posts: 15
Joined: Fri Jun 12, 2015 9:56 am

Re: Need a Simblee replacement

by adafruit_support_mike on Thu Feb 21, 2019 1:36 am

oldpapa2003 wrote:Hmm, I'm using the examples of central bleuart and bleuart and I have the bleuart sending an 'N' when I ground a pin on the device and having the central lighting the red led right now.

The BLE Serial code has print() and read() functions, but at the radio level the central is constantly writing bytes to one of the peripheral's characteristics (equivalent to an RX pin) and reading bytes from another characteristic (equivalent to a TX pin).

If you already have a BLE Serial connection established, you can more or less ignore the low-level details. The details are more important if you're programming down at the raw BLE level though.

oldpapa2003 wrote:I need to make sure nothing else can connect..

The most effective way to handle that is with an exchange of credentials written into your own firmware.

If you're using a BLE Serial connection you can program each peripheral with a UUID, or build in an I2C chip with a hardware UUID. They're cheap and easy to use. When the central connects to a new peripheral, have it ask the peripheral for its UUID and store that in its own nonvolatile memory. From then on, start every pairing process with the central asking each peripheral for its UUID. If a peripheral doesn't have one of the two UUIDs stored in the central's memory, the central will drop the connection.

oldpapa2003 wrote:I can be so confused on what to use.. Like I said, I need something to replace the Simblee and the Feather nRF52832 so far is working.. But maybe wrong.

If you're looking for peer-to-peer communication between microcontrollers, packet radio is a lighter-weight protocol than BLE. All forms of Bluetooth are more or less designed to be wireless replacements for a USB cable between a tethered device and a computer. Using Bluetooth does make sense if you want a device to communicate with a phone or a computer though.

oldpapa2003 wrote:I will need to get these in quantities.. since the product has been introduce and we have just under 300 Simblees left.

We aren't an industrial supplier, and we don't take special orders. Our design files are Open Hardware though, so you can use them to have a board house build units on your schedule.

oldpapa2003 wrote:I will need to learn how-to program blank the units too.

That will depend on the final board you choose. If you end up provisioning and fabricating your own boards, the vendor who sells the radio modules will have an SDK and instructions on how to get code onto a raw chip.

adafruit_support_mike
 
Posts: 55956
Joined: Thu Feb 11, 2010 2:51 pm

Re: Need a Simblee replacement

by oldpapa2003 on Mon Feb 25, 2019 12:26 pm

Thanks for explaining all the info that I needed.
The UUID crossed my mind shortly after I made the post.
I did print t he commands list and saw the UUIDs listed. I can use the generated UUID to really lock in our devices.
For blanks, I guess I better get a few and learn how-to program them with the code.
You have been a great help... If I have more questions, may I ask for help..
Thanks You.

oldpapa2003
 
Posts: 15
Joined: Fri Jun 12, 2015 9:56 am

Re: Need a Simblee replacement

by adafruit_support_mike on Tue Feb 26, 2019 2:54 am

oldpapa2003 wrote:I did print t he commands list and saw the UUIDs listed. I can use the generated UUID to really lock in our devices.

If you're referring to the 'peer ID', you won't want to use that for long-term associations between devices. It's just a random bit-string, and it will change over time.

The idea of having always-on devices constantly transmitting permanent, traceable ID numbers to anything listening is a concept only stalkers and police states can truly love. For a true, permanent UUID, you want something that will only be transmitted after an encrypted connection has been established.

There's a category of 'silicon serial number' chips guaranteed to have true UUIDs, like the DS2041:

https://www.digikey.com/product-detail/ ... -ND/956992

They can be a bit pricey though, while small I2C EEPROMs are dirt cheap:

https://www.digikey.com/product-detail/ ... -ND/857656

There are online UUID generators:

https://www.uuidgenerator.net/

and you can make an EEPROM programmer from a small microcontroller in a few minutes.

adafruit_support_mike
 
Posts: 55956
Joined: Thu Feb 11, 2010 2:51 pm

Re: Need a Simblee replacement

by oldpapa2003 on Thu Feb 28, 2019 1:19 pm

Well, I have gotten pretty far with the Adafruit Feather nRF52832. I have a few Adafruit nRF52840's due this morning to play with.

I also bought the J-Link EDU Mini (I know it is the educational, need to be educated and will get the commercial when I'm good to go) so I can learn to flash the bootloader on blank nRF52840's or the MDBT42Q's. I'm thinking the nRF52840's due to mo need for USB interface chip.

I did use the central Multi sketch and learned more about what I can do. I see I can get the MAC address. This I can write to memory on the nRF and read back if the MAC's are the same. I did this on the Simblee. I have also looked at current draw and the these seems to draw a bit more than the Simblee while in waitforevent, but less when I actually send from one device to another.

If you have a link to how I can load the bootloader, please link it. I'm trying to use the Arduino IDE on the example, but having an issue that the IDE can not locate the nrfjprog.. but I will keep at it..

oldpapa2003
 
Posts: 15
Joined: Fri Jun 12, 2015 9:56 am

Re: Need a Simblee replacement

by adafruit_support_mike on Sat Mar 02, 2019 12:48 am

We have links to some of the tools we use on the Software Resources page of the Feather nRF52 tutorial:

https://learn.adafruit.com/introducing- ... -resources

They're presented as-is though, and we don't know enough to provide detailed support for bare-metal nRF52 programming. We know what works for us, but that's about it. Your best resource for general programming will be Nordic:

https://www.nordicsemi.com/Support

adafruit_support_mike
 
Posts: 55956
Joined: Thu Feb 11, 2010 2:51 pm

Re: Need a Simblee replacement

by oldpapa2003 on Mon Mar 04, 2019 1:10 pm

With your help and working between the Adafruits 82832 and 82840 and a Taiyo Yuden kit (comes with J-Link) I have learned a lot.
I took the 82840 (Taiyo) and flash via the J-Link (with the boards I now have) and it took (Its a nRF 82840).
I needed to relearn how the pins where assign in arduino and just now determine the ports assignments match well. I was able to set a digital pin as input (PULLED_UP) and set an output pin and watch on my meter. It worked exactly as the Adafruit nRF82840.
What stumped me for a bit was the Adafruit port assignments between the nRF82832 and the nRF82840 are different. On the 82832 Digital (instead of Analog) is set to 2 for A0 and 3 for A1) while on the 82840 it is now (Digital) 14 and 15 (A0, A1 location on the PCA).

For the other Taiyo, I followed the port assign names between the 82840 to match so I could connect my jumpers for grounding to test and meter for output.

This allowed me to learn that the nRF82840 made by whom ever and workable with the bootloader using the IDE and the J-Link. Also means no USB interface for the 82840's (Like using CP2104's).

Now to convert the Simblee software to Adafruit and see if it works..

So I need to learn to grab the MAC and store it.. Then compare it as I did in the other program.

Thanks

Wayne

oldpapa2003
 
Posts: 15
Joined: Fri Jun 12, 2015 9:56 am

Re: Need a Simblee replacement

by adafruit_support_mike on Tue Mar 05, 2019 1:26 am

Glad to hear you're making progress.

The nRF52832 and nRF52840 do need to be handled differently since they're different parts. It's kind of like the ATmega328 and ATmega32u4.. they're in the same family, but there can be a lot of differences in terms of pin mappings and peripheral connections.

adafruit_support_mike
 
Posts: 55956
Joined: Thu Feb 11, 2010 2:51 pm

Re: Need a Simblee replacement

by oldpapa2003 on Tue Mar 05, 2019 10:57 am

Yup, found that out..
I'm now looking into grabbing the MAC and seeing if I can store in RAM. Need to grab 2 mac's and store them then compare.
Finding out how now.

Need to find out how to turn off the blue leds for connect on both central and peripheral as well.
Each is a step.. to the final product.. Doing well..

wayne

oldpapa2003
 
Posts: 15
Joined: Fri Jun 12, 2015 9:56 am

Please be positive and constructive with your questions and comments.