diff --git a/py/qstrdefs.h b/py/qstrdefs.h
index 0f066e3249540dc4526808897a98410c6a4466a2..ea107f5f4798eb3088919563ed08cb608905eb47 100644
--- a/py/qstrdefs.h
+++ b/py/qstrdefs.h
@@ -525,6 +525,7 @@ Q(readinto)
 Q(readline)
 Q(readlines)
 Q(seek)
+Q(tell)
 Q(FileIO)
 Q(TextIOWrapper)
 Q(StringIO)
diff --git a/py/stream.c b/py/stream.c
index 258f916e088aa12e5784e7fb9c6ec4a93efb5c74..ba672ce2c5dde1e19c489e3a8307b9b9553a47c6 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -26,6 +26,7 @@
  */
 
 #include <string.h>
+#include <unistd.h>
 
 #include "py/nlr.h"
 #include "py/objstr.h"
@@ -400,6 +401,14 @@ STATIC mp_obj_t stream_seek(mp_uint_t n_args, const mp_obj_t *args) {
 }
 MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_seek_obj, 2, 3, stream_seek);
 
+STATIC mp_obj_t stream_tell(mp_obj_t self) {
+    mp_obj_t offset = MP_OBJ_NEW_SMALL_INT(0);
+    mp_obj_t whence = MP_OBJ_NEW_SMALL_INT(SEEK_CUR);
+    const mp_obj_t args[3] = {self, offset, whence};
+    return stream_seek(3, args);
+}
+MP_DEFINE_CONST_FUN_OBJ_1(mp_stream_tell_obj, stream_tell);
+
 MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_read_obj, 1, 2, stream_read);
 MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_readinto_obj, 2, 3, stream_readinto);
 MP_DEFINE_CONST_FUN_OBJ_1(mp_stream_readall_obj, stream_readall);
diff --git a/py/stream.h b/py/stream.h
index f9c77aac6e5a5f4c58b068bd1faf7da0d5a72b70..f9ba3387a917e2838ef20767ee81f9687c45647b 100644
--- a/py/stream.h
+++ b/py/stream.h
@@ -35,6 +35,7 @@ MP_DECLARE_CONST_FUN_OBJ(mp_stream_unbuffered_readline_obj);
 MP_DECLARE_CONST_FUN_OBJ(mp_stream_unbuffered_readlines_obj);
 MP_DECLARE_CONST_FUN_OBJ(mp_stream_write_obj);
 MP_DECLARE_CONST_FUN_OBJ(mp_stream_seek_obj);
+MP_DECLARE_CONST_FUN_OBJ(mp_stream_tell_obj);
 
 // Iterator which uses mp_stream_unbuffered_readline_obj
 mp_obj_t mp_stream_unbuffered_iter(mp_obj_t self);
diff --git a/stmhal/file.c b/stmhal/file.c
index d09d0a0a89ee936bf738453843104b8c89a3a114..d7d8009b3ab77038635f95645719815ae075dae1 100644
--- a/stmhal/file.c
+++ b/stmhal/file.c
@@ -148,12 +148,6 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, mp_uint_t arg,
     }
 }
 
-mp_obj_t file_obj_tell(mp_obj_t self_in) {
-    pyb_file_obj_t *self = self_in;
-    return mp_obj_new_int_from_uint(f_tell(&self->fp));
-}
-STATIC MP_DEFINE_CONST_FUN_OBJ_1(file_obj_tell_obj, file_obj_tell);
-
 // Note: encoding is ignored for now; it's also not a valid kwarg for CPython's FileIO,
 // but by adding it here we can use one single mp_arg_t array for open() and FileIO's constructor
 STATIC const mp_arg_t file_open_args[] = {
@@ -231,7 +225,7 @@ STATIC const mp_map_elem_t rawfile_locals_dict_table[] = {
     { MP_OBJ_NEW_QSTR(MP_QSTR_flush), (mp_obj_t)&file_obj_flush_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR_close), (mp_obj_t)&file_obj_close_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR_seek), (mp_obj_t)&mp_stream_seek_obj },
-    { MP_OBJ_NEW_QSTR(MP_QSTR_tell), (mp_obj_t)&file_obj_tell_obj },
+    { MP_OBJ_NEW_QSTR(MP_QSTR_tell), (mp_obj_t)&mp_stream_tell_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR___del__), (mp_obj_t)&file_obj_close_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR___enter__), (mp_obj_t)&mp_identity_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR___exit__), (mp_obj_t)&file_obj___exit___obj },
diff --git a/stmhal/qstrdefsport.h b/stmhal/qstrdefsport.h
index 410848ae9e7801d90d02801afa2987c051a0e86b..fe6077ec47ae1b5e5332ff0be66aa18aca2d0305 100644
--- a/stmhal/qstrdefsport.h
+++ b/stmhal/qstrdefsport.h
@@ -88,10 +88,6 @@ Q(json)
 Q(heapq)
 Q(hashlib)
 
-// for file class
-Q(seek)
-Q(tell)
-
 // for USB configuration
 Q(usb_mode)
 Q(mode)
diff --git a/tests/io/file_seek.py b/tests/io/file_seek.py
index 922b16928054d053f8a67eb808a17d7f6725cb2b..d6be662cbfef17c98541b07afaf709cde04d2f69 100644
--- a/tests/io/file_seek.py
+++ b/tests/io/file_seek.py
@@ -1,15 +1,19 @@
 f = open("io/data/file1", "rb")
 print(f.seek(6))
 print(f.read(5))
+print(f.tell())
 
 print(f.seek(0, 1))
 print(f.read(4))
+print(f.tell())
 
 print(f.seek(-6, 2))
 print(f.read(20))
+print(f.tell())
 
 print(f.seek(0, 0))
 print(f.read(5))
+print(f.tell())
 
 f.close()
 
@@ -17,4 +21,5 @@ f.close()
 f = open("io/data/file1", "rt")
 print(f.seek(6))
 print(f.read(5))
+print(f.tell())
 f.close()
diff --git a/unix/file.c b/unix/file.c
index a7886fd3cef81816655b795fb9a435b0b798a3dd..c98212bc2842931a14529b6db91dd199b75d64ef 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -211,6 +211,7 @@ STATIC const mp_map_elem_t rawfile_locals_dict_table[] = {
     { MP_OBJ_NEW_QSTR(MP_QSTR_readlines), (mp_obj_t)&mp_stream_unbuffered_readlines_obj},
     { MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR_seek), (mp_obj_t)&mp_stream_seek_obj },
+    { MP_OBJ_NEW_QSTR(MP_QSTR_tell), (mp_obj_t)&mp_stream_tell_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR_flush), (mp_obj_t)&fdfile_flush_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR_close), (mp_obj_t)&fdfile_close_obj },
     { MP_OBJ_NEW_QSTR(MP_QSTR___enter__), (mp_obj_t)&mp_identity_obj },