Notifications
Clear all

VT100 display on android devices via USB or Bluetooth

19 Posts
5 Users
3 Likes
2,120 Views
(@bob-s)
Member
Joined: 4 years ago
Posts: 8
Topic starter  

Hi,

After viewing the outstanding, recent tutorial on air quality sensors I wanted to make the all-sensor project.  As with some other projects, I do not want to send the data to a computer or a web page.  I'd like to display it on my Android smartphone via Bluetooth.  To avoid the scrolling I thought I could use the VT100 protocol(?).  I have been able to get simple tests working on my PC with VT100 and using the VT100.h library...I used Tera Term as the serial console configured for VT100.  However, I was unable to find any Android VT100 terminal emulator app that can receive data via USB or Bluetooth.  There are some Android VT100 apps but they only work within the smartphone (I tired a several of them).

So my question is:

Is there any way to get data from a micro controller displayed to a smartphone:

1. via Bluetooth or USB

2. and/or so that it does not scroll...e.g. the text stays put and the numbers just update.

This would be so helpful in viewing a lot of data on one screen.

Thanks, Bob


   
Quote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

Are you are willing to use WiFi?  This works on all browsers... smart phones, tablets, Windows, Linux, Mac.  

Two examples

  1. Video to see if this is even close.  Shows a dashboard controlling real-time with telemetry including real-time graphing on a laptop and cell-phone simultaneously  -
  2. Includes example, code and basically a tutorial - https://forum.dronebotworkshop.com/show-tell/inqweather-forecasting-weather-station/

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6893
 

@bob Now that's a term (VT100) I haven't heard in decades, is it still a thing? Like @Inq said, a web page is the modern way to do it, lots' of possibilities, even the arduino IoT might be a candidate.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@bob-s)
Member
Joined: 4 years ago
Posts: 8
Topic starter  

@inq 

Thanks for the reply, Inq.

The video didn't really go into how it is coded.

In the weather station scenario it involves allowing an IoT device access to my cable modem/router which unfortunately I do not want to do.  I see too many stories about IoT devices getting hacked.  Perhaps I missed something in the video.

I believe I could use a WiFi capable MCU if I set it up as an access point.  The only glitch here is that I would have to switch WiFi networks on my smartphone and then remember to switch back every time I want to view the data.  It's not as graceful as using Bluetooth.

Bob


   
ReplyQuote
(@bob-s)
Member
Joined: 4 years ago
Posts: 8
Topic starter  

@zander 

Thanks, Ron for the reply.

I stared at VT100 consoles for about 30 years while I maintained Nortel SL-100 PBX's...It was a very user friendly man-machine interface, so it is near and dear to my heart.

The VT100.h library makes for a really cool display on a computer screen, using a program like Tera Term (or I guess Cool Term or Putty).

My problem would be solved if there were a VT100 terminal emulator for Android that could connect to USB or Bluetooth.

I agree that a web page is the way to go but I am too paranoid about being hacked if I give my cable modem/router WiFi password to an IoT device or application.  Of course my tablets, smart phones, TV's etc.  all have the password.  If I wasn't afraid of IoT, I would have a some of my projects using it.

I also would like to avoid having my projects depend on third party servers to function.

Am I too old-fashioned?

Bob


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6893
 

@bob-s I am pretty sure all the cloud/IoT providers encrypt passwords. However you can just fire up a web server on a local device like esp32 or RasPi and it stays local, no need to go out on the web. You only need the cloud service if you want access away from your in house server but there are safe ways to get access to 192.168.xxx.xxx type networks as well.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 
Posted by: @bob-s

@inq 

Thanks for the reply, Inq.

The video didn't really go into how it is coded.

In the weather station scenario it involves allowing an IoT device access to my cable modem/router which unfortunately I do not want to do.  I see too many stories about IoT devices getting hacked.  Perhaps I missed something in the video.

I believe I could use a WiFi capable MCU if I set it up as an access point.  The only glitch here is that I would have to switch WiFi networks on my smartphone and then remember to switch back every time I want to view the data.  It's not as graceful as using Bluetooth.

Bob

Not that I'm trying to convince you of anything, because I don't really care if you use my library or not.  I don't charge for it and I support it freely and usually don't even get a kind word for it.  So just for clarification...

The video was just to show you that it works on any browser simultaneously and for the depth of graphic output that can be readily achieved by web content instead of just a simple text field being updated in-place on a VT100.  If you are looking for nostalgic value... you could even use a black background on the browser, a dot-matrix font and color it amber or green.

Your last paragraph is correct - the library supports both connecting directly to the ESP8266 device and connecting to it via a router.  And yes, connecting directly  (without Internet being available) would be an annoyance.  In the video, that is one of my old phones without a cell plan dedicated to just being a great computer and remote control for my projects.  

The middle paragraph is a little harder to refute.  @zander is correct... no one is able to reach from the outside world through your router and reach your cell-phone or computers.  It doesn't work that way.  The problems you describe are mainly because... most PRODUCTS force you into some cloud based system where you have an account and the device reaches out to the Internet and sends data in/out mainly so you can reach it yourself from the outside world.  The fact that someone can hack that path as well... is just the price people pay to have video of their door-lock cam while on vacation.

It's pointless for me to say, "Trust me, my library doesn't reach out."  But... the mere fact that it is a library for developers and many savvy, paranoid developers can easily look at the data traveling to/from the ESP8266 MPU server... the library would be instantly outted as being malicious.  It would also be taken down from the Arduino website.  The library can be found in the Arduino Library Manager.  Besides... even if I had it sending your router credentials to me, what could I do with them?  

... and back to the first statement.  How it is coded... the link in my signature below shows you how to do it.  A total of five lines of code will do what you asked.  

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Ron reacted
ReplyQuote
(@bob-s)
Member
Joined: 4 years ago
Posts: 8
Topic starter  

@zander 

Ron,

But if I have an ESP32 configured as a web server, then I'd have to switch networks on my smartphone every time I'd want to view the data, right?  And then I'd have to remember to switch it back.

Or am I incorrect?

I, might be willing to get a cheap tablet and just leave it connected via WiFi to the ESP32 web server.  It would provide a bigger screen to view all that telemetry too.  I could use my old smartphone (not used for anything now) for testing before getting a tablet.

Bob


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6893
 

@bob-s Yes, that's the way networks work but check out @Inq, he is a well known member here and his information is correct. It all depends on what you really need and how much code you are prepared to write. 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@bob-s)
Member
Joined: 4 years ago
Posts: 8
Topic starter  

@inq 

I don't want the VT100 just because of its looks.  A web page interface would work fine for me.  As I wrote to Ron, I could get a cheap dedicated tablet and have it connected to an ESP32 web server via WiFi.

So if I understand you (and I don't really understand much about the subject), the only way someone could hack into my home WiFi network is if they are nearby and have the password....It's not an issue if the password is in the cloud?

I'm not as concerned about having the telemetry data itself being seen but rather someone hacking into the device and using it to initiate attacks via my home WiFi network.

I may check it out.

I wanted to check out the Arduino cloud service a while ago but I thought them having my WiFi password was not a good idea.  Also I seem to remember I would've needed a plan that charged for the service.

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@inq 

I didn't realise inqPortal was on the Arduino library list. I have just installed it. I have had the inqPortal bookmarked since your first posts but haven't read it properly yet.

I see InqPortal only runs on the ESP8266 series of processors. Earlier this year I bought what might be an ESP8266 but not sure.  I will be away a week so I will not be able to check until I get home.

I have no web development experience at all.

My current robot base has a laptop brain for video input and I had planned to figure out how to remote control and program the laptop from another fixed pc.

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

...

I agree that a web page is the way to go but I am too paranoid about being hacked if I give my cable modem/router WiFi password to an IoT device or application.  Of course my tablets, smart phones, TV's etc.  all have the password.  If I wasn't afraid of IoT, I would have a some of my projects using it.

I also would like to avoid having my projects depend on third party servers to function.

Am I too old-fashioned?

Bob

I am paranoid about the internet stealing my personal data and the cost of trying to fix it should it happen as it has happened for thousands of people.  A recent hack of Optus has put its users in that pickle.

[deleted rant about the complacency of internet users]

 


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 
Posted by: @robotbuilder

I have no web development experience at all.

My current robot base has a laptop brain for video input and I had planned to figure out how to remote control and program the laptop from another fixed pc.

I am by no-means a web developer.  But, I don't think you'd have any trouble.  JavaScript looks/acts almost like C++... except when it doesn't! 😋 😆 I've also mentioned, Chrome, Edge, both include a very powerful step-by-step debugger... which is one of the reasons I off-load much of my computer power to the client browser... I can quickly debug and change things without having to re-compile the Sketch.  Beside... even an old Android phone is far more powerful than our MPUs.

The HTML... you'll get some boiler plate and add simple stuff.  My latest InqPortal Admin will actually generate that boiler plate WITH your Sketch's published variables when you decide to make your own custom dashboard.  So for simple things like showing current results (telemetry) like @bob-s mentioned he wanted... it'll show you the data in the Admin immediately and its a couple button clicks to get a custom version that you can cosmetic-up as much as you like.

Besides... I'm here to help and I'm sure there are plenty of other more qualified web developers in the forum.

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@inq 

Actually I did buy a book on HTML a long time ago and played around with editing pages.  I think I fancied becoming a web page developer. I seem to remember there is some way to view the HTML code of the web page you are viewing. And a few years ago I did a few tutorials on JavaScript but you had to set up a page to insert it in and some other thing called CSS (I think) there were four windows displayed. Really messy stuff. I seem to remember JavaScript was an easy language to use.

I say seem to remember because unfortunately I have a memory like a sieve. My neurons are like the old RAMs that had to be constantly updated before they lost their charge.

 


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

@bob-s 

 

@zander is right about how much you want to learn and write yourself.  My library ONLY works with ESP8266.  I typically recommend either the WeMos or NodeMCU... both are about $3 last time I checked.  

It is very doable to write your own webserver on an ESP32 if you want.  There is plenty of help here on the forum to get you started.  That way you can absolutely know when it is hooked to your router, that nothing is going out on the Internet.  I should mention it is not a trivial task.  A very lean, custom sketch to do ONLY what you want it to do, might be several hundred lines of code.  The library I provide has over (I think) 30,000 and is generalized to handle many situations like a Microsoft IIS, or Linux Apache server.  The code to do what you want (with my library) would be about 5 lines and ten minutes work.  Reading the "Quickest Start Guide" below will take you longer.

Security

Before I start saying that there is NO WAY for people to hack you.  I'd have to say there are degrees of paranoia.  I use to work in the defense industry and the only reason I don't wear a tin-foil hat is because there is nothing I have that they want bad enough.  But for instance when I worked in that industry in one "security meeting" they showed us a device that could actually read the text displayed on a VT100 terminal through walls and from over 100 yards of air-gap.  FROM THE EMISSIONS OF THE VT100 cathode ray tube (screen) as it scans the pixels on the screen.  Ever see the movie, "Enemy of the State"... That is not fiction.

Posted by: @bob-s

So if I understand you (and I don't really understand much about the subject), the only way someone could hack into my home WiFi network is if they are nearby and have the password....It's not an issue if the password is in the cloud

Someone wanting it bad enough can be outside your house and with enough patience they can get your credentials or simply bypass them.  Not many routers are totally immune to attack.

BUT... even if they are on your router they cannot necessarily get to your computers.  Except if you have kids in the house that have opened ports so they can play games with each other through the Internet.  Those allow people to enter your router and then forward to your computer.  Getting to files on your computer is another step deeper.  If you have strong passwords to log into Windows, Mac, Linux, that is nearly impossible.  If you typically use only a non-Administrator account on Windows, and only use the Admin account when doing Admin tasks, again, they have very little they can attack.  But again... if they want your stuff bad enough...

Posted by: @bob-s

I'm not as concerned about having the telemetry data itself being seen but rather someone hacking into the device and using it to initiate attacks via my home WiFi network.

What you describe is possible on full-blown computers.  Windows, Mac, Linux, Android, iPhone, etc... because they have operating systems and no-one is infinitely privy to every back-door that has to be locked down.  That is one way Virus' can spread with a network, but initializing attacks running on the first compromised computer to others within the network.  These MPU's don't have an OS.  So... there is nothing that can be hacked to initiate a "process" to attack other computers. 

For instance, my library only exposes your Sketch's variables (that you want exposed) so you can see and change them from a browser.  That is ALL IT CAN DO.  It is not possible for the MPU to turn around and launch an attack on some other computer inside your network.  A hacker would have to be logged into your router to even access those published variable.  Unless those values your exposing give information about your network, the hacker... already on it, will be attacking your computers, not your $3 MPU.

VBR,

Inq

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Ron reacted
ReplyQuote
Page 1 / 2