You may be able to use most of the code from "Skinned down Parallax WiFi Driver" in the OBEX... That was written for Parallax's ESP8266-based WiFi module, but should give you a template for building a program, running on a P1 that provides a webpage for interaction with the P1. You'll need to modify the code that initializes and speaks to the WiFi module, but the basis for providing HTML code for content is all there!
Click down through: libraries / community / p1 / All and look for the link to "Skinned down Parallax WiFi Driver" (hint: use your web browser's search feature, once you've clicked on 'All' as the driver link is way down the page...)
The HC06 is standard BT -- if memory serves, this may not be compatible with the iPhone. Looking through my Amazon orders I found that I had ordered this module for a few projects; it uses BLE (which does work with iPhone).
-- https://www.amazon.com/DSD-TECH-Bluetooth-iBeacon-Arduino/dp/B06WGZB2N4
Though there are features of the iPhone I'd like to have, it seems restrictive. Another approach (that I'm about to try, too), is to have an ESP-01 serve as a WiFi-to-Serial bridge for the Propeller.
Since I had ordered a couple of those HM-10s, I looked through old email to see if I had sent anyone code. I had! About four years ago I wrote a demo for a client project that went nowhere. It's attached, along with a bridge program to use the AT mode if you want to change settings in the module (the demo works with out-of-box HM-10). I found the AT mode a little janky, often having to repeat commands to get a response. I even tried pacing the characters sent to the module but that didn't make a difference.
Note that the demo accepts a text command from the module. You can do this because of a custom service in that module that behaves like a UART. I've also attached a screen shot from my phone using a program called BLE Scanner. This provides access to that service and lets me enter a command string.
DGately: Thank you very much! Now I have a use for the Xbee's beyond just one-to-one comm's
David Betz: Do you by chance still have that HM-19 code? I see the HM10 uses BT4.0 while the HM19 uses BT5.0
I am trying to get this to work on an iPhone11 which has BT5.0, so that module would be preferred
Just saw your pics.
Are you using a ProPlug to load your code into the P1?
I don't recognise the USB-Serial pcb as being a PropPlug. The PropPlug has a transistor reset circuit on it. If it's not a PropPlug you will need to duplicate this transistor reset circuit.
I don't recognise the USB-Serial pcb as being a PropPlug.
The PropPlug is upside down. The RX and TX lines line up better this way. The Parallax official instructions for the Propeller Education Kit (PEK) show an upside down PropPlug when programming a DIP Prop since it makes the wiring a little easier.
I didn't remember the reason for the upside down PropPlug correctly. The RX/TX lines could be connected without wire if the PropPlug were right side up and shifted down a bit. The EEPROM would need to moved to allow a straight connection of the RX/TX lines.
My new guess for the upside down PropPlug is allow the PropPlug to lie flat against the breadboard.
The HM19 has arrived and it does show up on my iPhone, yay!
They say the HM19 is actually an HM11 upgraded to use BT5.0
I was hoping the HM10 software might work, but no luck.
Comments
You may be able to use most of the code from "Skinned down Parallax WiFi Driver" in the OBEX... That was written for Parallax's ESP8266-based WiFi module, but should give you a template for building a program, running on a P1 that provides a webpage for interaction with the P1. You'll need to modify the code that initializes and speaks to the WiFi module, but the basis for providing HTML code for content is all there!
Start with going to this page:
https://obex.zemon.name/tree
Click down through: libraries / community / p1 / All and look for the link to "Skinned down Parallax WiFi Driver" (hint: use your web browser's search feature, once you've clicked on 'All' as the driver link is way down the page...)
dgately
-- https://www.amazon.com/DSD-TECH-Bluetooth-iBeacon-Arduino/dp/B06WGZB2N4
Though there are features of the iPhone I'd like to have, it seems restrictive. Another approach (that I'm about to try, too), is to have an ESP-01 serve as a WiFi-to-Serial bridge for the Propeller.
Note that the demo accepts a text command from the module. You can do this because of a custom service in that module that behaves like a UART. I've also attached a screen shot from my phone using a program called BLE Scanner. This provides access to that service and lets me enter a command string.
DGately: Thank you very much! Now I have a use for the Xbee's beyond just one-to-one comm's
David Betz: Do you by chance still have that HM-19 code? I see the HM10 uses BT4.0 while the HM19 uses BT5.0
I am trying to get this to work on an iPhone11 which has BT5.0, so that module would be preferred
I will be testing out soon... let ya know how it goes
Are you using a ProPlug to load your code into the P1?
I don't recognise the USB-Serial pcb as being a PropPlug. The PropPlug has a transistor reset circuit on it. If it's not a PropPlug you will need to duplicate this transistor reset circuit.
The PropPlug is upside down. The RX and TX lines line up better this way. The Parallax official instructions for the Propeller Education Kit (PEK) show an upside down PropPlug when programming a DIP Prop since it makes the wiring a little easier.
Thanks for the photo.
I didn't remember the reason for the upside down PropPlug correctly. The RX/TX lines could be connected without wire if the PropPlug were right side up and shifted down a bit. The EEPROM would need to moved to allow a straight connection of the RX/TX lines.
My new guess for the upside down PropPlug is allow the PropPlug to lie flat against the breadboard.
The HM19 has arrived and it does show up on my iPhone, yay!
They say the HM19 is actually an HM11 upgraded to use BT5.0
I was hoping the HM10 software might work, but no luck.
Any advice?