i am coding swift Bluetooth classic Communication program.
my app need to communicate with esp32 with Bluetooth classic.
but i didn't know how i can do this.
there are so many sample code that use Bluetooth Low Energy communication with Swift or SwiftUI
but i can't find Bluetooth classic with swift or swiftui.
i think apple doesn't support Bluetooth Classic Communication .
for example, they doesn't explain well about "Using core bluetooth classic" guide at their document at apple web site.
Post
Replies
Boosts
Views
Activity
i must make a code that ios app communicate with esp32 module over bluetooth classic .
i have been searching for several weeks...
but
i didn't find out sample code for bluetooth classic.
i found one code that use External Accessory Framework.
but this needs a registration for that device
some one says that i can't this. because ESP32 Module can't be registered .
and i found another one
it is coded by reactive native.
but finally, this one use a MFi(Made For Iphone) that use External Accessory Framework.
i guess..
is it impossilbe that making a ios app that communicate with other device over bluetooth classic ?
so, now
i am finding some apps that can communicate esp32 module that is coded by arduino IDE over bluetooth classic, and this arduino app can communicate with android bluetooth classic terminal app.
please help me
i want to make a bluetooth classic code
i found sample code at apple web site
just like below
https://developer.apple.com/documentation/corebluetooth/using_core_bluetooth_classic
but i can't use...
i need some explanation for this,
i watched video below
https://developer.apple.com/videos/play/wwdc2019/901
but
i need more easy and detailed explanation.
this is all~~~ about ios bluetooth classic explanation in text.
please help me
is any other clips in youtube or
sites that explain this easy and in detail ?
i have been making ios app that communicate with ESP32 using bluetooth classic.
but this is very difficult to develop,
because i can't find any Bluetooth scan app for test that can communicate with ESP32 until now,
moreover, i can't find any sample code for Bluetooth Classic Communication .
my client want me to make ios app using Bluetooth classic
because of compatiblity,
in other words,
still, users using Bluetooth Classic iphone are used lots of users more than Bluetooth Low energy.
so
i doubt this assumption is right.
if i make a bluetooth low energy app,
can it be a trouble ?
i want to test iphone 13 mini communicating with other device with bluetooth classic mode only.
how can i do this?
i think i need to change the settings of iphone 13 mini bluetooth communication mode.
but i can't find the setting menu that change the bluetooth communication mode.
just , there is menu for switching on/off bluetooth.
,
or some special setting software ?
or. some special setting code ?
how can i do this ?
can iphone 5 communicate with other BLE device ?
i have made ios app communication with other device by bluetootch classic (BR/EDR)
because my customer want my app to communicate old device using bluetooth classic,
but, i found that the first iphone model using BLE is iphone 5 (2012 made) using BT4
last model of iphone using bluetooth classic is iphone 4s(2011 made)
can iphone 5 communicate with other BLE device ?
what is model name of first iphone using bluetooth Low Energy in iphone series ?
i asked this question to chatGPT,
i got a answer that the name of first iphone using BLE is iphone 4S.
is this right ?
if it is right, i think the assumption that iphone models after iphone 4s support Bluetooth Low energy communication is right.
how can i enroll Company at "apple developer program - organization" without "web site" ?
company to be enrolled at apple developer program doesn't have company's web site.
so, i failed at apple developer program organization.
if some company want to be enrolled at "apple developer program",
do they must have their own web site ?
i need to make app that make Database of received Serial data
after receiving data , i need to show data using chart.
Serial data traffic is not high, and is not happen frequently...
and can i use FMDB at SwiftUI ?
******* TestData.swift ************************
struct Measures: Identifiable {
let id = UUID()
var dataSeq: Int
var value: Double
}
struct Items: Identifiable {
let id = UUID()
var name: String
var measures: [Measures]
}
struct chartItemInfo: Identifiable {
var id = UUID()
var testItem: String
var value: Double
}
var angleItem : [chartItemInfo]?
var degreeItem : [chartItemInfo]?
var grip1Item : [chartItemInfo]?
var grip2Item : [chartItemInfo]?
class TestData: ObservableObject {
@Published var angleItem : [chartItemInfo]?
@Published var degreeItem : [chartItemInfo]?
@Published var grip1Item : [chartItemInfo]?
@Published var grip2Item : [chartItemInfo]?
}
******** CalculatorViewModel.swift ******************************************
class CalculatorViewModel : NSObject, ObservableObject, Identifiable {
....
typealias test_Array = (time: String, swingNum: Int, dataSeqInSwing: Int, timeStampInSeq: Int, angle: Double, degree: Double, grip1: Double, grip2: Double)
....
@Published var testDBdata = [test_Array]()
@Published var chartDBdata = [chart_Array]() //
@StateObject var testData : TestData
var Testitems = [ (channel: "angle", data: testData.angleItem), (channel: "degree", data: testData.degreeItem), (channel: "grip1", data: testData.grip1Item), (channel: "grip2", data: testData.grip2Item)]. => Cannot use instance member 'testData' within property initializer; property initializers run before 'self' is available ?
purpose of this project: read FMDB data and then make Array with DB data.
and then i use these Array for displaying multi plot in Chart.
class CalculatorViewModel : NSObject, ObservableObject, Identifiable {
var id = UUID()
@Published var output = "Disconnected"
@Published var connected = false
@Published var databasePath = String()
enum itemType : Int{
case angle = 1
case degree = 2
case grip1 = 3
case grip2 = 4
}
struct test_Array: Identifiable {
var id = UUID()
var time: String
var swingNum : Int
var dataSeqInSwing: Int
var timeStampInSeq: Double
var itemType: Int
var value: Double
}
@Published var testDBdata = [test_Array] ()
.....
private var centralManager: CBCentralManager?
func connectCalculator() {
output = "Connecting..."
centralQueue = DispatchQueue(label: "test.discovery")
centralManager = CBCentralManager(delegate: self, queue: centralQueue)
}
....
func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) {
.....
if characteristic.uuid == outputCharUUID, var data = characteristic.value {
.....
DispatchQueue.main.async() {
for index in tupleSets {
strItemSets = index.components(separatedBy: ",")
.......
var itemN = 1
for indexStr in strItemSets {
self.golfDBdata[numDB].dataSeqInSwing = countItem. <= Error
self.golfDBdata[numDB].itemType = itemN
self.golfDBdata[numDB].value = Double(strItemSets[itemN]) ?? 0.0
i can't add png image file (2.4M)
i don't know the reason of problem.
what is the standard of edit condition ?
sometime, i can edit, but sometime i can't edit ?
Chart {
ForEach(viewModel.chartDBdata) { index in
LineMark(x: .value("Seq", index.dataSeqInSwing), y: .value("Value",index.value) )
.foregroundStyle(by: .value("itemType", index.itemType))
}
}
.chartForegroundStyleScale([
"angle": .red,
"degree": .orange,
"grip1": .yellow,
"grip2": .blue
])
.frame(height: 300)
.padding()
.onAppear{
viewModel.findContact()
print("Chart_OnAppear after vm.findcontact")
}
.tabItem {
Image(systemName: "2.circle")
Text("data base")
}.tag(2)
Charts: ScaleResolutionFailure(message: "Scale domain configuration doesn't match encoded value type")
<0x10190ebd0> Gesture: System gesture gate timed out.
immediately after ForEach looping completion,
error message above is shown.
why does this happen ?
objectC program: iOS all : iPhone ~
swift program. : iOS 13 ~ : iPhone 6s ~
swiftUI Program : iOS 13 ~ : iPhone 6s ~
bluetooth classic : ~ iPhone 4s
Bluetooth Low Engery : iPhone 5 ~
are All above content right?
i am making iOS app with swiftUI app, and Bluetooth Low Energy.
after making app, i found that my app can run on greater than iOS13 , iPhone 6s.
how many is ther number of above iPhone6s User ?